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


ピックアップ記事

WordPressでログイン中のユーザーIDを取得

2011年05月16日 過去Blog
Wordpressでログイン中のユーザーIDを取得 global $userdata; get_currentuserinfo(); echo $userdata->ID; migraine remedies…
「WordPressでログイン中のユーザーIDを取得」をはてなブックマークに追加

[7.5] iPhoneアプリに背景画像を設置する

2010年12月06日 過去Blog
iPhoneアプリの背景に独自の画像をいれたい場合の説明です。デフォルトのままでも特に気にならない方も多いかもしれませんが、少し味気ないので、背景を設定してみましょう。 …
「[7.5] iPhoneアプリに背景画像を設置する」をはてなブックマークに追加

Apacheの負荷軽減

2010年03月31日 過去Blog
Apacheのチューニングについて。 今のところ、大丈夫かなと思いますが、いずれ試してみようと思います。 http://tech.bayashi.net/svr/doc/apache/tune.html hostingreviewssite.com
「Apacheの負荷軽減」をはてなブックマークに追加

mac で windows キーボードのhome、 end

2010年10月14日 過去Blog
windowsでは細かいところでキーボードのhomeボタン、endボタンを使うことが多かったのですが、Macでは、どうすればいいのか。。。 cmd + 矢印キーで実現できました。 cmd+shift+矢印で選択できます。 参考サイト http://firstmac.blogspot.com/2007/06/home.html
「mac で windows キーボードのhome、 end」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy