UnityViewControllerBase+iOS.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. @interface UnityViewControllerBase (iOS)
  3. - (BOOL)shouldAutorotate;
  4. - (BOOL)prefersStatusBarHidden;
  5. - (UIStatusBarStyle)preferredStatusBarStyle;
  6. @end
  7. // for better handling of user-imposed screen orientation we will have specific ViewController implementations
  8. // view controllers constrained to one orientation
  9. @interface UnityPortraitOnlyViewController : UnityViewControllerBase {}
  10. @end
  11. @interface UnityPortraitUpsideDownOnlyViewController : UnityViewControllerBase {}
  12. @end
  13. @interface UnityLandscapeLeftOnlyViewController : UnityViewControllerBase {}
  14. @end
  15. @interface UnityLandscapeRightOnlyViewController : UnityViewControllerBase {}
  16. @end
  17. // this is default view controller implementation (autorotation enabled)
  18. @interface UnityDefaultViewController : UnityViewControllerBase {}
  19. @end
  20. // this is helper to add proper rotation handling methods depending on ios version
  21. extern "C" void AddViewControllerRotationHandling(Class class_, IMP willRotateToInterfaceOrientation, IMP didRotateFromInterfaceOrientation, IMP viewWillTransitionToSize);
  22. extern "C" void AddViewControllerDefaultRotationHandling(Class class_);
  23. NSUInteger EnabledAutorotationInterfaceOrientations();