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


ピックアップ記事

UITableViewのcellにUITextFieldなどのフォームを設置

2011年04月28日 過去Blog
http://d.hatena.ne.jp/tomute/20091120/1258780317 raspberry ketone fresh free sample…
「UITableViewのcellにUITextFieldなどのフォームを設置」をはてなブックマークに追加

php 文字列を指定した文字ごとに分割する wordwrap

2010年01月29日 過去Blog
以下のようにすることで、10文字ごとに "n"で区切ることが出来ます。 参照元:http://www.php.net/manual/ja/function.wordwrap.php…
「php 文字列を指定した文字ごとに分割する wordwrap」をはてなブックマークに追加

[エラー]modifying layer that is being finalized

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

Apacheの負荷軽減

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