Created
August 28, 2015 15:13
-
-
Save haxpor/c6b3eb5dddc5ff8335ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
@class UnityView; | |
@interface UnityViewControllerBase : UIViewController | |
{ | |
} | |
- (BOOL)shouldAutorotate; | |
- (BOOL)prefersStatusBarHidden; | |
- (UIStatusBarStyle)preferredStatusBarStyle; | |
@end | |
// for better handling of user-imposed screen orientation we will have specific ViewController implementations | |
// view controllers constrained to one orientation | |
// | |
@interface UnityPortraitOnlyViewController : UnityViewControllerBase | |
{ | |
} | |
- (NSUInteger)supportedInterfaceOrientations; | |
@end | |
@interface UnityPortraitUpsideDownOnlyViewController : UnityViewControllerBase | |
{ | |
} | |
- (NSUInteger)supportedInterfaceOrientations; | |
@end | |
@interface UnityLandscapeLeftOnlyViewController : UnityViewControllerBase | |
{ | |
} | |
- (NSUInteger)supportedInterfaceOrientations; | |
@end | |
@interface UnityLandscapeRightOnlyViewController : UnityViewControllerBase | |
{ | |
} | |
- (NSUInteger)supportedInterfaceOrientations; | |
@end | |
// this is default view controller implementation (autorotation enabled) | |
// | |
@interface UnityDefaultViewController : UnityViewControllerBase | |
{ | |
} | |
- (NSUInteger)supportedInterfaceOrientations; | |
@end | |
// this is helper to add proper rotation handling methods depending on ios version | |
//extern "C" void AddViewControllerRotationHandling(Class class_, IMP willRotateToInterfaceOrientation, IMP didRotateFromInterfaceOrientation, IMP viewWillTransitionToSize); | |
//extern "C" void AddViewControllerDefaultRotationHandling(Class class_); | |
// this is helper to add proper rotation handling methods depending on ios version | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
void AddViewControllerRotationHandling(Class class_, IMP willRotateToInterfaceOrientation, IMP didRotateFromInterfaceOrientation, IMP viewWillTransitionToSize); | |
#ifdef __cplusplus | |
} | |
#endif | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
void AddViewControllerDefaultRotationHandling(Class class_); | |
#ifdef __cplusplus | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See fixes applied in https://github.com/haxpor/UnityNativePrototype.