I just want to retrieve all Address book contacts and display that in UITableView.
Display that all contacts as shown in image.
I don't know how to do this.
Please suggest me to solve this problem.
Thanks in advance...
I just want to retrieve all Address book contacts and display that in UITableView.
Display that all contacts as shown in image.
I don't know how to do this.
Please suggest me to solve this problem.
Thanks in advance...
Your frined is ABAddressBook
: http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/AddressBook/Classes/ABAddressBook_Class/Reference/Reference.html
It has (NSArray *)people
that returns you all contacts.
You can use that as the source for your table.
I do not have complete sample code available but I think that is not the point of Stack Overflow. Search here at SO to find how to implement UITableView
.
Here is the solution that you are looking for. In that, you will get required data from the method -(void)collectContacts.
Yeah, I got the solution...
Use this code
// creating the picker
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
// place the delegate of the picker to the controll
picker.peoplePickerDelegate = self;
// showing the picker
[self presentModalViewController:picker animated:NO];
// releasing
[picker release];
and It will display all contacts from iPhone as shown in figure..but not display that type of view in simulator..you have to run it in device...
Happy Coding...