Skip to content

Instantly share code, notes, and snippets.

@pmark
Created December 5, 2012 21:49
Show Gist options
  • Save pmark/4219809 to your computer and use it in GitHub Desktop.
Save pmark/4219809 to your computer and use it in GitHub Desktop.
Make 3DAR fill the iPhone 5 screen
#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