我的 AppDelegate 中有一个 UINavigationController 和一个具有 UITableView 的 RootViewController。启动时,状态栏将其颜色更改为导航栏的颜色。当我将导航栏涂成橙色时,状态栏是这样的:
我的导航栏似乎移到了顶部。导航控制器似乎无法识别状态栏。我该如何解决这个问题?
我的应用程序中只有一个 AppDelegate 和一个空的 RootViewController。我application:didFinishLaunchingWithOptions
的是:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
RootViewController *rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
[navigationController.navigationBar setTintColor:[UIColor orangeColor]];
self.window.rootViewController = navigationController;
[self.window makeKeyAndVisible];
return YES;
我的 RootViewController IB 文件只有一个空视图。
Nothing unusual. I'm pretty experienced with iOS and that's how I've been doing it every single time. I have no idea what is different this time.
Could someone please advise me? Thanks