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


ピックアップ記事

/etc/hosts ファイルの変更を反映させる

2009年12月05日 過去Blog
hostsファイルの設定を変えた場合は、 # /etc/rc.d/init.d/network resatart または、 # /etc/rc.d/init.d/network reload で反映させる。
「/etc/hosts ファイルの変更を反映させる」をはてなブックマークに追加

iPhoneアプリの起動画面、スプラッシュ画面の設定

2010年12月17日 過去Blog
起動画面の設定は、Default.png (320px  × 480px)という画像をつくり、XCode上のResourceフォルダ内に入れるだけで設定されます。 私の場合は、以上で問題なく、設定されましたが、実機で表示されないなどの場合は、以下のサイトにあるようにすれば、直ったという方もいるようなので、参考にしてください。 http://d.hatena.ne.jp/moroshi/2009…
「iPhoneアプリの起動画面、スプラッシュ画面の設定」をはてなブックマークに追加

Drupalをサーバから削除する

2011年05月10日 過去Blog
以下のファイルが削除出来ないので、このファイルとこのファイルより上の階層のパーミッションを777にすれば削除可能になりました。 default.settings.php settings.php
「Drupalをサーバから削除する」をはてなブックマークに追加

UITableView のcellの複数選択を実装する

2011年01月25日 過去Blog
//セルが選択された際に呼び出される - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //選択されたセルを取得 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; /…
「UITableView のcellの複数選択を実装する」をはてなブックマークに追加

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で使えるお気に入りボタン(ブックマークボタン)」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy