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年12月17日 過去Blog
画面にテーブルビューが表示されている(XCodeテーブルテンプレート)を想定しています。以下の画像はtabBar,Navigationなど入っていますが、気にしないでください。 …
「表示領域外部(上部)にラベルを配置し、フリックにて表示させる」をはてなブックマークに追加

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

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

[12] 再生中の曲情報を取得・表示させる

2010年12月21日 過去Blog
今回のチュートリアルは、ipod(iphone&ipad未検証)のミュージックプレイヤーで再生中の曲の情報を取り出して、表示させる方法を説明します。 …
「[12] 再生中の曲情報を取得・表示させる」をはてなブックマークに追加

iPhoneアプリ MapKitを使って地図を表示

2011年04月26日 過去Blog
落ち着き次第、MapKitの使い方を投稿したいと思いますが、とりあえず、覚え書き 参考サイト:http://blog.syuhari.jp/archives/2040 http://iphone-tora.sakura.ne.jp/mkannotationview.html UITableViewのcellに地図を表示させる方法などを書きたいなと思っています。
「iPhoneアプリ MapKitを使って地図を表示」をはてなブックマークに追加

表氏中のデスクトップ画面を動画として保存する

2010年09月04日 過去Blog
映像の編集などをしていて、ブラウザに表示中のものや、ブラウザの動きなどをそのまま動画にして利用したいなという場面がありましたので、その際に便利だなと思ったサイトをあげておきます。 特別な登録作業なども不要ですぐ利用できます。 参照元:http://japan.cnet.com/news/society/story/0,3800104748,20413709,00.htm サービスサイト:htt…
「表氏中のデスクトップ画面を動画として保存する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy