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


ピックアップ記事

dreamweaver msvcr80.dll のエラー

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

SQLite で Limit や ORDER BY RANDOM()など

2010年12月16日 過去Blog
SQLite で抽出データを並び替え SELECT * FROM テーブル名 ORDER BY フィールド1 DESC, フィールド2 DESC, フィールド3 ASC ; 上記のようにすることで、「テーブル名」という名前のテーブルの全てのデータを「フィールド1」の降順で並べ、「フィールド1」が同値の場合、次の「フィールド2」を降順に並べ、さらに「フィールド2」も同値の場合、「フィールド3」を基準に昇順に並び替えます。 ASC は結果が昇順に並びかえ、 DESC はそれが降順に並ぶかえることを表します。そのどちらも指定されていない場合、 ASC で並び替えられます。 SQLite でランダムにデータを抽出する まず、SQLite でランダムにデータを取り出す方法 SELECT * FROM entry ORDER BY RANDOM(); SQLite で行数指定(LIMIT)でデータを抽出する SELECT文では、WHERE句などを指定した場合でも条件に一致する全てのデータを取得します。この取得する件数を制限したい場合にはLIMIT句を使います。書式は以下の通りです。 SELECT カラム名, ... FROM テーブル名 LIMIT 行数; …
「SQLite で Limit や ORDER BY RANDOM()など」をはてなブックマークに追加

WHOIS pending delete から 取得可能になるまで

2010年03月24日 過去Blog
中古ドメインを探す際、whois の pending delete 表示から取得可能になるまでの期間は5日間? …
「WHOIS pending delete から 取得可能になるまで」をはてなブックマークに追加

PHP cURLでPOST送信

2010年03月24日 過去Blog
<?php $params = array( "login-name" => 'nakamuraya', "login-password" => 'gerogero', "submit" => "ログイン" ); $fp = fopen("tmp", "w"); $ch = curl_init("http://www.phppro.jp/membe…
「PHP cURLでPOST送信」をはてなブックマークに追加

WordPressの記事中でphpを使うスクリプト

2009年11月24日 過去Blog
http://www.nosq.com/blog/2006/01/runphp-plugin-for-wordpress/ http://bono.s206.xrea.com/2006/03/112-runphp/ Zencartにも応用できる?
「WordPressの記事中でphpを使うスクリプト」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy