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 と UITextView のキーボード関連

2011年04月28日 過去Blog
http://www.toyship.org/2011/03/uitextfielduitextview%E3%81%AE%E6%96%87%E5%AD%97%E5%85%A5%E5%8A%9B%E3%81%A7%E8%A6%9A%E3%81%88%E3%81%A6%E3%81%8A%E3%81%8F%E3%81%A8%E4%BE%BF%E5%88%A9%E3%81%AA%E3%81%93%E3%…
「UITextField と UITextView のキーボード関連」をはてなブックマークに追加

ドット・ストライプなど背景画像作成

2011年01月26日 過去Blog
ドット背景 http://www.pixelknete.de/dotter/index.php ストライプ背景 http://www.stripegenerator.com/ その他(タータン柄) http://www.tartanmaker.com/ atlanta plastic surgery when to take omega 3…
「ドット・ストライプなど背景画像作成」をはてなブックマークに追加

テーブルの背景を設定する

2010年12月14日 過去Blog
iPhoneアプリに設置されているテーブルの背景色を変更する方法です。 //テーブルの背景色 self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; 文字列の設定と同様に、以下のような記述も可能です。 self.view.backgroundColor = [UIColor colorWithRed:0.0 gre…
「テーブルの背景を設定する」をはてなブックマークに追加

モーダルビューとは?

2011年01月13日 過去Blog
モーダルビューとは、一時的なビューのことで、animated : Yes にすると、下の方からニョロっと出てきます。 [self presentModalViewController:picker animated:YES];
「モーダルビューとは?」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy