Add another button next to the “back” button on the left of a UINavigationBar

二次信任 提交于 2019-11-30 11:48:32

As stated by steipete in the comment to the question, this is possible starting from iOS 5. You can use

self.navigationItem.leftItemsSupplementBackButton = YES;

and then you just need to add an UIBarButtonItem as leftButton to get a second button after the back button

UIBarButtonItem *secondButton = [[UIBarButtonItem alloc] initWithTitle:@"Second" style:UIBarButtonItemStylePlain target:self action:@selector(yourAction)];
self.navigationItem.leftBarButtonItem = secondButton;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!