ipad 上的通知横幅在应用程序启动时颠倒显示横向(左主页按钮) [英] notification banner on ipad displayed upside down when app is launching Landscape (left home button)
问题描述
我有一个支持两个方向的 iPad 应用程序,我在 info.plist 上将支持的界面方向设置为横向(右主页按钮)和横向(左主页按钮).我还将初始界面方向设置为横向(右主页按钮).
I had an iPad app that supports two Orientation I set Supported interface orientations on info.plist to Landscape (right home button) and Landscape (left home button). I also set Initial interface orientation to Landscape (right home button).
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
}
当我收到推送通知并且我的应用程序关闭时.我不是从通知中启动应用程序的.通知横幅上下颠倒.只有当我在横向(左主页按钮)上拿着 ipad 时才会发生这种情况.有什么我想念的吗?任何帮助,将不胜感激.提前致谢,
When I receive push notification and my app is closed. And I started the app not from notification. The notification banner appears up-side down. This happens only when I'm holding ipad on Landscape (left home button). Is there something I'm missing? Any help would be appreciated. Thanks in advance,
推荐答案
我也面临同样的问题,尝试了很多方法;在我的应用程序中,我只需要横向,所以我设置了
I am also facing same issue and tried many ways; In my app I require only landscape orientation so I set
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
在每个ViewController
和在 info.plist
支持的界面方向我设置
and in info.plist
for supported interface orientation I am setting
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
这解决了我的问题.
这篇关于ipad 上的通知横幅在应用程序启动时颠倒显示横向(左主页按钮)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!