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


ピックアップ記事

期限切れの中古ドメインがドロップされるタイミング、時間帯

2010年03月27日 過去Blog
期限切れの中古ドメインが取得可能になる時間帯を調べてみると、中古ドメイン取得館さんのページで参考になりそうな情報を発見したのでメモしておきます。 時間帯 取得件数 00:00~00:09 0 00:10~00:19 40 00:20~00:29 75 00:30~00:39 10 00:40~00:49 5 計 134 中古ドメイン取得館さんのページを見るとほとんどのドメインが…
「期限切れの中古ドメインがドロップされるタイミング、時間帯」をはてなブックマークに追加

objective-Cで遅延させる(sleepのような動作)

2010年12月06日 過去Blog
iPhon開発(objective-C)で実行を遅らせる方法です。 PHPなどのsleep()のような動作を想定しています。 [NSThread sleepForTimeInterval:0.5]; 上記のようにすることで、0.5秒遅らせることが可能になります。…
「objective-Cで遅延させる(sleepのような動作)」をはてなブックマークに追加

php フォームのPOST送信で配列を扱う場合

2010年04月15日 過去Blog
htmlのフォーム内のcheckboxなどで、配列を扱いたい場合は、以下のように name 属性に [] をつけます。これで配列として扱えます。 <input type="checkbox" name="item[]" value=""> <input type="checkbox" name="item[]" value=""> <input type="checkbox" n…
「php フォームのPOST送信で配列を扱う場合」をはてなブックマークに追加

モーダルビューとは?

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

PHP 配列の結合

2010年05月20日 過去Blog
$array3 = array_merge($array1,$array2); a complete guide to the acai berry diet…
「PHP 配列の結合」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy