I have just finished updating and sending an iOS 6.0 version of one of my Apps to the store. This version is backwards compatible with iOS 5.0, thus I kept the shouldAutorotateToInterfaceOrientation:
method and added the new ones as listed below.
I had to do the following:
Autorotation is changing in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation:
method of UIViewController is deprecated. In its place, you should use the supportedInterfaceOrientationsForWindow:
and shouldAutorotate
methods.
Thus, I added these new methods (and kept the old for iOS 5 compatibility):
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
- Used the view controller’s
viewWillLayoutSubviews
method and adjust the layout using the view’s bounds rectangle.
- Modal view controllers: The
willRotateToInterfaceOrientation:duration:
,
willAnimateRotationToInterfaceOrientation:duration:
, and
didRotateFromInterfaceOrientation:
methods are no longer called on
any view controller that makes a full-screen presentation over
itself—for example, presentViewController:animated:completion:
.
- Then I fixed the autolayout for views that needed it.
- Copied images from the simulator for startup view and views for the iTunes store into PhotoShop and exported them as png files.
- The name of the default image is:
Default-568h@2x.png
and the size is 640×1136. It´s also allowed to supply 640×1096 for the same portrait mode (Statusbar removed). Similar sizes may also be supplied in landscape mode if your app only allows landscape orientation on the iPhone.
- I have dropped backward compatibility for iOS 4. The main reason for that is because support for
armv6
code has been dropped. Thus, all devices that I am able to support now (running armv7
) can be upgraded to iOS 5.
- I am also generation armv7s code to support the iPhone 5 and thus can
not use any third party frameworks (as Admob etc.) until they are
updated.
That was all but just remember to test the autorotation in iOS 5 and iOS 6 because of the changes in rotation.