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


ピックアップ記事

iPadでiOS Dev Center内のリファレンスを見ると(^^)

2011年01月08日 過去Blog
iPad用に最適化されていて、とても使いやすくなっています(^_^) 私は、さっき気付いたんですが、既にご存知の方も多いのかもしれませんが、、、(^_^;)…
「iPadでiOS Dev Center内のリファレンスを見ると(^^)」をはてなブックマークに追加

PEARインストール

2010年04月03日 過去Blog
PEARインストール # yum -y install php-pear PEARのバージョンを確認 # pear -V
「PEARインストール」をはてなブックマークに追加

xcodeでメモリリークを簡単に調べる方法

2011年03月03日 過去Blog
以下のサイトにあるようなことが出来るらしい。 http://www.lastday.jp/2011/03/01/memory-leak-xcod やったことないので、今度やってみようと思います。
「xcodeでメモリリークを簡単に調べる方法」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy