Created
March 25, 2015 18:17
-
-
Save leonaka/51c1de59b64c863932f0 to your computer and use it in GitHub Desktop.
Tumblr- and Tweetbot-like view on top of UIActivityViewController, with appearance animation (put it on a subclass of UIActivityViewController)
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
| - (void)viewWillAppear:(BOOL)animated | |
| { | |
| [super viewWillAppear:animated]; | |
| CGFloat distance = 10.0; | |
| [self.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
| [UIView performWithoutAnimation:^{ | |
| self.effectView.frame = CGRectMake(0, self.view.frame.size.height - self.effectView.frame.size.height - distance, self.view.frame.size.width, self.effectView.frame.size.height); | |
| }]; | |
| self.effectView.frame = CGRectMake(0, -self.effectView.frame.size.height - distance), self.view.frame.size.width, self.effectView.frame.size.height); | |
| } completion:nil]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment