ABUnknownPersonViewController

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

  1. macrumors regular

    Joined:
    Mar 28, 2008
    #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:
    Code:
    	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];
     

    Attached Files:

  2. macrumors newbie

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

    :confused:

    THANKS!
     
  3. thread starter macrumors regular

    Joined:
    Mar 28, 2008
    #3
    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

    Joined:
    Feb 13, 2011
    #4
    Can you please share your code sample?

    THANKS!
     

Share This Page