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


ピックアップ記事

UITextField と UITextView のキーボード関連

2011年04月28日 過去Blog
http://www.toyship.org/2011/03/uitextfielduitextview%E3%81%AE%E6%96%87%E5%AD%97%E5%85%A5%E5%8A%9B%E3%81%A7%E8%A6%9A%E3%81%88%E3%81%A6%E3%81%8A%E3%81%8F%E3%81%A8%E4%BE%BF%E5%88%A9%E3%81%AA%E3%81%93%E3%…
「UITextField と UITextView のキーボード関連」をはてなブックマークに追加

dreamweaver msvcr80.dll のエラー

2010年01月16日 過去Blog
ここ数日、いきなり複数台のPCにインストールしていたdreamweaverが全て、起動時に強制終了される状態がつづいていました。 Windowsのコントロールパネルからイベントビューアをみると、msvcr80.dllがエラーを起こしているようなのですが、検索しても解決策はヒットせず、adobeのサイトを参考にレジストリなどを触ってみるも直接的な解決には至りませんでした。 DWでサイトとして定義…
「dreamweaver  msvcr80.dll のエラー」をはてなブックマークに追加

phpでRSSを取得後の日付表示方法を変更する

2009年12月05日 過去Blog
FC2ブログからRSSを取得すると、日付は以下のようになる。 <dc:date>2009-12-24T00:20:00+09:00</dc:date> このままでは、少しかっこが悪いので、以下のように修正。 $date ="2009-12-05T05:55:00+09:00"; $date = strtotime($date); $date = date('Y/m/d …
「phpでRSSを取得後の日付表示方法を変更する」をはてなブックマークに追加

[7]:SQLiteを使ってToDoリストアプリを作成(2)

2010年12月03日 過去Blog
このチュートリアルは、タイトルの通り、SQLiteを使ってToDoリストアプリを作成の二回目の記事です。前回の記事を読んでない方は、そちらから読んでください。 今回は、SQLデータをUITableViewで表示するだけでなく、画像や文字列を使った複合的なカラムの作成を行います。今回のチュートリアルでは、以下の画像を使いますので、ダウンロードしてください。 優先度:高 優先度:普通 優先度:低 これらの画像は、優先度を表示するのに使います。 …
「[7]:SQLiteを使ってToDoリストアプリを作成(2)」をはてなブックマークに追加

UITextField を自動で入力待ち状態にする(フォーカスをあてる)方法

2010年12月26日 過去Blog
UITextField が設置されているviewが表示されたら、自動で入力待ち状態にする方法です。 - (void)viewDidLoad { [super viewDidLoad]; [textField becomeFirstResponder]; } new york limo…
「UITextField を自動で入力待ち状態にする(フォーカスをあてる)方法」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy