react-native-navigation的迁移库

ContentTransitionCreator.m 898B

12345678910111213141516171819202122
  1. #import "ContentTransitionCreator.h"
  2. @implementation ContentTransitionCreator
  3. + (id<DisplayLinkAnimatorDelegate>)createTransition:(TransitionOptions *)elementTransition view:(UIView *)view fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC containerView:(UIView *)containerView {
  4. if (!elementTransition.alpha.hasAnimation) {
  5. elementTransition.alpha = self.defaultAlphaTransition;
  6. }
  7. return [super createTransition:elementTransition view:view fromVC:fromVC toVC:toVC containerView:containerView];
  8. }
  9. + (TransitionDetailsOptions *)defaultAlphaTransition {
  10. TransitionDetailsOptions* defaultAlphaTransition = [TransitionDetailsOptions new];
  11. defaultAlphaTransition.duration = [TimeInterval withValue:300];
  12. defaultAlphaTransition.from = [Double withValue:0];
  13. defaultAlphaTransition.to = [Double withValue:1];
  14. return defaultAlphaTransition;
  15. }
  16. @end