我有一个视图控制器,它是独立的,有两个左 UIBarButtonItem,但是当我按下它时,我想要这两个按钮 + 后退按钮
我试过了
- (void)viewDidLoad
{
[super viewDidLoad];
// back
if (self.navigationController.navigationItem.backBarButtonItem) {
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:self.navigationController.navigationItem.backBarButtonItem, self.barButtonFilter, self.barButtonFilterContacts, nil];
} else {
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:self.barButtonFilter, self.barButtonFilterContacts, nil];
}
}
如果有后退按钮,则添加,否则替换
但我没有工作