//放大动画
    private func enlargeAnimation (sender: UIControl) ->Void{

        let scale=CGAffineTransformMakeScale(0.9, 0.9)
        UIControl.animateWithDuration(0.2, animations: {
        sender.transform=scale
        })
        
    }
    
    //缩小动画
    private func narrowAnimation (sender: UIControl) ->Void{
        
        let scale=CGAffineTransformMakeScale(1, 1)
        UIControl.animateWithDuration(0.2, animations: {
            sender.transform=scale
        })
        
    }

 

posted on 2016-08-20 19:43  青年程序猿  阅读(394)  评论(0)    收藏  举报