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 アプリにアイコンを設定する」をはてなブックマークに追加

php フォームのPOST送信で配列を扱う場合

2010年04月15日 過去Blog
htmlのフォーム内のcheckboxなどで、配列を扱いたい場合は、以下のように name 属性に [] をつけます。これで配列として扱えます。 <input type="checkbox" name="item[]" value=""> <input type="checkbox" name="item[]" value=""> <input type="checkbox" n…
「php フォームのPOST送信で配列を扱う場合」をはてなブックマークに追加

iPhone メッセージの移動ができません

2011年01月19日 過去Blog
またまた、i.softbank.jpのメールでエラーが出ました。 以下のようなアラートが表示され、送信済メッセージが削除出来ません。 メッセージの移動ができません このメッセージはメールボックス"ゴミ箱"へ移動できません。 …
「iPhone メッセージの移動ができません」をはてなブックマークに追加

Xcode 4 移行ガイド

2011年03月22日 過去Blog
http://sazameki.jp/translations/xcode4/IDEs/Conceptual/Xcode4TransitionGuide/ atlanta insurance how to loose weight…
「Xcode 4 移行ガイド」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy