Created
June 20, 2016 12:44
-
-
Save maxcampolo/d35f0657570a553a64b4c78a45214bb4 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
public override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { | |
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator) | |
// Before rotation (willTransitionToInterfaceOrientation) | |
// ... Do stuff that should happen before rotation ... // | |
coordinator.animateAlongsideTransition({ (context) in | |
// During rotation | |
// ... Do stuff that should happen during rotation ... // | |
}, | |
completion: { (context) in | |
// After rotation (didTransitionToInterfaceOrientation) | |
// ... Do stuff that should happen after rotation ... // | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment