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


ピックアップ記事

zencart ダウンロード商品の登録方法

2010年06月30日 過去Blog
以下のサイトを参考にすれば、ダウンロード商品の登録が出来ました。 http://zencart-pro.com/help/node/180
「zencart ダウンロード商品の登録方法」をはてなブックマークに追加

WordPressのテーマ追加

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

UITextField と UITextView のキーボード関連

2011年04月28日 過去Blog
http://www.toyship.org/2011/03/uitextfielduitextview%E3%81%AE%E6%96%87%E5%AD%97%E5%85%A5%E5%8A%9B%E3%81%A7%E8%A6%9A%E3%81%88%E3%81%A6%E3%81%8A%E3%81%8F%E3%81%A8%E4%BE%BF%E5%88%A9%E3%81%AA%E3%81%93%E3%…
「UITextField と UITextView のキーボード関連」をはてなブックマークに追加

超簡単にキャベツの臭みをとる!

2010年07月22日 過去Blog
超簡単にキャベツの臭みをとる!
WEBとは全然関係ない話題ですが、お店などで出てくる生のキャベツは臭みもなく美味しく食べれるのですが、生のキャベツを家庭で食べようとすると、どうしても臭みがあるので、どうしたものかと調べていると簡単に解決出来る方法がありましたので、メモしておこうと思います。 方法は本当に簡単で、、、、、 「冷水にさらす」 ・・・以上で簡単にキャベツの臭みがなくなりました。 以下のサイトには…
「超簡単にキャベツの臭みをとる!」をはてなブックマークに追加

tableViewに関する覚え書き

2011年01月03日 過去Blog
tableView に関する設定の説明です。 テーブル内のセクション数を設定する 以下の例では、2つのセクションをもつテーブルになります。 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } セクション内の行数を指定する 以下の例では、最初のセクションは、2行のデータを表示し、次のセクションでも2行のデータを表示します。…
「tableViewに関する覚え書き」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy