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


ピックアップ記事

iPhone CoreLocation で位置情報、方位情報の取得

2011年04月28日 過去Blog
http://www.bright-sys.co.jp/blog/iphone-corelocation-1/ http://www.bright-sys.co.jp/blog/iphone-corelocation-2/ divorce lawyers san diego…
「iPhone CoreLocation で位置情報、方位情報の取得」をはてなブックマークに追加

UIImageViewに画像を配置する

2010年12月17日 過去Blog
IBOutlet UIImageView *bgImage; @property(nonatomic,retain) IBOutlet UIImageView *bgImage; 上記のようなbgImageがInterfaceで宣言され、Interface Builder上に、UIImageViewが配置されているとすると以下のように実装すれば、該当箇所に画像が挿入されます。 bgImage.…
「UIImageViewに画像を配置する」をはてなブックマークに追加

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経由での値の受け渡し」をはてなブックマークに追加

htmlソース内からメールアドレスを抽出

2010年05月20日 過去Blog
//mailto:が使用されているメールアドレス preg_match_all("/mailto:(.+?)"/s", $html2, $matches); //mailto:は使用されておらず、@を基準に判別 preg_match_all('/[-.w/]+@[-._[:lower:]d]+.[[:lower:]]{2,4}/s', $html2, $matches); …
「htmlソース内からメールアドレスを抽出」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy