ABPersonViewController默認在右側按鈕欄位置顯示「取消」按鈕。如何隱藏/清除該項目?必填代碼示例如下:ABPersonViewController並隱藏取消按鈕
ABPersonViewController *picker = [[[ABPersonViewController alloc] init] autorelease];
picker.personViewDelegate = self;
picker.displayedPerson = aPerson;
picker.allowsEditing = NO;
謝謝。
解決了!子類ABPersonViewController,覆蓋 - (void)viewDidLoad,調用super,然後將rightBarButtonItem設置爲nil。達達! @interface PersonViewController:ABPersonViewController @end @implementation PersonViewController - (無效)viewDidLoad中{ \t [超級viewDidLoad中]; \t self.navigationItem.rightBarButtonItem = nil; } @end – gnasher 2010-06-29 16:33:37