9

iPadアプリを開発しました。ナビゲーションコントローラーを使用してポップオーバーでいくつかの画面を開いています。しかし、IOS 7 でナビゲーション コントローラーの色合いを変更しませんでした。この色を変更するにはどうすればよいですか。ありがとう

ここに画像の説明を入力

UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:airportsSearch] autorelease];
navigationController.navigationBar.barTintColor = [UIColor blackColor];
navigationController.navigationBar.translucent = NO;
self.popOver=[[UIPopoverController alloc] initWithContentViewController:navigationController];

self.popOver.delegate                    = self;
[self.popOver setPopoverContentSize:CGSizeMake(285, 370)];

[self.popOver presentPopoverFromRect:tempButton.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
4

2 に答える 2

6

NavigationBarStyle を UIBarStyleBlack に設定することもできましたが、ストーリーボードを介してのみ機能しました。

私は試した

[[UINavigationBar appearance] setBarStyle:UIBarStyleBlack];

としても

[[UINavigationBar appearanceWhenContainedIn:[UIPopoverController class], nil] setBarStyle:UIBarStyleBlack];

didFinishLaunchingWithOptions AppDelegate メソッドで。しかし、何も変わりませんでした。ストーリーボード内の NavigationControllers NavigationBar の BarStyle の変更のみが機能しました。

于 2014-03-02T21:41:24.513 に答える