 //
 
 import UIKit
-
+import pop
 class EPMComposeView: UIView {
 
+    var target:UIViewController?
+    
     override init(frame: CGRect) {
         super.init(frame: UIScreen.main.bounds)
         setupUI()

    }()
 
    lazy var imgAds:UIImageView = UIImageView(image: UIImage(named: "compose_slogan"))
}
extension EPMComposeView{
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        self.removeFromSuperview()
    }
}
//MARKE: 对外接口
extension EPMComposeView{
    func showView() {
        
    }
    
}


            btn.frame = CGRect(x: btnMargine+(btnMargine+btnWidth)*col, y: (btnMargine+btnHeight)*row, width: btnWidth, height: btnHeight+screenHeight)
            btn.composeModel = model
            
            btnArr.append(btn)
            btn.addTarget(self, action: #selector(clickBtnAction(btn:)), for: .touchUpOutside)
            addSubview(btn)
        }
        
    }
    fileprivate func btnAnimation(isUP:Bool) {
        let msrginY = isUP ? -350 : 350
        let btnList = isUP ? btnArr : btnArr.reversed()
        for (i,button) in btnList.enumerated(){
            // 实例化弹簧动画对象
            let anSpring = POPSpringAnimation(propertyNamed: kPOPViewCenter)!
            // 设置toValue
            anSpring.toValue = CGPoint(x: button.center.x, y: button.center.y + CGFloat(msrginY))
            // 开始时间 CACurrentMediaTime() 系统绝对时间
            anSpring.beginTime = CACurrentMediaTime() + Double(i)*0.025
            // 振幅
            anSpring.springBounciness = 10.0
            // 设置动画
            button.pop_add(anSpring, forKey: nil)
            
            
        }
        
        
    }
    
    @objc fileprivate func clickBtnAction(btn:EPMComposeButton) {
        
        
        
        
    }
    
}





