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


ピックアップ記事

[12] 再生中の曲情報を取得・表示させる

2010年12月21日 過去Blog
今回のチュートリアルは、ipod(iphone&ipad未検証)のミュージックプレイヤーで再生中の曲の情報を取り出して、表示させる方法を説明します。 …
「[12] 再生中の曲情報を取得・表示させる」をはてなブックマークに追加

NSAssert,NSAssert2

2011年04月13日 過去Blog
NSAssert 指定した条件が間違っていればlogに文字列を書き込む NSAssert2 指定した条件が間違っていればlogに引数2つの文字列を書き込む http://www.oomori.com/cocoafw/Foundation/NSAssert2/NSAssert2.html free raspberry ketones…
「NSAssert,NSAssert2」をはてなブックマークに追加

デジカメのメモリやUSBメモリのデータを誤って削除、フォーマットしてしまった場合の復元方法

2010年10月07日 過去Blog
以下のフリーソフトで復元できました。 http://www.powerdatarecovery.com/ 日本の有料の物も試してみましたが、上記の無料のソフトのほうが精度が高かったです。 anabolic pharma - your personal online pharmacy store…
「デジカメのメモリやUSBメモリのデータを誤って削除、フォーマットしてしまった場合の復元方法」をはてなブックマークに追加

PHPでサイトのタイトルを取得

2010年03月30日 過去Blog
参照元:http://creazy.net/2008/05/php_get_page_title_sample.html how to cure depression…
「PHPでサイトのタイトルを取得」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy