 import SnapKit
 
 class WBControlView: UITabBar {
+    
+    private let animationDuration = 0.65
     
     private lazy var dayLabel: UILabel = {
         let l = UILabel(title: "8", fontSize: 50, fontColor: UIColor.colorWithHex(hex: 0x666666))


extension WBControlView {
    @objc private func tapAction(sender: UITapGestureRecognizer) {
        self.removeFromSuperview()
    }
    
    @objc private func close(sender: UIButton) {
        sender.isHighlighted = true
    }
}

        addSubview(addButton)
        addButton.snp.makeConstraints { (make) in
            make.centerX.equalTo(self)
            if screenHeight == 812.0 {
                make.centerY.equalTo(self.snp.bottom).offset(0.0 - (34.0 + 24.5))
            }else{
                make.centerY.equalTo(self.snp.bottom).offset(-24.5)
            }
        }
        //添加扭动动画
        UIView.animate(withDuration: animationDuration) {
            self.addButton.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 4)
        }
    }
    
