Adding buttons to navigation bar ios

16,585
self.navigationItem.rightBarButtonItems = navItemsArray;

works only in iOS 5.

Share:
16,585
pa12
Author by

pa12

Updated on June 04, 2022

Comments

  • pa12
    pa12 almost 2 years

    I am trying to add two right buttons to the navigation bar. I tried adding using following ways but I get SIGABRT

    1. self.navigationController.navigationBar.items = navItemsArray;
    2. self.navigationItem.rightBarButtonItems = navItemsArray;

    navItemsArray has two buttons of type UIBarButtonItem.

    Can anyone help with this? I can't figure out what is wrong.