想要在navigation controller 的顶端条添加一个刷新键。不知道为什么不执行。hearder代码:@interface PropertyViewController : UINavigationController {}添加button代码:(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Show" style:UIBarButtonItemStylePlain
target:self action:@selector(refreshPropertyList:)];
self.navigationItem.rightBarButtonItem = anotherButton;
}
return self;
}
不知道错误在哪儿
- 2 回答
- 0 关注
- 764 浏览
添加回答
举报
0/150
提交
取消