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


ピックアップ記事

フォームの送信ボタンを画像にする

2010年04月16日 過去Blog
<input type="image" src="画像のURL" onClick="submit"/> best web hosting USA…
「フォームの送信ボタンを画像にする」をはてなブックマークに追加

HTML フォームのinputボタンを押せないようにする

2010年06月11日 過去Blog
disabled="disabled" を追加する。 [php]<input type="submit" name="button" id="button" value="申請内容の確認画面へ" disabled="disabled"/>[/php] 上記のように書くこ…
「HTML フォームのinputボタンを押せないようにする」をはてなブックマークに追加

UIDatePicker + UIActionSheet で日付選択が面を作成

2011年05月03日 過去Blog
http://stackoverflow.com/questions/349858/fitting-a-uidatepicker-into-a-uiactionsheet 上記サイトの一番したのコメント内のコードが正常に動きます。 showInViewで設定するviewは以下のサイトを参考に http://d.hatena.ne.jp/griffin-stewie/20090220/p1
「UIDatePicker + UIActionSheet で日付選択が面を作成」をはてなブックマークに追加

WordPressのURL(パーマリンクの設定)

2009年11月20日 過去Blog
当サイトの記事は「http://yamazon.org/zencart/76」といったURLになっていますが、このように「ドメイン名/カテゴリ名/記事ID」の階層をもったURLにするためには Wordpressの管理画面内の「設定」>「パーマリンク設定」の中の「一般的な設定」内の「カスタム構造」を選択し、「/%category%/%post_id%」と指定します。 もっと詳しいパーマリンクの使…
「WordPressのURL(パーマリンクの設定)」をはてなブックマークに追加

データベースから重複データを削除して表示する

2010年03月25日 過去Blog
重複行を除いて表示したい場合は、select distinctを使用する SELECT DISTINCT [, 列名2 ...] FROM [WHERE条件式など] ※※ は必須、[]はオプション
「データベースから重複データを削除して表示する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy