2017-10-05 75 views
0

我具有由導航控制器用於我的視圖中創建一個導航欄,這些經由容器側菜單加載。從側面菜單中單擊時,導航欄未填充狀態欄?

當我單擊一個項目時,它加載導航控制器和視圖,但導航欄背景滴出表示狀態欄上的空白背景顏色。

任何想法,我怎麼可以診斷這個問題?我已經包括了一些看法調試器截圖最好的說明

enter image description here

enter image description here enter image description here

enter image description here

UINavigationBar.appearance().tintColor = UIColor.white 
    UINavigationBar.appearance().barTintColor = UIColor().appThemeColour() 
    UINavigationBar.appearance().isTranslucent = false 
    UINavigationBar.appearance().shadowImage = UIImage() 
    UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.white] 
    UIApplication.shared.statusBarStyle = .lightContent 
+0

是否使用SideMenu莢? –

+0

你是否在刪除導航欄陰影? – ankit

+0

即時通訊使用interactivesidemenu https://github.com/handsomecode/InteractiveSideMenu – jackdm

回答

0

那麼你錯過這裏一兩件事,這就是UINavigationBar的的了setBackgroundImage。

UINavigationBar.appearance().tintColor = UIColor.white 
    UINavigationBar.appearance().barTintColor = UIColor().appThemeColour() 
    UINavigationBar.appearance().isTranslucent = false 
    UINavigationBar.appearance().shadowImage = UIImage() 
    UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default) 
    UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.white] 
    UIApplication.shared.statusBarStyle = .lightContent 
+0

可惜就是對這個問題沒有任何影響,我認爲它更多的是與sidemenu影響它 – jackdm