使用 PayPal lib 时的 iPhone 方向错误

发布于 2024-10-05 02:07:09 字数 513 浏览 0 评论 0原文

我在我的 iPhone 应用程序中使用 Paypal 库。除了一件小事,方向之外,我的测试帐户一切正常。

我的应用程序是横向的,而 PayPal 库生成的屏幕是纵向的,当我从 PayPal 屏幕移回我的应用程序时,视图仍然全部是横向的,但状态栏移动到纵向,从而在状态栏通常的位置留下一个空间坐下并用状态栏切断视图的左侧。

我没有做任何奇怪的代码,只是下面显示的正常方向方法。任何建议表示赞赏:)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) 接口方向{ [[UIApplication shareApplication] setStatusBarOrientation:UIDeviceOrientationLandscapeLeft 动画:FALSE]; return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); }

I'm using the Paypal library in my iphone app. Its all working fine with my test account except for one little thing, orientation.

My app is in landscape and the screen generated by the PayPal lib is portrait, when I move back from the PayPal screen to my app the views are still all in landscape but the status bar moves to portrait, thus leaving a space where the bar usually sits and cutting off the left hand side of the view with the status bar.

I'm not doing anything strange code-wise just the normal orientation methods shown below. Any advice appreciated :)


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation{
[[UIApplication sharedApplication] setStatusBarOrientation:UIDeviceOrientationLandscapeLeft animated:FALSE];
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

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

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

发布评论

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

评论(1

三生池水覆流年 2024-10-12 02:07:09

我想我会回来更新这个。我从来没有弄清楚如何解决这个问题,但这似乎是一个操作系统错误,因为我在 iPhone 上的其他本地 Apple 应用程序中看到过它出现的情况。 YouTube 应用程序就是一个例子,有时在纵向和横向之间切换可能会导致状态栏位于 worg 位置,提供图片。

我决定从应用程序中完全删除状态栏并将其全屏显示。希望很快就会发布修复程序!

替代文字

Thought I'd come back and give an update to this one. I never did figure out how to fix this but it seems to be an OS bug as I've seen it appear in other native Apple apps on the iphone. The youtube app is an example, sometimes switching between portrait and landscape can result in the status bar being in the worg position, pic provided.

I've decided to remove the status bar completely from the app and have it full screen. hope theres's a fix released for this soon!

alt text

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