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


ピックアップ記事

広告や外部リンクなどで、サイト内のテーマが薄れるのを防ぐ、robots-nocontent

2010年03月10日 過去Blog
ウェブページは、ヘッダー、サイドメニュー、コンテンツ、フッターなど様々な要素から成り立ってる場合が多いと思います。 全てがページ内のキーワードと関連が深い場合はいいのですが、広告や、お問い合わせ欄、アクセスマップ、会社概要など、特にサイトのテーマとは関係ないページや関係ない箇所が散財すると思います。 ページ内に広告が表示されてる場合などはサイト内のテーマと関係が薄い場合も多々あると思います。 …
「広告や外部リンクなどで、サイト内のテーマが薄れるのを防ぐ、robots-nocontent」をはてなブックマークに追加

objective-Cで遅延させる(sleepのような動作)

2010年12月06日 過去Blog
iPhon開発(objective-C)で実行を遅らせる方法です。 PHPなどのsleep()のような動作を想定しています。 [NSThread sleepForTimeInterval:0.5]; 上記のようにすることで、0.5秒遅らせることが可能になります。…
「objective-Cで遅延させる(sleepのような動作)」をはてなブックマークに追加

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で使えるお気に入りボタン(ブックマークボタン)」をはてなブックマークに追加

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