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などのフォームを設置」をはてなブックマークに追加

PCのバックアップ

2010年10月05日 過去Blog
PCのバックアップ箇所のメモ デスクトップ マイドキュメント アウトルック(dbx,アカウント) ffftp hostsファイル IE,fireFox ブックマーク
「PCのバックアップ」をはてなブックマークに追加

mySQL上で登録された内容に一致する文字列を置き換え

2009年12月25日 過去Blog
以下のようにSQLを実行することで該当箇所が置き換えされます。 phpのstr_replaceのような感じ。 UPDATE `テーブル名` SET フィールド名 =REPLACE (フィールド名,"置き換え前文字列","置き換え後文字列"); limo service san diego…
「mySQL上で登録された内容に一致する文字列を置き換え」をはてなブックマークに追加

zencart ダウンロード商品の登録方法

2010年06月30日 過去Blog
以下のサイトを参考にすれば、ダウンロード商品の登録が出来ました。 http://zencart-pro.com/help/node/180
「zencart ダウンロード商品の登録方法」をはてなブックマークに追加

UIImageViewに画像を配置する

2010年12月17日 過去Blog
IBOutlet UIImageView *bgImage; @property(nonatomic,retain) IBOutlet UIImageView *bgImage; 上記のようなbgImageがInterfaceで宣言され、Interface Builder上に、UIImageViewが配置されているとすると以下のように実装すれば、該当箇所に画像が挿入されます。 bgImage.…
「UIImageViewに画像を配置する」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy