iOS 11 prefersLargeTitles not updating until scroll

前端 未结 24 2340
轻奢々
轻奢々 2021-01-31 07:25

I implemented a basic UIViewController with a UITableView that\'s wrapped in a UINavigationController. I set prefersLargeTitles to true:

override fu         


        
24条回答
  •  鱼传尺愫
    2021-01-31 08:04

    Same issue here with Swift 4.2, iOS 12, and refactored Storyboards.

    Tried adding prefersLargeTitles = true to viewWillAppear and viewDidLoad, but neither fixed my issue.

    Instead, I copied the refactored storyboards back into main.storyboard and found the option to enable large titles in IB. Set that option, then refactored the storyboards back out and everything is working now. For some reason, the initial refactoring stripped out the option and I couldn't enable it programmatically.

提交回复
热议问题