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


ピックアップ記事

Xcode上で静的解析

2011年04月27日 過去Blog
http://www.j-love.info/natsu/iphone-app/natsus_note/dev/tips/iphonexcodebuild_and_analyze.html
「Xcode上で静的解析」をはてなブックマークに追加

PHP strstr stristr ある文字列が含まれるかどうか調べる

2010年06月11日 過去Blog
$string = 'Hello World!'; if(stristr($string, 'earth') === FALSE) { echo '"earth" not found in string'; } // 出力は "earth" not found in string となります 参照元:http://www.php.net/manual/ja/function.st…
「PHP strstr stristr ある文字列が含まれるかどうか調べる」をはてなブックマークに追加

表示領域外部(上部)にラベルを配置し、フリックにて表示させる

2010年12月17日 過去Blog
画面にテーブルビューが表示されている(XCodeテーブルテンプレート)を想定しています。以下の画像はtabBar,Navigationなど入っていますが、気にしないでください。 …
「表示領域外部(上部)にラベルを配置し、フリックにて表示させる」をはてなブックマークに追加

データベースに機種依存文字の入ったCSVデータをインポート

2010年05月19日 過去Blog
phpMyAdminにて、データベース側にインポートする際、エンコードの設定を「cp932」に設定することで、機種依存文字を文字化けせずにインポートすることが可能になります。 *今回は、機種依存文字を含むsjisのCSVをutf8のデータベースにインポートしました。 参考サイト:http://smiu2it.blog.so-net.ne.jp/2009-04-16
「データベースに機種依存文字の入ったCSVデータをインポート」をはてなブックマークに追加

[10] UITabBar での view の切り替え

2010年12月20日 過去Blog
今回は、UITabBar と UITabBarItem の使い方についてです。 UITabBar を使い、UITabBarItems や view を追加する方法です。 1. UITabBar テンプレート を使ってプロジェクトを作成 まず、タイトルの通りに XCode の UITabBar テンプレートを使って、プロジェクトを作成します。 …
「[10] UITabBar での view の切り替え」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy