views:

318

answers:

2

I have the following code to set up and switch to the ABPeoplePickerNavigationController.

 ABPeoplePickerNavigationController *peoplePicker = [
  [ABPeoplePickerNavigationController alloc] init
 ];
 peoplePicker.peoplePickerDelegate = self;

 window = [[[currentView superview] superview] superview];  
 [window addSubview:[peoplePicker view]];
 [[[peoplePicker view] layer] addAnimation:animation forKey:@"nav"];

The view it is switching from is controlled by a UITabBarController. I'd to prevent the tab bar from displaying while the peoplePicker is the active view, but so far I haven't had any luck. I've looked into hidesBottomBarWhenPushed, but since I can't push a navigation controller, it isn't helpful. What else can I do?

+1  A: 

Try calling

- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated

on your UITabBarController object. This should cause the ABPeoplePickerNavigationController to fill the entire window, hiding the TabBar.

kubi
A: 

I have the same problem with a UIImagePickerController and call presentModalViewController: on UITabBarController shows nothing.

I don't know how you're program is structured, but in my case the code was: [self presentModalViewController:peoplePicker animated:YES];
JoBu1324