1

I am currently using the people picker in IOS to show the list of contacts and let the user select the contact they want to use within my app.

Currently it is presented Modally, as in it pops up and covers my entire app.

My app has a Tab bar at the bottom and a navigation bar at the top, I was wondering is it possible to display the people picker in the view between the tab bar and the navigation bar?

Or will the people picker always cover the entire app?

EDIT:

When I try to push it using a navigation controller like this:

[self.navigationController pushViewController:picker animated:NO];

I get the following error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'
tshepang
  • 12,111
  • 21
  • 91
  • 136
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191

1 Answers1

2

If you don't display it modal, but push it in an navigation controller then it should not hide your tabbar.

I'm assuming that you have a navigation controller setup in the tab you want to display you contacts view in.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
  • Oke, so ABPeoplePickerNavigationController already is an navigation controller, You could just set up the tabbarcontroller to use the ABPeoplePickerNavigationController as one of your tab options. Then set the delegate on ABPeoplePickerNavigationController to an other object to handle the selection. – rckoenes Apr 14 '11 at 12:19
  • I've only been programming on objective-c and IOS for 4 days so not fully understanding, at the minute I dont have a custom class for my TabBarController, I have the TabBarController set up as the rootController and added it to a window along with the NavigationBarController. So I'm not sure how I would set the people picker as one of my Tab options? And also unsure of how to set a delegate for the ABPeoplePickerNavigationController because of this? – Donal Rafferty Apr 14 '11 at 12:44
  • 2
    Then I would suggest that you run do some more tutorial, especial those about creating the tabbarcontroller via code. – rckoenes Apr 14 '11 at 12:46