您需要使用数组curveEaseInOut:
UIView.animate(withDuration: duration, delay: 0.0, option: [.curveEaseIn, .curveEaseOut], animations: { [weak self]() -> void in }
Run Code Online (Sandbox Code Playgroud)
在curveEaseInOut已被删除的Swift 3.0,所以这里是解决办法,以实现动画.