How fix app UI while upgrading ios6 to ios7 with a single line of code

A sample application UI in iOS6
Screen Shot 2013-09-20 at 10.52.14 PM

A sample application UI in iOS7 before applying the fix given below
Screen Shot 2013-09-20 at 10.52.59 PM

A sample application UI in iOS7 after applying the fix given below
Screen Shot 2013-09-20 at 10.53.55 PM

Add following code to viewDidLoad make support for iOS6 and iOS7 for nib and programmatic code:

self.edgesForExtendedLayout = UIRectEdgeNone;
self.automaticallyAdjustsScrollViewInsets = NO;

Leave a Reply