Last active
April 9, 2018 10:51
-
-
Save TheCodeEngine/3776309 to your computer and use it in GitHub Desktop.
Auto Rotate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)shouldAutorotate { | |
return YES; | |
} | |
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { | |
// Move the Labels into place | |
switch ([UIDevice currentDevice].orientation) { | |
case UIDeviceOrientationLandscapeLeft: | |
case UIDeviceOrientationLandscapeRight: | |
{ | |
clock.frame = [TCEClock calcPositionMiddlefromBounds:self.view.bounds clockwidth:250.f]; | |
break; | |
} | |
case UIDeviceOrientationPortrait: | |
case UIDeviceOrientationFaceDown: | |
{ | |
clock.frame = [TCEClock calcPositionMiddlefromBounds:self.view.bounds clockwidth:250.f]; | |
break; | |
} | |
default: | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
666