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 ファイルの変更を反映させる」をはてなブックマークに追加

seo:ブラックハット的な被リンク獲得方法

2009年11月18日 過去Blog
seo:ブラックハット的な被リンク、Googleページランク獲得方法 wordpress website templates…
「seo:ブラックハット的な被リンク獲得方法」をはてなブックマークに追加

macでhostsファイルの切り替え

2010年12月08日 過去Blog
以前、macでのhostsファイルの編集方法を紹介しましたが、hostsの切り替えに便利なツールがありましたので、それを紹介します。 hoster このソフトを使えば、ターミナル上から、hostsファイルを編集する必要がなく、GUIの操作だけでhostsを変更することが可能です。頻繁にhostsの設定を変更する必要がある方にとっては、とても重宝するのではないでしょうか。…
「macでhostsファイルの切り替え」をはてなブックマークに追加

[3]:Interface Builder と Xcode を接続する方法

2010年11月30日 過去Blog
今回は、Interface Builder を使って、UITextField, UILabel, そして ボタンを配置し、Xcode で書いたコードと接続し、動作させてみます。 アプリケーションの仕様 ユーザーがテキストボックスをタップすると入力用のキーボードが表示される ユーザーは自分の名前(任意の文字列)を入力する 実行ボタンを押す ボタンを押すとラベルが、「Hello! ユーザー名!」のような表示に更新される もし、テキストボックスが空のまま実行されると、警告を表示させる …
「[3]:Interface Builder と Xcode を接続する方法」をはてなブックマークに追加

PHP 配列の要素数を取得する

2010年06月11日 過去Blog
$array_count = count($array);
「PHP 配列の要素数を取得する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy