我的AppDelegate中有一個UINavigationController,並帶有一個具有UITableView的RootViewController。啓動時,狀態欄將其顏色更改爲導航欄的顏色。當我有色我的導航欄,以橙色,這是個什麼狀態欄看起來像:iOS狀態欄更改顏色以自行匹配導航欄
看來,我的導航欄移動到頂部一點點。看起來導航控制器不識別狀態欄。我該如何解決這個問題?
我在我的應用程序中唯一的事情是一個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文件只是有一個空的觀點。
沒什麼不尋常的。我對iOS非常有經驗,這就是我一直在做的每一次。我不知道這次有什麼不同。
有人可以請教我嗎?謝謝
是什麼讓你說你的導航欄以任何方式轉移?從你發佈的屏幕截圖看,情況看起來很好。 – Till