Skip to content

Commit

Permalink
fixed up native test for landscape
Browse files Browse the repository at this point in the history
  • Loading branch information
prime31 committed Aug 18, 2010
1 parent 40c2c1a commit 3dda46e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions NativeCode/UnityNativeManager.mm
Expand Up @@ -99,6 +99,12 @@ - (void)showViewControllerWithName:(NSString*)name
_navigationControler.navigationBarHidden = YES;
_navigationControler.view.backgroundColor = [UIColor orangeColor];

// If we are landscape, manually rotate our view
if( [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft )
controller.view.transform = CGAffineTransformMakeRotation( -1.5708 );
else if( [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight )
controller.view.transform = CGAffineTransformMakeRotation( 1.5708 );

UIWindow *window = [UIApplication sharedApplication].keyWindow;

// Set up the fade-in animation
Expand Down
Binary file modified TestScenes/NativeTest.unitypackage
Binary file not shown.

0 comments on commit 3dda46e

Please sign in to comment.