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


ピックアップ記事

Mapkit タップされたannotationのタイトルなど詳細を取得

2011年04月27日 過去Blog
- (void)mapView:(MKMapView*)mapView annotationView:(MKAnnotationView*)view calloutAccessoryControlTapped:(UIControl*)control メソッドでタップされたannotationのタイトルなど詳細を取得 http://iphone-app-developer.seesaa.ne…
「Mapkit タップされたannotationのタイトルなど詳細を取得」をはてなブックマークに追加

UITableView + UITexeField

2011年04月29日 過去Blog
TableView cellにTextFieldを表示させる 試してませんが、UITextView,UILabelなども同様の方法でいける気がします。 http://d.hatena.ne.jp/lynk/20090128#1233143275 http://code.google.com/p/iphone-codes/source/browse/EditableCell/?r=0a9142…
「UITableView + UITexeField」をはてなブックマークに追加

AVIファイルからSWF作成 MotionSWF

2010年10月07日 過去Blog
AVIからSWFファイルに変換する際に便利なソフト MotionSWF http://www.vector.co.jp/soft/dl/win95/art/se226046.html vps…
「AVIファイルからSWF作成 MotionSWF」をはてなブックマークに追加

iphoneアプリ開発に役立つリンク集

2010年11月19日 過去Blog
iOS Reference Library 日本語に翻訳されたiOSのドキュメントです。 スタンフォードiPhone Application Programming アップルの現役社員による講義(スタンフォード大学の授業)が見られます。 iPhone Application Programming Course (CS 193P) 2010 Winter 講義動画…
「iphoneアプリ開発に役立つリンク集」をはてなブックマークに追加

Mac OSX ターミナルを起動 hosts設定

2010年10月14日 過去Blog
最近、iphoneアプリ開発のためにMacを触ることが増えたのですが、Windowsでは簡単にできることもMacでは、なかなか思うようにできません。。。。 同じような思いをしている方も多いのでは?と思うので、初歩的なことからいろいろとメモしておきます。 ■ターミナルをキーボードから起動させる まず、ターミナルの起動(Windowsでいうコマンドプロンプト)のショートカット? ctrl + …
「Mac OSX ターミナルを起動 hosts設定」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy