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


ピックアップ記事

デジカメのメモリやUSBメモリのデータを誤って削除、フォーマットしてしまった場合の復元方法

2010年10月07日 過去Blog
以下のフリーソフトで復元できました。 http://www.powerdatarecovery.com/ 日本の有料の物も試してみましたが、上記の無料のソフトのほうが精度が高かったです。 anabolic pharma - your personal online pharmacy store…
「デジカメのメモリやUSBメモリのデータを誤って削除、フォーマットしてしまった場合の復元方法」をはてなブックマークに追加

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

2010年12月01日 過去Blog
このブログのチュートリアルを順に読み進めてくださった方なら、このチュートリアルがUITableVIewを優先的に取り組んできたことをご存知かと思います。 この理由としては、多くのアプリケーションが、このシンプルなコントロールを使って開発されているからです。 今回はUITableViewの最後のチュートリアルとして、今までのチュートリアルで学んできたことをすべて使い、SQLiteの技術を追加し、ToDoリストを作成していきます。 また、多くの機能を持ったテーブルセルを追加し、iPhoneが提供している他のコントロールについても学んでいきます。 過去の記事を既読の方を想定していますので、まだの方は、そちらの記事に先に目を通されることをおすすめします。 このチュートリアルは、いくつかのシリーズから成り立つので、過去の記事に比べ少し長くなります。この最初のチュートリアルで学ぶことは以下です。 今回学ぶこと: Navigation-Based Application の新規作成 データベースの作成 プロジェクトにデータベースの追加 SQLite3のフレームワークを追加 ToDoクラスのオブジェクトの作成 データベースの初期化 …
「[6]:SQLiteを使ってToDoリストアプリを作成(1)」をはてなブックマークに追加

UITextView キーボード処理

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

オーガナイザーからProvisioningする際にエラー

2010年12月23日 過去Blog
新しく購入したipadをオーガナイザーから、Provisioningしようとすると以下のようなエラーが出ました。 An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Support. mac上のXCodeがiOS4.1のバージョンだったため、…
「オーガナイザーからProvisioningする際にエラー」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy