當我推送詳細的View Controller時,我有一個奇怪的行爲。隱藏Boom Bar Push是導致錯誤的原因導航欄
我有這樣一個層次視圖控制器,所有的控制器默認配置。
只有最後的UIViewController設置hidesBottomBarWhenPushed = true
這裏是谷歌驅動器test project。我已測試XCode 8,iOS 10,模擬器iPhone SE
感謝您的任何幫助!
當我推送詳細的View Controller時,我有一個奇怪的行爲。隱藏Boom Bar Push是導致錯誤的原因導航欄
我有這樣一個層次視圖控制器,所有的控制器默認配置。
只有最後的UIViewController設置hidesBottomBarWhenPushed = true
這裏是谷歌驅動器test project。我已測試XCode 8,iOS 10,模擬器iPhone SE
感謝您的任何幫助!
下面的摘錄可以解決您的問題
self.navigationController?.navigationBar.isTranslucent = false
把上面的代碼到你的viewDidLoad
的TableViewController
,如果你想navigationBar
與isTranslucent = true
你可以改變window
的backgroundColor顏色如下
self.window?.backgroundColor = UIColor.white
我知道我可以將isTranslucent關閉,但我不想這樣做。我想擁有半透明導航欄。 –
@TikhonovAlexander請檢查我的編輯回答 –
'window?.backgroundColor = .white'解決問題,ty –
您只需要在使用la移動到詳細視圖時設置隱藏底部欄tableview的第st行? –
@Maddyヅヅ是的,但任何行 –
你可以使用didSelectRowAt indexPath來隱藏底欄 –