Skip to content

Commit

Permalink
Handling rotation across iOS 7 and 8 correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Zabłocki committed Sep 26, 2014
1 parent 8bad338 commit 23634d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DynamicXray/DynamicXray/DXRDynamicXrayWindowController.m
Expand Up @@ -209,6 +209,15 @@ - (void)dynamicXrayWindowNeedsToLayoutSubviews:(__unused DXRDynamicXrayWindow *)
AngleForUIInterfaceOrientation(UIInterfaceOrientation interfaceOrientation)
{
CGFloat angle;
BOOL ignoreOrientation = NO;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
if ([[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)]) {
ignoreOrientation = YES;
}
#endif
if (ignoreOrientation) {
return 0;
}

if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
angle = (CGFloat)M_PI;
Expand Down

0 comments on commit 23634d2

Please sign in to comment.