UITableView in UINavigationController gets under Navigation Bar after rotation

前端 未结 8 876
清酒与你
清酒与你 2020-12-21 06:10

This is Portrait:

This is Landscape

I\'ve tried this on rotation with no success:

self.tableView.autoresizesSubviews = YE         


        
8条回答
  •  猫巷女王i
    2020-12-21 06:53

    One thing to look out for in these situations is the orientation of the Status Bar if you are changing it manually. If the status bar is not hidden and you change the frame of your view while the status bar is in the wrong orientation (in your code, maybe you're updating the orientation of the status bar just after the frame change), it will auto resize the navigation bar wrongly, even if you haven't got auto resize on.

提交回复
热议问题