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


ピックアップ記事

UITableView のcellの複数選択を実装する

2011年01月25日 過去Blog
//セルが選択された際に呼び出される - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //選択されたセルを取得 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; /…
「UITableView のcellの複数選択を実装する」をはてなブックマークに追加

テーブルの背景を設定する

2010年12月14日 過去Blog
iPhoneアプリに設置されているテーブルの背景色を変更する方法です。 //テーブルの背景色 self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; 文字列の設定と同様に、以下のような記述も可能です。 self.view.backgroundColor = [UIColor colorWithRed:0.0 gre…
「テーブルの背景を設定する」をはてなブックマークに追加

iphoneアプリ開発の備忘録

2010年11月19日 過去Blog
iphoneアプリの開発に着手したので備忘録設置しました。 私自身、分からないことだらけのiphone開発ですが、同じような境遇の方にとって少しでも参考になれば、うれしいですが、現時点では、参考になれそうな記事を書ける自信なし。。。(汗 iphoneアプリ開発が脚光を浴びて、それなりに時間が経っていますが、未だに日本語での情報は少ないので、自分が勉強していく上で役に立った情報や、海外のチュート…
「iphoneアプリ開発の備忘録」をはてなブックマークに追加

UITextView キーボード処理

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

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

2010年12月10日 過去Blog
この記事はタイトルの通り「SQLiteを使ってToDoリストアプリを作成」の第三部になるので、前回までの記事を既に読んでくださっている方を対象にしています。 [6]:SQLiteを使ってToDoリストアプリを作成(1) [7]:SQLiteを使ってToDoリストアプリを作成(2) このチュートリアルのメインは、選択されたtodoアイテムを表示することです。todoステータスを更新する方法も扱います。 …
「[8]:SQLiteを使ってToDoリストアプリを作成(3)」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy