我的应用程序当前要求用户访问其当前位置,因此当应用程序启动时,它会显示 UIAlertView 请求它。问题是我的应用程序仅设置为纵向模式,但 UIAlertView 以横向显示。我必须旋转手机才能使其正确定向。我在这里缺少什么?
最佳答案
查看这篇文章:
http://iphonedevelopment.blogspot.com/2008/12/more-on-uialertview-and-landscape.html
基本上,您可能需要在警报之前尝试类似的操作。
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
更新:这是一个带有替代解决方案帖子的 SO。
关于iphone - UIAlertView 要求访问当前位置错误方向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7852715/