you can use abcontact class.
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;
and in the didselect line do the following:
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSArray *collection = (aTableView == self.tableView) ? self.contacts : self.filteredArray; ABContact *contact = [collection objectAtIndex:indexPath.row]; }
Syed Faraz Haider Zaidi
source share