Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 19, 2010, 08:40 AM   #1
TeeJayEm
macrumors regular
 
Join Date: Mar 2008
ABUnknownPersonViewController

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 Thumbnails
Click image for larger version

Name:	Step1.jpg
Views:	35
Size:	61.0 KB
ID:	260860   Click image for larger version

Name:	Step2.jpg
Views:	29
Size:	58.4 KB
ID:	260862  
TeeJayEm is offline   0 Reply With Quote
Old Feb 13, 2011, 08:33 AM   #2
pipodeclown
macrumors newbie
 
Join Date: Feb 2011
I'm having the same issue, Have you or someone else found a solution for this, please?



THANKS!
pipodeclown is offline   0 Reply With Quote
Old Feb 13, 2011, 09:38 AM   #3
TeeJayEm
Thread Starter
macrumors regular
 
Join Date: Mar 2008
Quote:
Originally Posted by pipodeclown View Post
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.
TeeJayEm is offline   0 Reply With Quote
Old Feb 15, 2011, 05:56 AM   #4
pipodeclown
macrumors newbie
 
Join Date: Feb 2011
Can you please share your code sample?

THANKS!
pipodeclown is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump

All times are GMT -5. The time now is 08:48 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC