Last active
August 29, 2015 14:19
-
-
Save minsOne/6b6da39d40a4c312fb82 to your computer and use it in GitHub Desktop.
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
| override func shouldAutorotate() -> Bool { | |
| return isRotate | |
| } | |
| override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { | |
| if UIDevice.currentDevice().orientation.isLandscape.boolValue { | |
| println("Now Device Orientation is Landscape") | |
| } else { | |
| println("Now Device Orientation is Portrait") | |
| } | |
| coordinator.animateAlongsideTransition({ (context: UIViewControllerTransitionCoordinatorContext!) in | |
| }, completion: { (context: UIViewControllerTransitionCoordinatorContext!) in | |
| println("Rotation is Completion") | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment