当应用程序恢复时,应用程序内购买警报框方向更改为纵向

发布于 2024-10-03 16:57:40 字数 165 浏览 0 评论 0原文

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

我不知道为什么会发生这种情况。大家有遇到过这个问题吗?欢迎任何想法或建议!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

草莓味的萝莉 2024-10-10 16:57:40

这对我有用:

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

这些警报视图似乎根据状态栏自行定位(无论状态栏是否可见)

This worked for me:

    [[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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文