Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created January 2, 2014 08:25
Show Gist options
  • Save koromiko/8216397 to your computer and use it in GitHub Desktop.
Save koromiko/8216397 to your computer and use it in GitHub Desktop.
bound frame size for ipad or landscape view
CGRect windowBounds;
if (UIInterfaceOrientationIsLandscape([[UIDevice currentDevice] orientation])) {
windowBounds = CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.height, [UIScreen mainScreen].bounds.size.width );
}else{
windowBounds = CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment