0
我的@interface FriendsNavController裏面有以下代碼:UINavigationController類的實現。代碼被執行。我只是不知道爲什麼它沒有顯示該按鈕...右鍵欄按鈕不在導航欄中加載
- (void)viewDidLoad {
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Add Event" style:UIBarButtonItemStylePlain target:self action:@selector(refreshPropertyList)];
self.navigationItem.rightBarButtonItem = button;
[button release];
[super viewDidLoad];
}
它不會改變任何東西.... – aherlambang 2010-10-29 16:45:59
我upvoted他的答案。我唯一遇到過導航欄按鈕的問題是當一個按鈕是由一個無圖像的自定義圖像啓動時。我可以建議的唯一事情就是設置一個斷點並確認該按鈕不是零。 – Justin 2010-10-29 16:58:01
我編輯我的答案,包括其他的東西,你可以嘗試。 – Greg 2010-10-29 16:59:49