Posts Tagged ‘iPad Programming Guide’

Autorotation for interfaces of iPad apps

Tuesday, June 8th, 2010

The majority of iPhone and iPod touch applications support portrait orientation only. Many web developers haven’t even thought about adding landscape orientation where it is really necessary. Apple isn’t an exception: it didn’t realize the support of landscape orientation in the important system programs of iPhone OS 2.x (the company has corrected its mistake in iPhone OS 3.x).

With iPad arrival the situation has changed. Apple obliged all iPad apps developers to support the both types of orientation in iPad applications. Of course, there can be exceptions, for example, games. But applications that don’t have fixed (functional) binding to the orientation must be user-friendly in any position of the device.

iPad_orientation

iPad_orientation_2

There are no difficulties with simple interfaces. The necessary attribute autoresizingMask which describes the changes of the frame is assigned to the UIView class objects. This method is not applicable to complicated interfaces.

Smooth and pleasant autorotation of the application interface can be performed with the help of the layoutSubviews method. The detailed information about this method can be obtained at iPad Programming Guide.