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


ピックアップ記事

PHP での SimpleXML 処理>>RSS取得

2009年12月05日 過去Blog
phpでrssの情報を抜き出したい場合は、titleやlinkの要素は以下の通りで抜き出せます。 <?php // Load and parse the XML document $rss = simplexml_load_file('http://partners.userland.com/nytRss/nytHomepage.xml'); $title = $rss->channel->title; ?> …
「PHP での SimpleXML 処理>>RSS取得」をはてなブックマークに追加

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送信」をはてなブックマークに追加

デバイス&シミュレータ上に表示されるアプリ名を設定する

2010年12月17日 過去Blog
iPhoneアプリを作成し、シミュレータおよび、デバイスで実行した時に、ホーム画面上に実行したアプリがインストールされます。 その際のアプリ名は、デフォルトでは、該当アプリのプロジェクト名がそのままアプリ名となりホーム画面上に表示されることになります。 その名称の変更は以下の手順で可能です。 XcodeのResourcesフォルダ内にあるInfo,plistを開く。 各種設定内容がリスト…
「デバイス&シミュレータ上に表示されるアプリ名を設定する」をはてなブックマークに追加

objective-C 日時関連

2011年04月28日 過去Blog
http://d.hatena.ne.jp/KishikawaKatsumi/20081121/1227275688 http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns
「objective-C 日時関連」をはてなブックマークに追加

iPhoneの留守電設定(解除方法)

2011年01月06日 過去Blog
iPhoneの場合は、普通の携帯のように機種上の操作で留守電の設定が出来ないので、少し調べてみました。 1406 にダイヤル あとはガイダンスに従って行うだけです。 サービス番号を押して最後に#を押してください。 転送電話  呼出しありは441 転送電話  呼出しなしは442 留守番電話  呼出しありは431 留守番電話  呼出しなしは432 留守番電話、または転送電話の解除は400 今…
「iPhoneの留守電設定(解除方法)」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy