Follow

Upgrading version 2.0.0 to 2.0.2

Inside the init methods of the various view controller, you should add the following to avoid problems caused by the automatic insertion of scrollView insets in iOS7 (note that this will cause a compiler warning in earlier versions of Xcode - it is also unnecessary if you have not upgraded to Xcode 5 as earlier versions do not support compiling for iOS7):

if ([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)]) {
  [self setAutomaticallyAdjustsScrollViewInsets:NO];
}

Depending on the status bar behaviour that you are aiming for, you may want to apply the following template change to your project as well. In DocumentViewController.m, add the following method (this is assuming that you desire light status bar text in your documentView and dark text everywhere else):

- (UIStatusBarStyle)preferredStatusBarStyle {
  return UIStatusBarStyleBlackTranslucent;
}

We use UIStatusBarStyleBlackTranslucent instead of UIStatusBarStyleLightContent in the template to avoid compiler errors in earlier version of Xcode, but both in fact represent the same value. This method is never called in iOS6 or earlier.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk