登录加载、返回按钮转场动画控件

时间:2016-08-13 22:32 来源:互联网 作者:源码搜藏收藏

  • 源码类别:按钮表单
  • 源码大小:未知
  • 编码格式:gbk,utf8,不限
  • 运行环境:php+mysql
  • 广告推荐


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
}

本站资源仅限于学习研究,严禁从事商业或者非法活动! 源码搜藏网所有源码来自互联网转载与用户上传分享,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!

按钮表单下载排行

最新文章