ABPeoplePicker.... と addressBook を連携させたい場合、解決策はありません。同じことを試みましたが、最終的に新しいカスタム インデックス付きテーブル ビューを作成しました。とても簡単でした。インデックス付きの tableView を作成したい場合は、
indexed-ui-tableviewをご覧ください。
その後、次の方法を変更して、情報を複数行に表示できます。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = [[[content objectAtIndex:indexPath.section] objectForKey:@"rowValues"]
objectAtIndex:indexPath.row];
cell.detailTextLabel.text=[NSString stringWithFormat:@"%@ %@ %@", @"someone@gmail.com", @"|",@"123456777777777777777"] ;;
return cell;
}
データ ジェネレーターは、モデルに合わせて変更できます。メールなどはモデルから取得できます。上記のスニペットでは、ハードコードされています。その後、検索機能を簡単に接続できます。