diff --git a/UIKit-Dynamics-Example/TLContainmentViewController.m b/UIKit-Dynamics-Example/TLContainmentViewController.m index ec3f257..a55ca7e 100644 --- a/UIKit-Dynamics-Example/TLContainmentViewController.m +++ b/UIKit-Dynamics-Example/TLContainmentViewController.m @@ -89,6 +89,20 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { contentViewController.delegate = self; } } +#pragma mark - Handle Rotation +- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator +{ + [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; + self.animator = nil; + self.menuOpen = NO; + [coordinator animateAlongsideTransition:^(id context) { + // Place code here to perform animations during the rotation. + // You can pass nil or leave this block empty if not necessary. + + } completion:^(id context) { + [self setupMapContainerViewAnimatorProperties]; + }]; +} #pragma mark - UIGestureRecognizerDelegate Methods