cell.detailTextLabel.text = book.tel;
return cell;
}
列表效果
PS:通讯录中电话号码中的"-"可以在存入数组之前进行处理,属于NSString处理的范畴,解决办法有很多种,本文不多加说明
四、删除通讯录数据
复制代码<span style="white-space:pre"> </span>ABRecordRef person = objc_unretainedPointer([myContacts objectAtIndex:indexPath.row]);
CFErrorRef *error;
ABAddressBookRemoveRecord(addressBook, person, error);
ABAddressBookSave(addressBook, error);
myContacts = nil;
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
注:相关教程知识阅读请移步到IOS开发频道。











