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


ピックアップ記事

iPhone アプリにアイコンを設定する

2010年12月09日 過去Blog
自作のiPhoneアプリにアイコンを設定する方法です。 まず、アイコンに使いたい画像を準備します。 画像サイズ 57px × 57px アイコン画像の設定 (1)プロジェクト内のResourceフォルダを右クリックし、既存のファイルを追加を選びます。そして、準備しておいた画像を選択、このとき表示される画面ないの「デスティネーション...」の項目をチェックし、追加します。 (2)その後、プロジ…
「iPhone アプリにアイコンを設定する」をはてなブックマークに追加

UITextView キーボード処理

2011年05月01日 過去Blog
http://d.hatena.ne.jp/keitanxkeitan/20110117/1295276262
「UITextView キーボード処理」をはてなブックマークに追加

PHP フォームの処理

2010年04月17日 過去Blog
# stripcslashes() ---- C言語と同様にバックスラッシュでクォートされた文字列を元に戻す # htmlentities() ---- 適用可能な文字を全てHTML エンティティに変換する # nl2br() ---- 改行文字の前にHTMLの改行タグを挿入する # strip_tags() ---- 文字列からHTMLタグ、および PHPタグを取り除く …
「PHP フォームの処理」をはてなブックマークに追加

PHPで画像をランダム表示

2010年09月25日 過去Blog
とても丁寧に解説してくれているサイトがあったので、メモしておきます。 http://chocobit.com/2007/03/19.php Atlanta insurance recovery…
「PHPで画像をランダム表示」をはてなブックマークに追加

html、CSS テキストの自動折り返しを禁止する

2010年04月16日 過去Blog
<strong>white-space</strong> normal 標準 (初期値) nowrap 自動的な折り返しを禁止する prozac and alcohol…
「html、CSS テキストの自動折り返しを禁止する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy