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 MySQL 2つのテーブルを縦に並べて結合(union)し、結果を抽出する

2010年03月30日 過去Blog
select c1,c2,c3 from A union all select c1,c2,c3 from B 参照元:http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1115439551 divorce lawyer san diego…
「php MySQL 2つのテーブルを縦に並べて結合(union)し、結果を抽出する」をはてなブックマークに追加

twitterの登録メールの確認がエラーになる件

2011年01月04日 過去Blog
twitterで登録メールの確認手続きを行っていた際に以下のようなエラーが出ました。 「Hold up! Sorry, the profile you were trying to view has been suspended due to strange activity 」 なにもオカしいことはしていないはずなので、困っていたのですが、原因は単純でした。 twitterのヘルプページに書い…
「twitterの登録メールの確認がエラーになる件」をはてなブックマークに追加

PHP session 破棄

2010年06月11日 過去Blog
PHPでセッションを完全に破棄する <?php // セッション変数を全て解除する $_SESSION = array(); // セッションを切断するにはセッションクッキーも削除する。 // Note: セッション情報だけでなくセッションを破壊する。 if (isset($_COOKIE[session_name()])) { setcookie(session_name(),…
「PHP session 破棄」をはてなブックマークに追加

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

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

UIDatePickerの取得する時間がずれる

2011年05月03日 過去Blog
以下のサイトを参考に [ui_picker setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; のようにすると日付の誤差はなくなりましたが、時刻の誤差はそのままでした。 http://pukapuka-ahirusan.blogspot.com/2010/11/uidatepicker.html どうやら、UIDatePicke…
「UIDatePickerの取得する時間がずれる」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy