iOS 13 strange search controller gap

前端 未结 12 1763
无人共我
无人共我 2021-02-01 14:55

When running the App on iOS 13 beta 6, using Xcode 11 beta 5 I\'m encountering the strange gap when presenting search results view controller:

Here\'s a bit o

12条回答
  •  野性不改
    2021-02-01 15:26

    Finally get through the tough. Just to make the first controller contains the UISearchController to have a translucent navigationBar. Work for me perfectly!

        override func viewWillAppear(_ animated: Bool) {
            super.viewWillAppear(animated)
    
            self.navigationController?.navigationBar.isTranslucent = true
        }
    
        override func viewWillDisappear(_ animated: Bool) {
            super.viewWillAppear(animated)
    
            self.navigationController?.navigationBar.isTranslucent = false
        }
    

提交回复
热议问题