title: automaticallyAdjustsScrollViewInsets doesn't work in iOS9
body: <p>In my app I have lots of VCs with scrollviews of all kinds (table, collection, etc.). All of them appear inside NavigationController and I used <code>.automaticallyadjustsscrollviewinsets</code> property of VC to prevent content from going under the NavigationBar. It works fine prior to iOS9.</p>
  
  <p>I've updated my test iPhone to iOS9 yesterday and noticed that all scrollviews now does not have proper insets. I've updated XCode to latest version (7.0) and rebuilt the app - no effect. I've checked on the other device, which is still running iOS8.x - insets work correctly. I looked through iOS9 sdk changelogs and didn't find anything related to my problem. Is this a bug or a new behaviour? Anyone else having this problem? Possible solutions?</p>
  
  <p><strong>UPDATE1</strong></p>
  
  <p>I've came up with quick fix:</p>
  
  <pre><code>if (__iOS_9_OR_GREATER__) {
  
      CGFloat topInset = 20;
  
      if (self.navigationController) {
          topInset += self.navigationController.navigationBar.bounds.size.height;
      }
  
      UIEdgeInsets insets = UIEdgeInsetsMake(topInset, 0, 0, 0);
  
      self.collectionView.contentInset = insets;
      self.collectionView.scrollIndicatorInsets = insets;
  
  }
  </code></pre>
  
  <p>It works. But question is still relevant, is this a bug in iOS9?</p>
  
  <p><strong>UPDATE2</strong></p>
  
  <p>Answering the question in the comments about <code>__iOS_9_OR_GREATER__</code>. Probably not the most efficient solution, but gets the job done.</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  #define __iOS_9_OR_GREATER__ [NKOSVersionCheck isMajorOSVersionAtLeast:9]
  
  @interface NKOSVersionCheck : NSObject
  
  + (BOOL)isMajorOSVersionAtLeast:(NSUInteger)version;
  
  @end
  
  #import "NKOSVersionCheck.h"
  
  @implementation NKOSVersionCheck
  
  NSOperatingSystemVersion _majorOSVersion(int version) {
  
      NSOperatingSystemVersion iOS_x;
      iOS_x.majorVersion = version;
      iOS_x.minorVersion = 0;
      iOS_x.patchVersion = 0;
  
      return iOS_x;
  
  }
  
  + (BOOL)isMajorOSVersionAtLeast:(NSUInteger)version {
  
      return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:_majorOSVersion(9)];
  
  }
  
  
  @end
  </code></pre>