`curveEaseInOut`在Swift 3中不可用

nir*_*i21 3 uiviewanimation swift3 ios10 xcode8

在swift 3更新中,我收到此错误消息 在此输入图像描述

如果方法调用有任何变化,请告诉我.

谢谢

Soh*_*mon 7

您需要使用数组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,所以这里是解决办法,以实现动画.