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


ピックアップ記事

PHP 配列から空白要素を削除する

2010年02月20日 過去Blog
配列 $array_exampleの要素のなかで、空白のものを削除。 $array_example = array_filter($array_example, 'strlen');
「PHP 配列から空白要素を削除する」をはてなブックマークに追加

zencartを「アップグレード・移行」する際の「やり方・注意点」

2009年11月18日 過去Blog
zencart1.2系から1.3系へのアップグレードおよび、移行作業は大変な労力が必要になります。 アップグレードも移行も基本的には同じだと思うので、移行作業をするものとして説明します。 …
「zencartを「アップグレード・移行」する際の「やり方・注意点」」をはてなブックマークに追加

iOS SDK 4.2でdns.soが読み込めないエラー

2011年01月13日 過去Blog
実機でアプリをテストする際にデバッガ上に以下のようなエラーが頻発します。 原因を調べてみるとどうやら、無視して良いエラーのようですが、どうも気持ちが悪いですね。。 warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/li…
「iOS SDK 4.2でdns.soが読み込めないエラー」をはてなブックマークに追加

php でIPアドレスを取得

2010年02月03日 過去Blog
// IPアドレスを取得して変数にセットする $ipAddress = $_SERVER["REMOTE_ADDR"];
「php でIPアドレスを取得」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy