27 June 2014

If you’re crazy, and if you’re creating your awesome app without storyboard or xib, sometimes you may encounter a case which on iOS 7 your view is shifted to bottom automatically a distance of status bar and navigation bar (64px), like below:

After go from Background

In fact, iOS 7 supports us an option for adjusting view by content inset. By default, it will be:

self.automaticallyAdjustsScrollViewInsets = YES;  // self is view controller

Then, if you want to get rid of the that default, just do in view controller:

self.automaticallyAdjustsScrollViewInsets = NO;

You also may face to this problem when do with table view, scroll view like an example here.



blog comments powered by Disqus

PLEASE, BUY ME A BREAD!