Automatic rotation of the default app image according to the current landscape mode

Is it possible to automatically rotate the default app image to match the current landscape mode? I can just rotate my views to match the information from the class UIDevice

, but I would like the whole application to be in the correct landscape mode from the start.

0


a source to share


3 answers


This is not possible at the moment. If your app is designed to run in landscape mode, you can rotate the default image, but there is no way to show a different image or rotate it depending on the orientation when you launch the app.



+2


a source


Update

Updated after comments ...

Trick you can use: Use portrait default.png

At startup load default.png into UIImageView and rotate yourself.

UIImageview *myImage = [UIImageView alloc] initWithImage:[UIImage imageNamed:@"default.png"]]];

[UIView beginAnimations:@"rotate" context:nil]
[UIView setAnimationDelay:0.25];
[UIView setAnimationDuration:duration];

//rotation transform logic

[UIView commitAnimations];  

      

You can rotate it left or right according to your settings. Then fade in UI with another animation block.




Original Answer

This view is meaningless. No need to rotate graphics.

If you are launching an album in landscape, just create the launch graphics in landscape orientation (using Photoshop or something similar).

If you think that sometimes the phone will be in the landscape and sometimes it won't be during startup, that's not a problem. The HIGs instruct you to simply render a view in the correct orientation if it only supports that orientation. Example. Youtube app automatically goes to landscape to show the video and return to portrait to display the table view. You don't have to compensate for what your user might be doing prior to launch.

0


a source


It's now possible in Xcode 4.0 here - it's a downloadable app that does it on purpose.

0


a source







All Articles