vendredi 25 mai 2012

Create NIB based auto rotate UIView in IOS

If your application does not support device rotation, its popularity on iTunes Store will be very low. However, how handle all these subview locations depending on screen orientation? Doing this at runtime is a nightmare and it would be very useful to design your two screen orientations in XCODE and save them as a NIB file, and have the program to select one NIB or the other depending on the device orientation. However, just reloading the NIB file at runtime would loose any field value at this time, requiring to save each field state (what a mess). This UIAutoRotateView class will handle that for you, differently.

Lire la suite...