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で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情報の取得」をはてなブックマークに追加

オーガナイザーからProvisioningする際にエラー

2010年12月23日 過去Blog
新しく購入したipadをオーガナイザーから、Provisioningしようとすると以下のようなエラーが出ました。 An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Support. mac上のXCodeがiOS4.1のバージョンだったため、…
「オーガナイザーからProvisioningする際にエラー」をはてなブックマークに追加

タグが勝手に表示されてしまう。

2009年11月27日 過去Blog
phpでURLを取得し、自動でリンクを貼るプログラムを作っていたのですが、その際に自動で生成されるリンクが以下のようになり、正常に表示されません。 http://www.example.org/site/<wbr>testtest/php.html <wbr>というのは、長いURLや長い英数字の羅列をホームページに記載すると文字列が改行されずテーブルやボックスが延々横長に表示されるのを防ぐためのタグ。 …
「タグが勝手に表示されてしまう。」をはてなブックマークに追加

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

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

エラー : fsockopen関係でエラーが出る

2009年11月25日 過去Blog
ページランク取得のプログラムをMODxやWordpress内で動かそうとすると以下のエラーが出る。 Error: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known CMSの内部ではなく、以下のようにphpファイルを直接動かすと正常…
「エラー : fsockopen関係でエラーが出る」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy