想要在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 關注
- 797 瀏覽
添加回答
舉報
0/150
提交
取消