-
-
Save etolstoy/8705268 to your computer and use it in GitHub Desktop.
Footer Menu Animation
This file contains 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
- (void)showMenu | |
{ | |
CALayer* layer = _menuButtonImageView.layer; | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; | |
animation.fromValue = [NSNumber numberWithFloat:0.0 * M_PI]; | |
animation.toValue = [NSNumber numberWithFloat:1.0 * M_PI]; | |
animation.duration = 0.3; | |
animation.cumulative = YES; | |
animation.repeatCount = 1; | |
animation.removedOnCompletion = NO; | |
animation.fillMode = kCAFillModeForwards; | |
[layer addAnimation:animation forKey:@"transform.rotation.z"]; | |
[UIView animateWithDuration:0.3 animations:^{ | |
[_menuView setFrame:CGRectMake(_menuView.frame.origin.x, self.view.frame.size.height - _menuView.frame.size.height, _menuView.frame.size.width, _menuView.frame.size.height)]; | |
} completion:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment