如何在iPhone应用程序中拥有2个leftBarButtonItems,并且1是默认
发布时间:2020-12-14 19:52:37 所属栏目:百科 来源:网络整理
导读:我想要2个leftBarButtonItems,但保留其中一个项目作为导航控制器的默认后退按钮.我已经建立: self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives,???,nil]; 其中archives是我创建的UIBarButtonItem,但不知道默认的后退按钮要包
我想要2个leftBarButtonItems,但保留其中一个项目作为导航控制器的默认后退按钮.我已经建立:
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives,???,nil]; 其中archives是我创建的UIBarButtonItem,但不知道默认的后退按钮要包含在数组中.有什么建议? 解决方法
确保将leftItemsSupplementBackButton设置为YES.
self.navigationItem.leftItemsSupplementBackButton = YES; self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives,nil]; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |