Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TeeJayEm

macrumors regular
Original poster
Mar 28, 2008
104
0
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];
 

Attachments

  • Step1.jpg
    Step1.jpg
    61 KB · Views: 96
  • Step2.jpg
    Step2.jpg
    58.4 KB · Views: 95

TeeJayEm

macrumors regular
Original poster
Mar 28, 2008
104
0
I'm having the same issue, Have you or someone else found a solution for this, please?

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.