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


ピックアップ記事

linux サーバのバックアップ箇所

2010年04月06日 過去Blog
■データベース関連 phpmyadmin データベース ■ユーザドキュメント関連 /home/ 内 ■ユーザ関連 /etc/passwd /etc/shadow /etc/group ■サーバ設定 /etc/ 内 バーチャルホストやvsftp,httpd関連の設定 メール関連の設定 buy valium roche…
「linux サーバのバックアップ箇所」をはてなブックマークに追加

WordPressでログイン中のユーザーIDを取得

2011年05月16日 過去Blog
Wordpressでログイン中のユーザーIDを取得 global $userdata; get_currentuserinfo(); echo $userdata->ID; migraine remedies…
「WordPressでログイン中のユーザーIDを取得」をはてなブックマークに追加

WordPressのテーマ追加

2009年11月19日 過去Blog
今回、このサイトを立ち上げるにあたって、wordpressをインストールしたわけですが、管理画面からテーマを適用しようとしたのですが、サーバへのFTP接続でエラーが出ました。 以前、違うブログで利用した時には、管理画面から簡単にテーマのインストールが完了したのですが、今回はサーバが違うので、サーバ環境に依存するエラーのような気がします。 とりあえず、大した問題ではないので、手っ取り早くテーマを…
「WordPressのテーマ追加」をはてなブックマークに追加

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

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

PHP 配列から空白要素を削除する

2010年02月20日 過去Blog
配列 $array_exampleの要素のなかで、空白のものを削除。 $array_example = array_filter($array_example, 'strlen');
「PHP 配列から空白要素を削除する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy