【发布时间】:2010-06-15 14:36:51
【问题描述】:
我在导航栏上添加了一个按钮,如下所示:
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(methodtocall:)];
self.navigationItem.rightBarButtonItem = anotherButton;
[anotherButton release];
但是,当我按下此按钮时,我得到了 InvalidArgumentException。这是一个全新的导航项目。有谁知道我为什么会出现这种行为?
【问题讨论】:
-
可以看看你的操作方法吗?
标签: iphone objective-c cocoa-touch uinavigationbar uibarbuttonitem