因此,這裏是情景,我有一個SearchController,顯示過濾結果從我的應用程序列表中的聯繫人,也出現在我的地址簿。ABPersonViewController將不會顯示在推
推送ABPersonViewController的代碼出現在我的didSelectObject:atIndex方法中。這裏是代碼:
TableCellClass *selectedCell= (TableCellClass *)[self.tableView cellForRowAtIndexPath:indexPath];
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef arrayOfAllPeople = ABAddressBookCopyArrayOfAllPeople(addressBook);
ABRecordRef thisPerson = CFArrayGetValueAtIndex(arrayOfAllPeople,selectedCell.contactIndex);
ABPersonViewController *picker = [[ABPersonViewController alloc]init];
picker.personViewDelegate = self;
picker.displayedPerson = thisPerson;
picker.allowsEditing = YES;
[self.navigationController pushViewController:picker animated:YES];
此代碼塊的工作就好了一個標準的TTTableViewController,但不知何故不會對我的工作searchController。
這裏順便說一下拍攝的畫面。所以你可以看到沒有NavigationController存在。這是Three20的默認設置。具有地址簿圖標的單元格是在點按手勢時啓動ABPersonViewController的項目
燁它擁有一個零值。那我該如何補救?創建一個新的navigationController是否會破壞Three20的導航映射? –
不確定about20,但你需要得到一個有效的指針導航控制器。它是如何呈現的? – railwayparade
我編輯了我的帖子供您查看屏幕截圖:) –