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


ピックアップ記事

seo:ブラックハット的な被リンク獲得方法

2009年11月18日 過去Blog
seo:ブラックハット的な被リンク、Googleページランク獲得方法 wordpress website templates…
「seo:ブラックハット的な被リンク獲得方法」をはてなブックマークに追加

UITextField を自動で入力待ち状態にする(フォーカスをあてる)方法

2010年12月26日 過去Blog
UITextField が設置されているviewが表示されたら、自動で入力待ち状態にする方法です。 - (void)viewDidLoad { [super viewDidLoad]; [textField becomeFirstResponder]; } new york limo…
「UITextField を自動で入力待ち状態にする(フォーカスをあてる)方法」をはてなブックマークに追加

ネット未接続のipadにテキストデータを送信する方法

2011年01月03日 過去Blog
新年あけましておめでとうございます。 昨年末から、突然、着手したiPhoneアプリ開発ですが、しっかり勉強して、今年はもっともっと有益な記事が書ければいいなと思っております。 といいながら、今回は、iPhoneアプリに無関係で、あまり役立つ記事ではないかもしれませんが、一応メモしておきます。 ネット未接続のipadにテキストデータを送信する方法:メモ帳の同期 iPadには、ソフトバンクの携帯…
「ネット未接続のipadにテキストデータを送信する方法」をはてなブックマークに追加

fedora で Firefoxがオフラインモードで起動してしまう場合の対処

2010年04月10日 過去Blog
NICをNetworkMangerで管理しない場合 NetworkMangerサービスを無効にする。 % sudo service NetworkManager stop % sudo chkconfig --del NetworkManager networkサービスを有効にする。 % sudo chkconfig --level 2345 network on % sudo chkcon…
「fedora で Firefoxがオフラインモードで起動してしまう場合の対処」をはてなブックマークに追加

[7]:SQLiteを使ってToDoリストアプリを作成(2)

2010年12月03日 過去Blog
このチュートリアルは、タイトルの通り、SQLiteを使ってToDoリストアプリを作成の二回目の記事です。前回の記事を読んでない方は、そちらから読んでください。 今回は、SQLデータをUITableViewで表示するだけでなく、画像や文字列を使った複合的なカラムの作成を行います。今回のチュートリアルでは、以下の画像を使いますので、ダウンロードしてください。 優先度:高 優先度:普通 優先度:低 これらの画像は、優先度を表示するのに使います。 …
「[7]:SQLiteを使ってToDoリストアプリを作成(2)」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy