options參數(shù)設置
UIView.animateWithDuration(3, delay: 0, usingSpringWithDamping: 0.1, initialSpringVelocity: 1, options: nil, animations: {
?? ? ? ? ? ? self.blueSquare.center.x = self.view.bounds.width - self.blueSquare.center.x
? ? ? ? ? ? }, completion: nil)
options參數(shù)設置為nil會出錯
2015-12-29
swift 2 里面 option后面 用[]來表示nil, 多個option也是用[option1, option2, option3]這種來設置