Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-26-2011, 02:58 PM   #1 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 3
anthonyk is on a distinguished road
Default Contacts in a tab bar application

Hello,

I'm developing a tab bar application with one of the tabs to display the contacts.

When I use this code in in the viewDidLoad:

ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentModalViewControllericker animated:YES];
[picker release];

The contacts are displayed but the tab bar is disappearing, plus if I change tabs and go back to the contacts tab bar item, the contacts are not displaying again.

Can I use the ABPeoplePickerNavigationController in the tab bar and let it load the contacts in any way or I have to get the contacts and fill them in a UITableView.

Thanks a lot for your help,

Anthony Korkmaz
anthonyk is offline   Reply With Quote
Old 05-26-2011, 04:38 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

don't use presentModalViewController to display the picker
smithdale87 is offline   Reply With Quote
Old 05-27-2011, 09:08 PM   #3 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 3
anthonyk is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
don't use presentModalViewController to display the picker
What else can I use? Can you tell me how can I make it work?

Thank you
anthonyk is offline   Reply With Quote
Old 05-28-2011, 02:29 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Quote:
[self.view addSubview:yourPicker];
and then when you have done with it
Quote:
[yourPicker removeFromSuperview];
__________________
dany_dev is offline   Reply With Quote
Old 05-28-2011, 05:24 AM   #5 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 3
anthonyk is on a distinguished road
Default

It worked!!! lots of thanks guys

[self.view addSubview:yourPicker.view];
anthonyk is offline   Reply With Quote
Old 10-22-2011, 05:09 AM   #6 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 2
Laxman_Pandey is on a distinguished road
Default

@anthonyk,
I am facing the same problem could you please explain me how to make view of ABPeoplePickerNavigationController that don't cover the tab bar items . I really googled a lot but unsuccessful. the presentmodelviewcontroller covering the whole screen.

When i use [self.view addSubview:yourPicker.view]; it just showing the Navigation bar with tile All Contact and Navigation bar item Cancel.
There is no contact on the view.

- (void)viewWillAppearBOOL)animated {


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


[self.view addSubviewicker.view];
[picker release];


[super viewWillAppear:animated];
}




Thanks in advance!

Last edited by Laxman_Pandey; 10-22-2011 at 05:14 AM.
Laxman_Pandey is offline   Reply With Quote
Old 02-08-2012, 02:25 AM   #7 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 1
ordinaryman09 is on a distinguished road
Thumbs up

Quote:
Originally Posted by Laxman_Pandey View Post
@anthonyk,
I am facing the same problem could you please explain me how to make view of ABPeoplePickerNavigationController that don't cover the tab bar items . I really googled a lot but unsuccessful. the presentmodelviewcontroller covering the whole screen.

When i use [self.view addSubview:yourPicker.view]; it just showing the Navigation bar with tile All Contact and Navigation bar item Cancel.
There is no contact on the view.

- (void)viewWillAppearBOOL)animated {


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


[self.view addSubviewicker.view];
[picker release];


[super viewWillAppear:animated];
}




Thanks in advance!
I also have this problem, anyone have any idea?

Thanks.
ordinaryman09 is offline   Reply With Quote
Reply

Bookmarks

Tags
contacts, tab bar application

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 343
6 members and 337 guests
doffing81, dre, iOS.Lover, jenniead38, Kirkout, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0