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 POSTチェック

2011年05月15日 過去Blog
http://www.sakura-pc.jp/php/02020000.shtml
「PHP POSTチェック」をはてなブックマークに追加

phpでwhois情報の取得

2009年12月26日 過去Blog
Net_Whois::query() – whois 問い合わせを実行する pear install Net_Socket pear install Net_Whois もし、「WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update」 という警告が出る場合は、以下を実行して、pear.php.netをアップデートします。 # pear channel-update pear.php.net 私の場合は、警告は出ましたが、アップグレードしなくても pear install Net_Socket pear install Net_Whois のインストールは完了しました。 …
「phpでwhois情報の取得」をはてなブックマークに追加

zencart フッター部のzencartサイトへのリンク、コピーライトの変更

2010年06月29日 過去Blog
includes/languages/japanese.php 内の「FOOTER_TEXT_BODY」を変更する。 その他、デフォルトで設定されている日本語の設定はこのファイル内の項目を修正する。 pure perfect green coffee contains 50% chlorogenic acid…
「zencart フッター部のzencartサイトへのリンク、コピーライトの変更」をはてなブックマークに追加

SQLiteのデータベースからデータを取り出す

2010年12月09日 過去Blog
このチュートリアルでは、SQLiteを使ったデータベースを外部で作成し、XCodeプロジェクトに読み込んで、データを取り出す方法を説明します。 サンプルとして、おみくじアプリを作成してみましょう。 …
「SQLiteのデータベースからデータを取り出す」をはてなブックマークに追加

php Fatal error: Cannot redeclare phpでのエラー

2009年12月07日 過去Blog
今回RSSを取り出すのに使っていた「MagpieRSS」を以下のように使っていたのですが、 include ('rss_fetch.inc'); require_once 'code_table.ucs2jis'; require_once 'jcode.php'; 繰り返し処理を行おうとしたところ、Fatal error: Cannot redeclare phpでのエラーとういうエラーが出…
「php Fatal error: Cannot redeclare phpでのエラー」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy