[英]iOS: How do I maintain my orientation when resuming the app from the multitask bar?
如果在UIInterfaceOrientationLandscapeRight方向上将应用程序发送到后台,则当我从多任务栏恢复应用程序时,对于显示的快照和视图,方向是UIInterfaceOrientationLandscapeLeft,这是默认设置。 视图通过暂停之前的UIInterfaceOrientationLandscapeRight旋转回到上一个已知的方向,从而立即重新调整自身的方向。
从多任务栏恢复应用程序时,该应用程序会收到2个方向通知,分别由覆盖的shouldAutoRotateToInterfaceOrientation评估。 首先是UIInterfaceOrientationLandscapeLeft,然后是UIInterfaceOrientationLandscapeRight。
从多任务栏恢复应用程序时,其方向与暂停时的方向相同。 因此,如果我们处于UIInterfaceOrientationLandscapeRight模式下,那么我期望以相同的方向继续。
我知道这是一个古老的职位,但得到的答复是,你是不是定义键UISupportedInterfaceOrientations
在Info.plist文件与价值观UIInterfaceOrientationLandscapeLeft
和UIInterfaceOrientationLandscapeRight
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.