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


ピックアップ記事

ModalView経由での値の受け渡し

2011年05月03日 過去Blog
http://timneill.net/2010/11/modal-view-controller-example-part-2/ http://ameblo.jp/iphone0126/entry-10716795357.html buy steroids…
「ModalView経由での値の受け渡し」をはてなブックマークに追加

iPhone UILabel 高さをテキストの量で決める

2011年04月30日 過去Blog
http://www.hirano-dept.com/blog/2011/01/iphone-uilabel.html NSString *str = @"sample string"; CGSize size = [str sizeWithFont:[UIFont boldSystemFontOfSize:13] constrainedToSize:CGSizeMake(5…
「iPhone UILabel 高さをテキストの量で決める」をはてなブックマークに追加

PHP 配列から空白要素を削除する

2010年02月20日 過去Blog
配列 $array_exampleの要素のなかで、空白のものを削除。 $array_example = array_filter($array_example, 'strlen');
「PHP 配列から空白要素を削除する」をはてなブックマークに追加

tabBar + navigationBar + tableView

2011年01月19日 過去Blog
http://www.edumobile.org/iphone/iphone-programming-tutorials/tabbarcontroller-with-navigationcontroller-and-tableview-in-iphone/ http://iphone-app-developer.seesaa.net/article/130194298.html house cl…
「tabBar + navigationBar + tableView」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy