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


ピックアップ記事

UITextField を自動で入力待ち状態にする(フォーカスをあてる)方法

2010年12月26日 過去Blog
UITextField が設置されているviewが表示されたら、自動で入力待ち状態にする方法です。 - (void)viewDidLoad { [super viewDidLoad]; [textField becomeFirstResponder]; } new york limo…
「UITextField を自動で入力待ち状態にする(フォーカスをあてる)方法」をはてなブックマークに追加

mysqlデータの移行

2010年04月03日 過去Blog
こんなことが起こってはいけないのですが、、、、 昨日、サーバでsudo関連のプログラムをfedoraサーバでテストしてたのですが、その際に、誤って、想定してないような値を渡してしまい、サーバ上のディレクトリやファイルのパーミッションがおかしなことになってしまいました。 rootでもログイン出来なくなってしまい、全てがおかしくなったのか、部分的におかしくなったのかも把握できず、とりあえず、初期化…
「mysqlデータの移行」をはてなブックマークに追加

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

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

ページランク更新

2010年01月04日 過去Blog
新年あけましておめでとうございます。 新年早々?ページランクの更新があったようですね。 当サイト公開後、初のページランク更新でしたが、今回の更新でページランクが1になりました。 特に、高いページランクを目指して運営してるわけではないのですが、公開してから、被リンク数やページランクがどのように推移していくのかを軽く把握したいと思う気持はあるので、今回の更新は、ちょっとだけレベルアップしたような…
「ページランク更新」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy