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


ピックアップ記事

tabBar内にABPeoplePickerNavigationControllerを表示させる

2011年01月17日 過去Blog
もともと入っている電話アプリなんかは、タブバーを選択すると連絡先が表示されるようになっていますが、それを実装するために、いろいろ試行錯誤してみましたが、以下のようにすることで、実装出来ました。 この件に関しては、あまり、情報がなかった(モーダルビューにpickerを表示させる例は多々ありましたが・・・)ので、スマートな方法かどうかは不明ですので、もし、もっとスマートな方法をご存知の方がいらっしゃいましたら、是非コメントください。…
「tabBar内にABPeoplePickerNavigationControllerを表示させる」をはてなブックマークに追加

xreaサーバ phpMyAdminへのログイン

2010年08月26日 過去Blog
二段階で認証があって毎回忘れてしまうので、メモ。。。 最初の認証は、xreaのデータベース画面下の方にある 「ページ入室の際はログ閲覧画面の認証パスワード(ユーザー名:****,パスワード:@@@@)をご利用下さい。」 の箇所の通り入力。 phpMyAdminの認証は使いたいデータベース名とそのパスワード。 ポップ認証 ユーザー名:userID,パスワード:wpec(4文字) ウェブ認証 …
「xreaサーバ phpMyAdminへのログイン」をはてなブックマークに追加

linux : chomod,chown パーミッション変更

2009年11月27日 過去Blog
chown USER_NAME /DIR_PATH/ chown USER_NAME -R /DIR_PATH/ -Rをつけることで指定ディレクトリ以下の全てのディレクトリ、ファイルの所有者を変更します。 physical therapy chicago…
「linux : chomod,chown パーミッション変更」をはてなブックマークに追加

.htaccess の落とし穴

2010年04月14日 過去Blog
落とし穴ってほとではありませんが、少しハマってしまったので、恥ずかしながらメモ・・・。 あるサイトをつくっていたのですが、トップページを表示するたびにベーシック認証の画面が表示されるので、おかしいなぁと思い、それを解決しようとサーバ内を調べていました。 もともと .htaccess を置く必要がないディレクトリなので、サーバ上には、そんなファイルはありませんでした。 絶対に認証は、かけていない!…
「.htaccess の落とし穴」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy