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


ピックアップ記事

IE・FireFoxで使えるお気に入りボタン(ブックマークボタン)

2009年12月09日 過去Blog
<script type="text/javascript"> <!-- if(navigator.userAgent.indexOf("MSIE") > -1){ //Internet Explorer document.write('<!-'+'-[if IE]>'); document.write('<input type="button" valu…
「IE・FireFoxで使えるお気に入りボタン(ブックマークボタン)」をはてなブックマークに追加

[1]:UITableViewでHelloWorldを表示させる

2010年11月19日 過去Blog
今回のチュートリアルでは、UITableViewを使って簡単なアプリケーションを構築します。 おなじみの"HelloWorld"を表示させるアプリです。 このチュートリアルでは、Objective-Cの基礎を習得済の方を想定しています。 今回学ぶこと: Navigation-Based Applicationの新規作成 デフォルト状態で構成されてるファイル群について "HelloWorld"を表示するため、UITableViewのセルの変更 …
「[1]:UITableViewでHelloWorldを表示させる」をはてなブックマークに追加

UTCと日本時間

2010年03月24日 過去Blog
UTCの0時を日本の時間に変換すると朝の九時(UTC + 9時間)。 UTC Wednesday, 24 March 2010, 00:00:00 ↓↓↓↓↓↓ Kyoto (Japan) Wednesday, 24 March 2010, 09:00:00 UTC+9 hours
「UTCと日本時間」をはてなブックマークに追加

[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」をはてなブックマークに追加

xcodeでメモリリークを簡単に調べる方法

2011年03月03日 過去Blog
以下のサイトにあるようなことが出来るらしい。 http://www.lastday.jp/2011/03/01/memory-leak-xcod やったことないので、今度やってみようと思います。
「xcodeでメモリリークを簡単に調べる方法」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy