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 配列を展開する foreach

2010年06月08日 過去Blog
foreachで、配列を展開する foreach ($array as $key => $val) { echo $key ; echo $val; }
「PHP 配列を展開する foreach」をはてなブックマークに追加

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と日本時間」をはてなブックマークに追加

linux サーバのバックアップ箇所

2010年04月06日 過去Blog
■データベース関連 phpmyadmin データベース ■ユーザドキュメント関連 /home/ 内 ■ユーザ関連 /etc/passwd /etc/shadow /etc/group ■サーバ設定 /etc/ 内 バーチャルホストやvsftp,httpd関連の設定 メール関連の設定 buy valium roche…
「linux サーバのバックアップ箇所」をはてなブックマークに追加

[7.5] iPhoneアプリに背景画像を設置する

2010年12月06日 過去Blog
iPhoneアプリの背景に独自の画像をいれたい場合の説明です。デフォルトのままでも特に気にならない方も多いかもしれませんが、少し味気ないので、背景を設定してみましょう。 …
「[7.5] iPhoneアプリに背景画像を設置する」をはてなブックマークに追加

ページランク更新

2010年01月04日 過去Blog
新年あけましておめでとうございます。 新年早々?ページランクの更新があったようですね。 当サイト公開後、初のページランク更新でしたが、今回の更新でページランクが1になりました。 特に、高いページランクを目指して運営してるわけではないのですが、公開してから、被リンク数やページランクがどのように推移していくのかを軽く把握したいと思う気持はあるので、今回の更新は、ちょっとだけレベルアップしたような…
「ページランク更新」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy