Created
December 5, 2012 21:49
-
-
Save pmark/4219809 to your computer and use it in GitHub Desktop.
Make 3DAR fill the iPhone 5 screen
This file contains 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
#define IS_WIDESCREEN ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON ) | |
// | |
// Call this after starting the camera, which must happen after at or after viewDidAppear. | |
// | |
- (void)make3darFullscreen | |
{ | |
[self.mapView.sm3dar setFrame:[UIScreen mainScreen].bounds]; | |
[self.mapView.sm3dar.glView setFrame:[UIScreen mainScreen].bounds]; | |
if (IS_WIDESCREEN) | |
{ | |
CGFloat scale = 1.41; | |
self.mapView.sm3dar.camera.cameraViewTransform = CGAffineTransformMakeScale(scale, scale); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment