Mr Q
Mr Q

Reputation: 127

iPad orientation

I have question regarding changing orientation on iPad.

I use MonoTouch, but if Obj-C programmers can help, it will be just as great.

First of all, I figured out if I provide different splash screen images for different orientations, app will show the right one. This can be done for any orientation, such as "Default-LandscapeLeft.png", or generic one "Default-Landscape.png".

All of my images are of correct dimensions and yet, when I start it in portrait mode, it shows it enlarged. All of other modes work perfectly well.

Second problem is I want my app to continue to be in that orientation after my first controller appear. At the moment, it shows portrait in any case. I started generating orientation notifications before first controller appeared (UINavigationController), but I think it responds only on orientation changes. After I moved device, it rotates and from that moment, everything works fine. BUT, I want to "inherit" orientation info from my splash screen.

Any idea will be appreciated.

Thanks guys and girls.

Cheers

Upvotes: 1

Views: 488

Answers (1)

Scarlaxx
Scarlaxx

Reputation: 835

Images for different orientations: Default.png and Default-Landscape.png should be provided + setting the app settings to provide the required orientations.

Second problem: After creating the first controller call

myController.WillRotate(UIApplication.SharedApplication.StatusBarOrientation, 0);

Upvotes: 1

Related Questions