0

當我推送詳細的View Controller時,我有一個奇怪的行爲。隱藏Boom Bar Push是導致錯誤的原因導航欄

enter image description here

我有這樣一個層次視圖控制器,所有的控制器默認配置。

View hierarchy

只有最後的UIViewController設置hidesBottomBarWhenPushed = true

這裏是谷歌驅動器test project。我已測試XCode 8,iOS 10,模擬器iPhone SE

感謝您的任何幫助!

+0

您只需要在使用la移動到詳細視圖時設置隱藏底部欄tableview的第st行? –

+0

@Maddyヅヅ是的,但任何行 –

+0

你可以使用didSelectRowAt indexPath來隱藏底欄 –

回答

2

下面的摘錄可以解決您的問題

self.navigationController?.navigationBar.isTranslucent = false 

把上面的代碼到你的viewDidLoadTableViewController

,如果你想navigationBarisTranslucent = true你可以改變window的backgroundColor顏色如下

self.window?.backgroundColor = UIColor.white 
+0

我知道我可以將isTranslucent關閉,但我不想這樣做。我想擁有半透明導航欄。 –

+0

@TikhonovAlexander請檢查我的編輯回答 –

+0

'window?.backgroundColor = .white'解決問題,ty –