我有 UIScrollview
加载了其他两个 UIViewControllers
. 主 UIViewcontroller
的方向锁定为纵向模式,最后一个视图有一个按钮,调用另一个 uiviewcontroller
,需要根据移动方向旋转 UIImageview
.
一切正常,但如果我以横向模式旋转移动设备,然后按下按钮调用 UIViewcontroller
中的图像, UIScrollview
显示在中途,或者当我从图像返回到主滚动视图时从第1页显示 .
主 UIViewcontroller
被锁定使用:
override func shouldAutorotate() -> Bool {
return false
}
override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.Portrait
}
1 回答
解决了使用: