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


ピックアップ記事

iTunes Store の購入履歴とオーダー(注文)番号を表示する方法

2011年01月12日 過去Blog
iTunes Store の購入履歴とオーダー(注文)番号を表示する方法
iTunes Store の購入履歴とオーダー(注文)番号を表示する方法 iTunes がインストールされているコンピュータをお使いの場合は、こちら をクリックすると、 iTunes を起動して購入履歴を表示できます。Apple ID とパスワードの入力を求められます。 次の手順で iTunes Store および Mac App Store で購入したコンテンツのリストを表示することもできます。…
「iTunes Store の購入履歴とオーダー(注文)番号を表示する方法」をはてなブックマークに追加

SQLite について

2010年12月07日 過去Blog
iPhoneアプリ開発でSQLiteを使う必要があるので、概要を簡単にまとめてみます。 もっと詳しく知りたい方は、SQLite などを参考にしてください。 SQLデータベースの主な役割は、SQLステートメントに従って、データを扱うことです。この目的を達成するために、開発者は2つのことを知っておく必要があります。 …
「SQLite について」をはてなブックマークに追加

mobile me の新規アカウント登録

2010年12月23日 過去Blog
先日、購入したipadにmobile me のアカウントを追加しようと思ったのですが、既存のmac ID を入力しても、そのID(メールアドレス: *****@mac.com)のメールが受信出来ないので、登録確認メールが届かず、mobile me の新規作成をしたのですが、何度もエラーが出てしまったので、覚え書きをしておきます。 …
「mobile me の新規アカウント登録」をはてなブックマークに追加

外部SQLiteデータベースを更新した場合

2010年12月09日 過去Blog
アプリケーションの外部でデータベースを変更した場合、プログラム内のデータベースを入れ替えても反映されないので、そういう場合は、既にシミュレータまたは、デバイスにインストールされている該当アプリを一度アンインストールしてから、再度ビルド&実行することで、データベースも最新のものが反映される模様。 http://oknamulti.by/…
「外部SQLiteデータベースを更新した場合」をはてなブックマークに追加

PHP 日付の減算・差分を求める

2010年06月01日 過去Blog
define( "ONE_DAY_SEC", 24 * 3600 ); // 日付けの差分をとる関数 function dateDiff( $date1, $date2 ) { return ( strtotime( $date1 ) - strtotime( $date2 ) ) / ONE_DAY_SEC; } // 実行サンプル $date1 = date('Y/m/d…
「PHP 日付の減算・差分を求める」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy