开发者

how to get contact information to tableviewcell from all contacts?

开发者 https://www.devze.com 2023-01-30 05:03 出处:网络
i am trying to reproduce native phone app favorites tab in my app , i am succeed displaying all contacts

i am trying to reproduce native phone app favorites tab in my app , i am succeed displaying all contacts my code

-(IBAction)addFavorite { 
    ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    [self presentModalViewController:picker animated:YES];
    [picker release];
}  

how can i get full contact information of a contact into tableview cel开发者_JAVA技巧l, like in real app

and how can i get red color delete buttons to edit them ?

thanks in advance

regards


For this you must use database(coredata or sqlite) and store contacts in the database .

when you want to display fetch all records and make 26 section for a-z alphabet then according to first alphabet categories them.

for delete button,

yourTable.editing=YES;

this gives red - marks on left in table cell and on tapping these you get red delete button. and you can write your deletion code in

- (void) tableView:(UITableView *)tableView 
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle 
 forRowAtIndexPath:(NSIndexPath *)indexPath

above method.

use this information with your logics

0

精彩评论

暂无评论...
验证码 换一张
取 消