[Swift]UIView Extension #6
UIView Extension #6
func animateBG2Black(duration:CGFloat=0.3){ UIView.setAnimationBeginsFromCurrentState(true) UIView.animateWithDuration(NSTimeInterval(duration), delay: 0.0, usingSpringWithDamping: 1.0, initialSpringVelocity: 0.0, options: UIViewAnimationOptions.CurveLinear, animations: { () -> Void in self.backgroundColor = UIColor.blackColor() }, completion: { (finish:Bool) -> Void in } ) }