I've been working a little with the new UI options in iOS 7, and the automaticallyAdjustsScrollViewInsets
property in UIViewController
is really freaking me out. the thing is, either you don't set it, but then you will have to position your scroll views differently in iOS 7 and other iOS versions. the alternative is to set it to NO
only for iOS 7 and use the same positioning. I don't understand why apple implemented this property at all, in my opinion, good practice would be always having it to NO
(not having such a property at all), just like it was before. I understand that it is easier to use if you are lazy, but this seems like a really bad programming practice in my opinion. am I missing out on something or do you agree?
I don't see any problem. iOS 6 SDK does not contain this property. You just should use following code:
if([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)])
{
self.automaticallyAdjustsScrollViewInsets = NO;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With