 
 
 
+// MARK: - 弹出动画和消失动画的代理
+
 extension HomeViewController : UIViewControllerAnimatedTransitioning{
     
     
+    /// 返回动画时间
     func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval{
        
-        return 2.0
+        return 0.5
     }
     
     /// 获取“转场动画上下文”，可以通过上下文获取弹出的View额消失的view

    
    // MARK: - 懒加载属性
    fileprivate lazy var titleBtn : TitleButton = TitleButton()
    
    


    /// 自定义弹出和消失的转场动画
    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        
        isPresent = true
        
        return self
    }
    
    /// 自定义消失的转场动画
    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        
        
        isPresent = false
        return self
    }
    
