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


ピックアップ記事

mysqlデータの移行

2010年04月03日 過去Blog
こんなことが起こってはいけないのですが、、、、 昨日、サーバでsudo関連のプログラムをfedoraサーバでテストしてたのですが、その際に、誤って、想定してないような値を渡してしまい、サーバ上のディレクトリやファイルのパーミッションがおかしなことになってしまいました。 rootでもログイン出来なくなってしまい、全てがおかしくなったのか、部分的におかしくなったのかも把握できず、とりあえず、初期化…
「mysqlデータの移行」をはてなブックマークに追加

ページランク更新

2010年01月04日 過去Blog
新年あけましておめでとうございます。 新年早々?ページランクの更新があったようですね。 当サイト公開後、初のページランク更新でしたが、今回の更新でページランクが1になりました。 特に、高いページランクを目指して運営してるわけではないのですが、公開してから、被リンク数やページランクがどのように推移していくのかを軽く把握したいと思う気持はあるので、今回の更新は、ちょっとだけレベルアップしたような…
「ページランク更新」をはてなブックマークに追加

PHPでサイトのタイトルを取得

2010年03月30日 過去Blog
参照元:http://creazy.net/2008/05/php_get_page_title_sample.html how to cure depression…
「PHPでサイトのタイトルを取得」をはてなブックマークに追加

ABPeoplePickerNavigationControllerのキャンセルボタンを無効にし、新規追加ボタンを実装する

2011年01月17日 過去Blog
viewController内に以下のようにインターフェースを宣言します。 @interface ABPeoplePickerNavigationController (Expose) @property (nonatomic, assign) BOOL allowsCancel; @property (nonatomic, assign) BOOL allowsCardEditing; @end 同じファイル内に、以下のように設定します。 ABPeoplePickerNavigationController *contactsNavController = [[ABPeoplePickerNavigationController alloc] init]; contactsNavController.tabBarItem.title = @"連絡先"; contactsNavController.allowsCancel = NO; contactsNavController.allowsCardEditing = YES; contactsNavController.peoplePickerDelegate=self; …
「ABPeoplePickerNavigationControllerのキャンセルボタンを無効にし、新規追加ボタンを実装する」をはてなブックマークに追加

phpでランダムなパスワードを生成

2010年01月29日 過去Blog
使用例 //パスワード生成クラス読み込み require_once 'My/Password.php'; //デフォルトは8桁のパスワードが生成されます $password = My_Password::getPassword(); var_dump($password); //『32桁、小文字英字のみ』のパスワード生成 $password = My_Password::getPassword(32, 'small'); var_dump($password); …
「phpでランダムなパスワードを生成」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy