gpt4 book ai didi

ios7 - iOS 7 中显示 UIAlertView 时出现旋转问题

转载 作者:行者123 更新时间:2023-12-02 15:44:58 25 4
gpt4 key购买 nike

在iOS7中,很少但偶尔,当我在显示UIAlertView时旋转我的应用程序时,只有alertView和状态栏旋转,而不是我的应用程序。有其他人经历过这种情况和/或找到解决方法吗?

最佳答案

我通过向应用程序委托(delegate)添加下一个方法解决了此问题:

- (void)application:(UIApplication *)application willChangeStatusBarOrientation:(UIInterfaceOrientation)newStatusBarOrientation duration:(NSTimeInterval)duration  {
NSArray *windows = [application windows];
for (UIWindow *nextWindow in windows) {
[[nextWindow.rootViewController class] attemptRotationToDeviceOrientation];
}
}

关于ios7 - iOS 7 中显示 UIAlertView 时出现旋转问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19850434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com