Projects
View on GitHub
nathanwhy/HYAwesomeTransition
About
Custom transition between viewcontrollers
Design & MediaMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalHYAwesomeTransition
Custom transition between viewcontrollers.
The idea comes from gewara(格瓦拉).
Programming in Swift? Switch to Swift branch

Requirements
iOS 7.0 +
Example
self.awesometransition = [[HYAwesomeTransition alloc] init];
self.awesometransition.duration = 2.0f;
self.awesometransition.containerBackgroundView = customView;
[self.awesometransition registerStartFrame:startFrame
finalFrame:finalFrame
transitionView:cell];
[self presentViewController:vc animated:YES completion:^{
vc.avatar.hidden = NO;
}];
Implement UIViewControllerTransitioningDelegate and this delegate method:
- (id <UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
{
self.awesometransition.present = YES;
return self.awesometransition;
}
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
{
self.awesometransition.present = NO;
return self.awesometransition;
}
If you use UINavigationController,you have to implement UINavigationControllerDelegate instead of UIViewControllerTransitioningDelegate, but interactive gesture is not suppored yet.
- (id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
animationControllerForOperation:(UINavigationControllerOperation)operation
fromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC{
if (operation != UINavigationControllerOperationPush) {
self.awesometransition.present = NO;
}else{
self.awesometransition.present = YES;
}
return self.awesometransition;
}
License
HYAwesomeTransition is available under the MIT license. See the LICENSE file for more info.
Explore related projects
Loading…