通过 UITabBarController、UINavigationController 和 MapKit 使用两阶段旋转动画警告
我有一个标签栏应用程序,在横向模式下每个选项卡上都带有导航控制器。它在控制台中提示警告
使用两阶段旋转动画。要使用更平滑的单阶段动画,这 应用程序必须删除两阶段方法实现。
现在我重写此方法(来源:单级与两级- iPhone 应用程序的舞台动画?),
- (void)willAnimateRotationToInterfaceOrientation:
UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
{
[super willAnimateRotationToInterfaceOrientation:interfaceOrientation duration:duration];
}
并且警告在所有选项卡上均已修复,但如果将一个选项卡设为选项卡栏控制器的第一个选项卡,则该警告除外。 该选项卡包含 MKMapView、ScrollView、一些标签、按钮和一些 UIImageView。
上述功能也被添加(覆盖)在地图控制器上,但它仍然会产生两阶段动画的警告。
我刚刚在某个页面上看到这也可能是由MapKit引起的,有什么解决方案吗?
提前致谢。
I have a tab bar app with navigation controller on each tab in landscape mode. It prompts a warning in the console
Using two-stage rotation animation. To use the smoother single-stage animation, this
application must remove two-stage method implementations.
Now I override this method (Source : Single-Stage vs Two-Stage Animation for iPhone Apps?)
- (void)willAnimateRotationToInterfaceOrientation:
UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration
{
[super willAnimateRotationToInterfaceOrientation:interfaceOrientation duration:duration];
}
and the warning is fixed on all tabs, except for one tab if made the first tab of the tab-bar controller.
That tab contains MKMapView, ScrollView, some labels,buttons, and few UIImageViews.
The above stated function is added (Overrided) on map controller as well, but still it produce warning of two stage animation.
I just read it on some page that this can also be caused by the MapKit, is there some solution.
Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果系统导致此警告,您可以安全地忽略它,只需确保您
在代码中的各处使用而不是旧的(两阶段)方法
,并且
If the system is causing this warning you can safely ignore it, just make sure that you are using
everywhere in your code instead of the older (two-stage) methods
and