Not long ago, i had to extend an app to support iPhone 5. Yes… iOS has autolayout functionality, that should aid the development of UIView’s.
But how about assets?. How do you load assets specially crafted for 568px height screens?. Furthermore.. how do you patch classes that inherit from UITableViewCell, to return dynamic height, according to the device?.
Simple!. By means of a super short UIScreen extension. The header should look like this…:
@interface UIScreen (Lantean)
Write the following snippet in the .m file:
@implementation UIScreen (Lantean)
static BOOL isH568 = NO;
static dispatch_once_t _once;
isH568 = ([UIScreen mainScreen].bounds.size.height == 568);
Fair enough. By checking [UIScreen isH568], you should be able to proceed as required… if the current device has the new 4 inches screen!.