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


ピックアップ記事

Apacheの負荷軽減

2010年03月31日 過去Blog
Apacheのチューニングについて。 今のところ、大丈夫かなと思いますが、いずれ試してみようと思います。 http://tech.bayashi.net/svr/doc/apache/tune.html hostingreviewssite.com
「Apacheの負荷軽減」をはてなブックマークに追加

php 配列の要素から重複を削除し、添え字を再配布する

2009年12月07日 過去Blog
$example_array= array( "green", "red", "green", "blue", "red"); phpで上記のような配列から、重複要素を削除するには $example_array = array_unique($example_array); とすることで重複要素は削除されます。 …
「php 配列の要素から重複を削除し、添え字を再配布する」をはてなブックマークに追加

facebook「いいね」ボタン設置トラブル

2011年05月24日 過去Blog
運営サイトにfacebookの like! ボタンを設置しようと、ここにアクセスして発行しようとしたのですが、以下のようなエラーが出て、コードが取得出来ませんでした。 Only verified developers can be added as listed developers of this application. ネットで検索すると同じような症状で困っている方もいるようなので、一応、解…
「facebook「いいね」ボタン設置トラブル」をはてなブックマークに追加

[エラー]modifying layer that is being finalized

2010年12月09日 過去Blog
このエラーは、autorelease によってリリースされた(される)コントロールを自分自身で release を読んで解放しようとした時に、おこるエラーの様です。 私の場合は、以下のようなコードを実行したら3回ほどクリックすると落ちました。 ボタンをクリックするとdivision.text にデータベースから抜き出した文字列を表示するというコードです。 division.text = [N…
「[エラー]modifying layer that is being finalized」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy