自定义行为到iphone地址簿ui控制器

Ibr*_*ucu 6 iphone objective-c addressbook

有没有办法自定义ABPeoplePickerNavigationController并让用户选择多个联系人而无需详细说明?如用户选择他们,但没有办法给视觉反馈回到那个他/她选择他点击联系人的用户(或取消他们第二次点击)我可以把接触到一个数组.我不想仅为这个简单的功能推出自己的AB.作为解决方法,我可以在Iphone AB UI上显示自定义模态视图吗?

Sye*_*idi 1

你可以使用 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;
Run Code Online (Sandbox Code Playgroud)

并在 didselect 行上执行以下操作:

- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{   

    NSArray *collection = (aTableView == self.tableView) ? self.contacts : self.filteredArray;
    ABContact *contact = [collection objectAtIndex:indexPath.row];
}
Run Code Online (Sandbox Code Playgroud)