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


ピックアップ記事

iPhoneアプリのメモリリークを検証する方法

2011年01月06日 過去Blog
この記事に関しては、未完結ですが、覚え書きとして、随時追加していきます。 以下のような方法があるらしい。 Instruments XCodeのメニューの「実行」→「パフォーマンスツールを使って開始」→「Leaks」を選択して、「Instruments」 Allocations Xcodeからは「実行」メニューの「パフォーマンスツールを使って実行」から利用することができます。 Xcodeでローカ…
「iPhoneアプリのメモリリークを検証する方法」をはてなブックマークに追加

Ushahidi API の使用方法

2011年04月08日 過去Blog
http://wiki.ushahidi.com/doku.php?id=ushahidi_api(英語版) http://wiki.ushahidi.com/doku.php?id=ushahidi_api_jp (日本語版) web hosting reviews…
「Ushahidi API の使用方法」をはてなブックマークに追加

Drupal 7 のインストール

2011年04月22日 過去Blog
以下のインストール方法を参考にDrupal 7 のインストールに挑戦してみます。 Drupal 7 のインストール方法(英語) Step 1: ダウンロード 以下のサイトからダウンロードします。今回はzipファイルを選択。 latest version of Drupal 7. ダウンロードしたパッケージを解答し、FTPでサーバ上にまるごとアップします。 Step 2: データベース作成…
「Drupal 7 のインストール」をはてなブックマークに追加

フォームの送信ボタンを画像にする

2010年04月16日 過去Blog
<input type="image" src="画像のURL" onClick="submit"/> best web hosting USA…
「フォームの送信ボタンを画像にする」をはてなブックマークに追加

モーダルビューとは?

2011年01月13日 過去Blog
モーダルビューとは、一時的なビューのことで、animated : Yes にすると、下の方からニョロっと出てきます。 [self presentModalViewController:picker animated:YES];
「モーダルビューとは?」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy