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


ピックアップ記事

[2]:Interface Builder のみで Hello World

2010年11月19日 過去Blog
前回は、UITableViewを使って”HelloWorld”を表示しましたが、今回は、Interface Builderを使って、コードを書かずに"HelloWorld"を表示させてみます。 非常に簡単なアプリではありますが、Interface Builderを理解する最初のステップです。 今回の流れ: View Based Projectの新規作成 iPhone シュミレータで確認 UIの要素をホーム画面に追加 コードを実行 …
「[2]:Interface Builder のみで Hello World」をはてなブックマークに追加

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

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

ユーザーエージェントを調べる方法

2009年11月24日 過去Blog
ユーザーエージェントを調べる方法 javascript:alert(navigator.userAgent) http://katozyun.web.fc2.com/urawaza/ua02.html http://somethinweb.jp/test123/useragent.php また,UAは以下のサイトでも確認することができます. * 診断くん:http://www.t…
「ユーザーエージェントを調べる方法」をはてなブックマークに追加

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

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

デバイス&シミュレータ上に表示されるアプリ名を設定する

2010年12月17日 過去Blog
iPhoneアプリを作成し、シミュレータおよび、デバイスで実行した時に、ホーム画面上に実行したアプリがインストールされます。 その際のアプリ名は、デフォルトでは、該当アプリのプロジェクト名がそのままアプリ名となりホーム画面上に表示されることになります。 その名称の変更は以下の手順で可能です。 XcodeのResourcesフォルダ内にあるInfo,plistを開く。 各種設定内容がリスト…
「デバイス&シミュレータ上に表示されるアプリ名を設定する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy