I'm able to follow http://blog.blackwhale.at/2009/06/uibuttons-in-uinavigationbar/ to add multiple buttons on the RIGHT side of the UINavigationBar. However, I cannot find any solution to add multiple buttons on the LEFT side. I want to add an "Edit" button next to the Back button in the UINavigation Bar for my iPad app. It's kinda like the "Sign Out" and "Edit" buttons in the iPad YouTube app.
Anyone has any idea on how to implement it?
Thanks
let editImage = UIImage(named: "YourImageName1")!
let searchImage = UIImage(named: "YourImageName2")!
let editButton = UIBarButtonItem(image: editImage, style:
.Plain, target: self, action: "didTapEditButton:")
let searchButton = UIBarButtonItem(image: searchImage, style:
.Plain, target: self, action: "didTapSearchButton:")
navigationItem.leftBarButtonItems = [editButton, searchButton]
And In the End Make Functions For Tapping Buttons
func didTapEditButton(sender: AnyObject)
{
...
}
func didTapSearchButton(sender: AnyObject)
{
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With