Я новичок в Swift, и у меня есть это расширение:
extension UIView.KeyframeAnimationOptions {
init(animationOptions: UIView.AnimationOptions) {
rawValue = animationOptions.rawValue
}
}
Начиная с swift 4.2, rawValue = animationOptions.rawValue
выдаёт мне это предупреждение:
Initializer for struct 'UIView.KeyframeAnimationOptions' must use "self.init(...)" or "self = ..." because the struct was imported from C
Я использую расширение какчто:
UIView.animateKeyframes(withDuration: 1.2, delay: 0.0, options: [.repeat, UIView.KeyframeAnimationOptions(animationOptions: .curveEaseOut)], animations: {
...
}
Как я могу исправить это предупреждение от struct was imported from C
?
Благодаря вашему ответу