【发布时间】:2010-01-19 13:14:25
【问题描述】:
我正在开发一个带有自动后退按钮等的传统 iPhone UINavigationController 应用程序。
当按下“编辑”按钮时,我正在处理。 LHS 后退图标变暗,我的新图标进来了,然后一旦我再次点击“编辑”按钮,后退按钮就会回来。
到目前为止,后退按钮消失了,我的新按钮进来了,但我不能把它放回去!我知道代码应该是什么,但我不知道在哪里调用它。
这是我目前所拥有的:
(void)setEditing:(BOOL)editing animated:(BOOL)animated {
[self.navigationItem setHidesBackButton:editing animated:animated]; //fades back button
//de 006 - Load in Move section button here.
UIBarButtonItem *saveButton = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemOrganize
target:self action:@selector(altersection:)] autorelease];
self.navigationItem.leftBarButtonItem = saveButton;
基本上我想要(void)setEditing:(BOOL)editing animated:(BOOL)animated {的倒数,我可以在哪里做:
self.navigationItem.leftBarButtonItem = nil; //custom button hide
self.navigationItem.hidesBackButton = NO; //replace back button
是否有 (void)setEditing:(BOOL)editing 的倒数?
【问题讨论】:
标签: iphone button uinavigationcontroller navigation