Discussion in 'iOS Programming' started by TeeJayEm, Nov 19, 2010.

  1. macrumors regular

    Mar 28, 2008
    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];
    	[unknown release];

    Attached Files:

  2. macrumors newbie

    Feb 13, 2011
    I'm having the same issue, Have you or someone else found a solution for this, please?


  3. thread starter macrumors regular

    Mar 28, 2008
    I haven't found a solution. I asked here and on apple's dev forums with no real response. I decided to just present the ABUnknownPersonViewController in a form sheet.
  4. macrumors newbie

    Feb 13, 2011
    Can you please share your code sample?


Share This Page