Skip to content

Instantly share code, notes, and snippets.

@yuchan
Last active August 29, 2015 14:06
Show Gist options
  • Save yuchan/6d2a7b5ea36681f1ff1c to your computer and use it in GitHub Desktop.
Save yuchan/6d2a7b5ea36681f1ff1c to your computer and use it in GitHub Desktop.
iOS8 uiview transformation snippet
// no transforms applied to window in iOS 8
BOOL ignoreOrientation = [[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)];
if(!ignoreOrientation && UIInterfaceOrientationIsLandscape(orientation)) {
//iOS8 landscape
}else if(UIInterfaceOrientationIsLandscape(orientation)) {
//~iOS7 landscape
}else {
// portrate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment