|Nov 19, 2010, 08:40 AM||#1|
Currently, I have a UISplitViewController with a UINavigationViewController as the detailViewController. What's happening is when the user taps on an item in the masterViewControler it pushes an ABUnknownViewController on the navigation controller. That works as expected, however when the user taps "Create New Contact" another ViewController (my guess is the ABNewPersonViewController) is displayed outside of the bounds of the UINavigationController. Is this a bug or am i using the ABUnknownPersonViewController incorrectly?
I've attached two images of what is going on and here is the code i'm using:
ABUnknownPersonViewController *unknown = [[ABUnknownPersonViewController alloc] init]; unknown.allowsActions = YES; unknown.unknownPersonViewDelegate = self; unknown.allowsAddingToAddressBook = YES; ABAddressBookRef addressBook = ABAddressBookCreate(); ABRecordRef person = ABPersonCreate(); Employee *employee = [controller.service employeeAtIndex: indexPath.row]; ABRecordSetValue(person, kABPersonFirstNameProperty, @"first name", NULL); ABRecordSetValue(person, kABPersonLastNameProperty, @"last name", NULL); unknown.displayedPerson = person; [detailNavigationController popToRootViewControllerAnimated: NO]; [detailNavigationController pushViewController: unknown animated: YES]; CFRelease(addressBook); CFRelease(person); [unknown release];
|Feb 13, 2011, 09:38 AM||#3|