Notification banner on ipad is displayed upside down when launching Landscape app (home stop button)

I had an iPad app that supports two Orientations, which I set for the supported orientations of the interface on info.plist to Landscape (right home button) and Landscape (left home button). I also set the orientation of the start interface to Landscape (right home button).

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
}

      

When I receive a push notification and my app is closed. And I started the app not from a notification. The notification banner is displayed upward. This only happens when I keep my ipad on Landscape (left home button). Is there something I am missing? Any help would be greatly appreciated. Thanks in advance,

0


a source to share


1 answer


I am also facing the same problem and have tried many ways; In my application, I only need an orientation to the album, so I set

return UIInterfaceOrientationIsLandscape(interfaceOrientation);

in shouldAutorotateToInterfaceOrientation

eachViewController



and in info.plist

for a supported interface orientation I set

<array>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>

      

This solved my problem.

+4


a source







All Articles