开发者

UITableView not rotating even after using autoresize mask and shouldAutororateForInterfaceOrientation

开发者 https://www.devze.com 2022-12-23 00:19 出处:网络
I have a UIView, that contains a navigation bar, and UITableView. I implemented a UIViewController that implements a UITableViewDelegate. I over-rided the shouldAutorotateForInterfaceOrientation for t

I have a UIView, that contains a navigation bar, and UITableView. I implemented a UIViewController that implements a UITableViewDelegate. I over-rided the shouldAutorotateForInterfaceOrientation for the UIViewController to return YES for lan开发者_如何转开发dscape and portrait mode. But the View does not seem to rotate. I did a similar thing without the Navigation bar and the Tableview and the view rotates.

Is is something i am missing.


You need to override -shouldAutorotateForInterfaceOrientation: in your UIViewController, not the view itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消