应用程序购买时,应用程序恢复时,警报框方向更改为纵向 [英] In app purchase Alert Box orientation changes to portrait when app resumed

查看:132
本文介绍了应用程序购买时,应用程序恢复时,警报框方向更改为纵向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题。
我的游戏是全景。我有一个inapp购买按钮在我的应用程序。当我点按该按钮时,我在横向模式下看到正常的提醒按钮。但是当我按主页按钮重新打开应用程序,然后点击inapp购买,警报框的方向更改为portait。

I am having a weird problem. My game is all landscape. I have a inapp purchase button in my app. When I tap on that button I see the normal alert button in landscape mode. But when I press the home button and reopen the app, then tap on the inapp purchase, the orientation of the Alert box changes to portait.

我不知道为什么正在发生。你们有过这个问题吗?欢迎任何想法或建议!

I have no idea why this is happening. Have you guys ever had this issue? Any ideas or suggestions welcomed!

推荐答案

这适用于我:

    [[UIApplication sharedApplication] setStatusBarOrientation:[UIDevice currentDevice].orientation animated:NO];

看起来这些警报视图根据状态栏定位自己(状态栏是否可见)

It appears these alert views orient themselves based on the status bar (whether status bar is visible or not)

这篇关于应用程序购买时,应用程序恢复时,警报框方向更改为纵向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆