想要在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;
}
不知道错误在哪儿
天涯尽头无女友
人到中年有点甜
相关分类