2011年01月17日 過去Blog
– (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } //ref of Addressbook ABAddressBookRef book = ABAddressBookCreate(); //Count of Addressbook //CFIndex cnt = ABAddressBookGetPersonCount(book); //NSLog(@”addressbook count is %d “,cnt); //AllRecords of Addressbook CFArrayRef records = ABAddressBookCopyArrayOfAllPeople(book); //record at index=i ABRecordRef person = CFArrayGetValueAtIndex(records,indexPath.row); NSString *firstName = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty); NSString *lastName = (NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty); if (firstName == nil) { firstName = @””; } if (lastName == nil) { lastName = @””; } cell.textLabel.text = [NSString stringWithFormat:@”%@ %@”,lastName,firstName]; return cell; }

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

PHPで画像をランダム表示

2010年09月25日 過去Blog
とても丁寧に解説してくれているサイトがあったので、メモしておきます。 http://chocobit.com/2007/03/19.php Atlanta insurance recovery…
「PHPで画像をランダム表示」をはてなブックマークに追加

ModalView経由での値の受け渡し

2011年05月03日 過去Blog
http://timneill.net/2010/11/modal-view-controller-example-part-2/ http://ameblo.jp/iphone0126/entry-10716795357.html buy steroids…
「ModalView経由での値の受け渡し」をはてなブックマークに追加

linux : chomod,chown パーミッション変更

2009年11月27日 過去Blog
chown USER_NAME /DIR_PATH/ chown USER_NAME -R /DIR_PATH/ -Rをつけることで指定ディレクトリ以下の全てのディレクトリ、ファイルの所有者を変更します。 physical therapy chicago…
「linux : chomod,chown パーミッション変更」をはてなブックマークに追加

[4]:View間での移動について

2010年11月30日 過去Blog
今回は、あるviewから他のviewへ移動させる方法を実装します。UINavigationController を利用し、以前の記事で制作済のコードを利用します。 以前の記事(とても簡単です。)をまだ読まれてない方は、そちらを読んでから、この記事をご覧ください。 今回学ぶこと: 新規ビューの追加 ビューコントローラを追加する ビューを移動するための設定 ビューとコードを接続 戻るボタンを設置 …
「[4]:View間での移動について」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy