[英]How can I have 2 leftBarButtonItems in iPhone app, and 1 be the default back button?
I would like 2 leftBarButtonItems, but leave one of the items as the default back button for Navigation Controllers. 我想要2个leftBarButtonItems,但保留其中一个项目作为导航控制器的默认后退按钮。 I have set up:
我已经建立:
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives, ???, nil];
where archives is a UIBarButtonItem I created, but do not know what the default back button is to include in the array. 其中archives是我创建的UIBarButtonItem,但不知道默认的后退按钮要包含在数组中。 Any suggestions?
有什么建议么?
Make sure you set leftItemsSupplementBackButton
to YES. 确保将
leftItemsSupplementBackButton
设置为YES。
self.navigationItem.leftItemsSupplementBackButton = YES;
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives, nil];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.