您可以使用abcontact類。
NSArray *collection = (aTableView == tableView) ? self.contacts : self.filteredArray;
ABContact *contact = [collection objectAtIndex:indexPath.row];
cell.textLabel.text = contact.contactName;
cell.detailTextLabel.text=contact.phonenumbers;
cell.selectionStyle=UITableViewCellSelectionStyleGray;
和didselect行做到這一點:
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSArray *collection = (aTableView == self.tableView) ? self.contacts : self.filteredArray;
ABContact *contact = [collection objectAtIndex:indexPath.row];
}
有沒有辦法來定製的。我最終寫了自己的。 – 2010-10-13 08:17:11