iOS 11 large-title navigation bar not collapsing

后端 未结 7 748
长发绾君心
长发绾君心 2020-12-02 18:31

The Apple guy in the What\'s new in Cocoa Touch WWDC video said that the new large-title navigation bar will magically hook into the top-level scroll view of the underlying

相关标签:
7条回答
  • 2020-12-02 19:01

    Or instead of changing anything in storyboard, do this:

    override func viewDidLoad() {
        super.viewDidLoad()
        if #available(iOS 11.0, *) {
            self.navigationItem.largeTitleDisplayMode = .never
            self.navigationItem.largeTitleDisplayMode = .always
        }
    }
    

    No matter which language!

    This is because large titles on navigation item decides whether or not to collapse on the basis of large title behaviour on previous screen navigation item title.

    0 讨论(0)
提交回复
热议问题