私のアプリ開始デリゲートには、次のコードがあります。
[window addSubview:[myTabBarController view]];
UIImageView *banner =
[[[UIImageView alloc] initWithFrame:CGRectMake(0,381,320,50)] autorelease];
banner.backgroundColor = [UIColor redColor];
[window addSubview:banner];
[window makeKeyAndVisible];
これは期待どおりに機能します。タブバーが表示され、myUIImageView
も表示されます。
UIImageView
私は自分のアプリのどこでもそれを変更する必要があります(私はTabBarController
、、、などNavigationController
を持っていますUITableView
)
たとえば、をクリックしたときに背景色を変更したいUITableCell
。
私はすべてを試しました:self.window.view.subviews
、、atObjectIndex
どちらも現在の背景色を取得していないようです。