ios旋转

iOS 码拜 7年前 (2017-05-08) 2066次浏览
场景:
在一个导航的tableviewcontroller中点击单元格,然后跳转到另外一个统计图表数据的viewcontroler。原因是这个数据比较多,本人在这个统计图表数据的viewcontroler中只支持横屏。点击返回按钮就自动为竖屏了。
谢谢。
解决方案

20

– (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[[UIDevice currentDevice] setValue:[NSNumber numberWithInteger:UIDeviceOrientationLandscapeLeft] forKey:@”orientation”];
}

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明ios旋转
喜欢 (0)
[1034331897@qq.com]
分享 (0)