Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIInterfaceOrientationLandscapeRight || orientation == UIInterfaceOrientationLandscapeLeft ) {
NSLog(@"Landscape");
self.pageWidth = size.width;
self.pageHeight = size.height;
}
else {
NSLog(@"Portrait");
self.pageWidth = size.height;
self.pageHeight = size.width;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.