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


ピックアップ記事

超簡単にキャベツの臭みをとる!

2010年07月22日 過去Blog
超簡単にキャベツの臭みをとる!
WEBとは全然関係ない話題ですが、お店などで出てくる生のキャベツは臭みもなく美味しく食べれるのですが、生のキャベツを家庭で食べようとすると、どうしても臭みがあるので、どうしたものかと調べていると簡単に解決出来る方法がありましたので、メモしておこうと思います。 方法は本当に簡単で、、、、、 「冷水にさらす」 ・・・以上で簡単にキャベツの臭みがなくなりました。 以下のサイトには…
「超簡単にキャベツの臭みをとる!」をはてなブックマークに追加

PHP 配列の要素を指定し、キーを取り出す

2010年04月14日 過去Blog
配列の要素の値から、そのキーを取り出す場合。 <?php $array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red'); $key = array_search('green', $array); // $key = 2; $key = array_search('red', $array); // $key = …
「PHP 配列の要素を指定し、キーを取り出す」をはてなブックマークに追加

php でIPアドレスを取得

2010年02月03日 過去Blog
// IPアドレスを取得して変数にセットする $ipAddress = $_SERVER["REMOTE_ADDR"];
「php でIPアドレスを取得」をはてなブックマークに追加

iPhoneの留守電設定(解除方法)

2011年01月06日 過去Blog
iPhoneの場合は、普通の携帯のように機種上の操作で留守電の設定が出来ないので、少し調べてみました。 1406 にダイヤル あとはガイダンスに従って行うだけです。 サービス番号を押して最後に#を押してください。 転送電話  呼出しありは441 転送電話  呼出しなしは442 留守番電話  呼出しありは431 留守番電話  呼出しなしは432 留守番電話、または転送電話の解除は400 今…
「iPhoneの留守電設定(解除方法)」をはてなブックマークに追加

[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