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


ピックアップ記事

UITableView cell の選択を無効にする

2011年04月28日 過去Blog
cell.selectionStyle = UITableViewCellSelectionStyleNone;
「UITableView cell の選択を無効にする」をはてなブックマークに追加

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

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

[1]:UITableViewでHelloWorldを表示させる

2010年11月19日 過去Blog
今回のチュートリアルでは、UITableViewを使って簡単なアプリケーションを構築します。 おなじみの"HelloWorld"を表示させるアプリです。 このチュートリアルでは、Objective-Cの基礎を習得済の方を想定しています。 今回学ぶこと: Navigation-Based Applicationの新規作成 デフォルト状態で構成されてるファイル群について "HelloWorld"を表示するため、UITableViewのセルの変更 …
「[1]:UITableViewでHelloWorldを表示させる」をはてなブックマークに追加

phpで処理を遅延させてから実行する。

2009年12月26日 過去Blog
phpで少し時間をおいてから処理を実行したい場合は、sleepを使います。 例) [php]<?php echo "最初の処理"; //3秒後に実行 sleep(3); //処理再開 echo "遅延後の処理"; ?>[/php]
「phpで処理を遅延させてから実行する。」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy