zoukankan      html  css  js  c++  java
  • 转场动画再次学习

    demo链接:http://pan.baidu.com/s/1kVvn1Uf

    主要理清转场动画,和转场交互动画的使用

    present/dissmiss

    需要:

    self.transitioningDelegate = self;

    <UIViewControllerTransitioningDelegate>

    #pragma mark - 定制转场动画 (Present 与 Dismiss动画代理)
    - (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented
                                                                      presentingController:(UIViewController *)presenting
                                                                          sourceController:(UIViewController *)source

    交互代理

    - (id<UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation:(id<UIViewControllerAnimatedTransitioning>)animator

    push/pop

    需要

    <UINavigationControllerDelegate>

    self.navigationController.delegate = self;

    - (id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
                                       animationControllerForOperation:(UINavigationControllerOperation)operation
                                                    fromViewController:(UIViewController *)fromVC
                                                      toViewController:(UIViewController *)toVC

    交互代理

    - (id <UIViewControllerInteractiveTransitioning>)navigationController:(UINavigationController *)navigationController
                              interactionControllerForAnimationController:(id <UIViewControllerAnimatedTransitioning>) animationController 

    然后你只需要在动画转场里面做动画就行了,添加手势百分比会根据动画的百分比播放动画

    简单来说自定义转场动画除了比较麻烦的步骤,剩下的就是--添加动画,控制手势方向和比率

  • 相关阅读:
    黑白逆向编程课程笔记 8.静&动态地址&偏移
    黑白逆向编程课程笔记 7.CE使用(2)
    黑白逆向编程课程笔记 6.CE使用(1)
    传奇资源
    分布式——分布式发号器
    SpringBoot——属性注入
    SpringBoot——启动与自动配置类查找
    Mybatis——Spring事务实现
    SpringAOP——事务实现
    Linux——IO技术
  • 原文地址:https://www.cnblogs.com/hxwj/p/5320305.html
Copyright © 2011-2022 走看看