[iOS] iPad の場合、UITableView の背景を透明にするには setBackgroundView:nil が必要

2011年2月26日土曜日 | Published in , , | 0 コメント

元ネタ。
setBackgroundView:nil


self.tableView.backgroundColor = [UIColor clearColor];
iPhone の時にやっていた上記が効かず困っていたのだが、そういことか。

- (void)viewDidLoad {
 [super viewDidLoad];
 [self.tableView setBackgroundView:nil];
 [self.tableView setBackgroundView:[[[UIView alloc] init] autorelease]];
 self.tableView.backgroundColor = [UIColor clearColor];
透明になった。

Responses

Leave a Response

[フレーム]

人気の投稿(過去 30日間)

  • 公式リファレンスの Q&A に解説がある。 Technical Q&A QA1551: Detecting the start and end edit sessions of a cell in NSTableView. 方法は Delegate と Not...
  • 2011年06月09日 追記  UITableViewCell の Identifier 設定を忘れてたので追記しました。 UINib を使うと簡単に Nib で定義した UITableViewCell が使える。 今回のサンプル: [関連] Cocoaの日々: [iO...
  • Asset Catalogには画像以外のデータも置ける。サウンドファイル(.aif)を置いてみた。 取り出すには NSDataAsset を使う。 let sound = NSDataAsset(name: name) // use sound.data 取り出したサウ...
  • パスワードを暗号化して安全に iPhone/iPad へ保管したい。iOS はこの用途の為に Keychain Services を提供している。今回は Keychain Services について調べてみた。リファレンスの内容に加え、独自に調査・検証した結果をまとめてある。動作...
  • Core Data を使ったアプリケーションで下のような検索機能を実装している。 設定された値を元に NSPredicate を作成し、Core Data に対して検索をかけるのだが、こういう場合に NSCompoundPredicate が役に立つ。 NSCompound...

AltStyle によって変換されたページ (->オリジナル) /