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


ピックアップ記事

オーガナイザーからProvisioningする際にエラー

2010年12月23日 過去Blog
新しく購入したipadをオーガナイザーから、Provisioningしようとすると以下のようなエラーが出ました。 An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Support. mac上のXCodeがiOS4.1のバージョンだったため、…
「オーガナイザーからProvisioningする際にエラー」をはてなブックマークに追加

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 で位置情報、方位情報の取得」をはてなブックマークに追加

PHP&Javascript フォームのチェックボックスを全選択させる(配列)

2010年06月11日 過去Blog
フォームのチェックボックスをjavascriptを使って全選択し、チェックボックスの値を配列として受け取る。 <SCRIPT TYPE="text/javascript"> <!-- function allcheck(targetForm,flag){  for(n=0;n </SCRIPT> <input type="button" value="全選択" on…
「PHP&Javascript フォームのチェックボックスを全選択させる(配列)」をはてなブックマークに追加

iPhoneのマルチタスク時の不要なメモリ解放

2011年01月05日 過去Blog
タイトルの通りですが、マルチタスクのメモリを解放する方法は、ホームボタンをダブルクリックして、起動中のアプリを表示させ、削除したいアプリを長押しすれば、削除ボタンが現れて削除可能になります。 どうも手動で管理しないといけないというのは、不便ですね。 他にもっと良い方法はないんでしょうかね( ? _ ? ) ご存知の方は、是非コメント下さい(^_^)
「iPhoneのマルチタスク時の不要なメモリ解放」をはてなブックマークに追加

外部のサイトから画像をサーバに取得(コピー)

2009年12月06日 過去Blog
$img_path // 取得する画像のパス(URL) $path = "ここは保存先のパス";  //  /home/ドメイン/public_html/imagesなど $img = file_get_contents($img_path) ;//画像を取得 $fullpath = $path.basename($img_path);//画像の保存フルパス file_put_conten…
「外部のサイトから画像をサーバに取得(コピー)」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy