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


ピックアップ記事

SQLiteのデータベースからデータを取り出す

2010年12月09日 過去Blog
このチュートリアルでは、SQLiteを使ったデータベースを外部で作成し、XCodeプロジェクトに読み込んで、データを取り出す方法を説明します。 サンプルとして、おみくじアプリを作成してみましょう。 …
「SQLiteのデータベースからデータを取り出す」をはてなブックマークに追加

.htaccess の落とし穴

2010年04月14日 過去Blog
落とし穴ってほとではありませんが、少しハマってしまったので、恥ずかしながらメモ・・・。 あるサイトをつくっていたのですが、トップページを表示するたびにベーシック認証の画面が表示されるので、おかしいなぁと思い、それを解決しようとサーバ内を調べていました。 もともと .htaccess を置く必要がないディレクトリなので、サーバ上には、そんなファイルはありませんでした。 絶対に認証は、かけていない!…
「.htaccess の落とし穴」をはてなブックマークに追加

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

[LINUX] PHPでサーバにユーザーを追加 useradd

2010年02月02日 過去Blog
PHPからUSERADDを実行する $id = "username"; $passwd = crypt("passwd"); $cmd = "echo 'sudoPasswd' | sudo -S useradd -p $passwd $id"; exec($cmd, $output); ROOTディレクトリを表示 //ls -a /root $cmd2 = "echo…
「[LINUX] PHPでサーバにユーザーを追加 useradd」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy