您好,欢迎来到源码搜藏!分享精神,快乐你我!提示:担心找不到本站?在百度搜索“源码搜藏”,网址永远不丢失!
  • 首 页
  • 在线工具
  • 登录加载、返回按钮转场动画控件

    时间:2016-08-13 22:32 来源:互联网 作者:源码搜藏 浏览:收藏 挑错 推荐 打印

    ProgressButton

    登录加载、返回按钮转场动画控件 开始学习swift,看到的一个栗子,感觉很酷,于是就模仿了 swift代码,浏览更多安卓源码

     
    Installation
    pod 'TKSubmitTransition'
    use_frameworks!
    

    Usage

    This is SubClass of UIButton

    btn = TKTransitionSubmitButton(frame: CGRectMake(0, 0, 44, 44))

    Animation Method

    func didStartYourLoading() {
        btn.startLoadingAnimation()
    }
    
    func didFinishYourLoading() {
        btn.startFinishAnimation {
            //Your Transition
            let secondVC = SecondViewController()
            secondVC.transitioningDelegate = self
            self.presentViewController(secondVC, animated: true, completion: nil)
        }
    }
    

    TKFadeInAnimator

    This Library also supply fade-in Animator Class of UIViewControllerAnimatedTransitioning.

    Please use This for transition animation.

    Usage

    please use UIViewControllerTransitioningDelegate

    class ViewController: UIViewController, UIViewControllerTransitioningDelegate {

    secondVC.transitioningDelegate = self

    // MARK: UIViewControllerTransitioningDelegate
    func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        let fadeInAnimator = TKFadeInAnimator()
        return fadeInAnimator
    }
    func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return nil
    }

    登录加载、返回按钮转场动画控件转载请注明出处http://www.codesocang.com/kj/anniu/33323.html 源码搜藏网所有源码来自用户上传分享,版权问题及牵扯到商业纠纷均与源码搜藏网无关
    标签: