I am trying to add two right buttons to the navigation bar. I tried adding using following ways but I get SIGABRT
self.navigationController.navigationBar.items = navItemsArray;
self.navigationItem.rightBarButtonItems = navItemsArray;
navItemsArray
has two buttons of type UIBarButtonItem
.
Can anyone help with this? I can't figure out what is wrong.
self.navigationItem.rightBarButtonItems = navItemsArray;
仅适用于iOS 5。
do you have callbacks for the buttons? Did you "wire up" the buttons by option-clicking them and dragging them to something?
You need to have the buttons connected to an IBAction.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.