iOS 11 prefersLargeTitles not updating until scroll

前端 未结 24 2386
轻奢々
轻奢々 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:13

    I think It does seem a little bit dummy but I effectively solved the problem with this:

    self.navigationItem.prompt = ""
    
    self.navigationItem.prompt = nil
    

    It's like navigationBar needs a sort of update in one of its elements to update the layout.

    Sometimes to update something in navigationBar I need to hide and unhide it.. That's why I think there is a best way to do it.. For the moment that's my workaround.

提交回复
热议问题