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


ピックアップ記事

デスクトップ上のファイルの拡張子を表示させる

2010年01月06日 過去Blog
私の環境では、デスクトップにあるファイル(デスクトップに限らずPC上のすべてのファイル?)の拡張子が表示されない設定になっており、時々、不便に感じることもあったので、それを変更しました。 拡張子を表示させるには、以下のように設定を変更します。 XPの場合 「コントロールパネル」→「フォルダオプション」→「表示」タブをクリックし、下の詳細設定の項目から「登録されている拡張子は表示しない」のチェック…
「デスクトップ上のファイルの拡張子を表示させる」をはてなブックマークに追加

PHP strstr stristr ある文字列が含まれるかどうか調べる

2010年06月11日 過去Blog
$string = 'Hello World!'; if(stristr($string, 'earth') === FALSE) { echo '"earth" not found in string'; } // 出力は "earth" not found in string となります 参照元:http://www.php.net/manual/ja/function.st…
「PHP strstr stristr ある文字列が含まれるかどうか調べる」をはてなブックマークに追加

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

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

UITableView cell の選択を無効にする

2011年04月28日 過去Blog
cell.selectionStyle = UITableViewCellSelectionStyleNone;
「UITableView cell の選択を無効にする」をはてなブックマークに追加

supplied argument is not a valid MySQL result resource

2009年11月27日 過去Blog
supplied argument is not a valid MySQL result resource 直前に記述したSQLクエリに問題があるということ。 たとえば、存在しないフィールドを指定していたり・・・。 私の場合は、なぜか全角スペースが入っていて気付かないままでした・・・。(_ _。)・・・シュン atlanta life insurance…
「supplied argument is not a valid MySQL result resource」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy