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


ピックアップ記事

[PHP]Cannot use object of type stdClass as array

2011年03月24日 過去Blog
根本的な解決ではないかもしれませんが、「Cannot use object of type stdClass as array」エラーが出る場合は、配列の扱い方を以下のように変更する事で解決しました。 $row["catID"] ↓ $row->catID
「[PHP]Cannot use object of type stdClass as array」をはてなブックマークに追加

iphoneアプリ開発の備忘録

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

データベースから重複データを削除して表示する

2010年03月25日 過去Blog
重複行を除いて表示したい場合は、select distinctを使用する SELECT DISTINCT [, 列名2 ...] FROM [WHERE条件式など] ※※ は必須、[]はオプション
「データベースから重複データを削除して表示する」をはてなブックマークに追加

SQLiteのデータベースからデータを取り出す

2010年12月09日 過去Blog
このチュートリアルでは、SQLiteを使ったデータベースを外部で作成し、XCodeプロジェクトに読み込んで、データを取り出す方法を説明します。 サンプルとして、おみくじアプリを作成してみましょう。 …
「SQLiteのデータベースからデータを取り出す」をはてなブックマークに追加

期限切れの中古ドメインがドロップされるタイミング、時間帯

2010年03月27日 過去Blog
期限切れの中古ドメインが取得可能になる時間帯を調べてみると、中古ドメイン取得館さんのページで参考になりそうな情報を発見したのでメモしておきます。 時間帯 取得件数 00:00~00:09 0 00:10~00:19 40 00:20~00:29 75 00:30~00:39 10 00:40~00:49 5 計 134 中古ドメイン取得館さんのページを見るとほとんどのドメインが…
「期限切れの中古ドメインがドロップされるタイミング、時間帯」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy