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


ピックアップ記事

USBメモリがフォーマットできない

2010年10月07日 過去Blog
先日、USBメモリをさしたまま、OSの再インストールをしていると誤って、USBメモリの中のパーティションも削除してしまいました。 そのままだとUSBメモリが使えなくなってしまったので、以下の方法でフォーマットしました。 コントロールパネル > 管理ツール > コンピュータの管理 > ディスクの管理 右下に表示されるディスクの一覧から該当するUSBメモリを探し、右クリック、(パーティションがあ…
「USBメモリがフォーマットできない」をはてなブックマークに追加

UTCと日本時間

2010年03月24日 過去Blog
UTCの0時を日本の時間に変換すると朝の九時(UTC + 9時間)。 UTC Wednesday, 24 March 2010, 00:00:00 ↓↓↓↓↓↓ Kyoto (Japan) Wednesday, 24 March 2010, 09:00:00 UTC+9 hours
「UTCと日本時間」をはてなブックマークに追加

tableViewに関する覚え書き

2011年01月03日 過去Blog
tableView に関する設定の説明です。 テーブル内のセクション数を設定する 以下の例では、2つのセクションをもつテーブルになります。 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } セクション内の行数を指定する 以下の例では、最初のセクションは、2行のデータを表示し、次のセクションでも2行のデータを表示します。…
「tableViewに関する覚え書き」をはてなブックマークに追加

PHP 配列から空要素を削除する

2010年06月08日 過去Blog
以下のように実行することで、配列内から空要素を削除することが出来ます。 //空要素を削除 $link_accept_list = array_merge(array_diff($link_accept_list, array("")));
「PHP 配列から空要素を削除する」をはてなブックマークに追加

WHOIS pending delete から 取得可能になるまで

2010年03月24日 過去Blog
中古ドメインを探す際、whois の pending delete 表示から取得可能になるまでの期間は5日間? …
「WHOIS pending delete から 取得可能になるまで」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy