Я пытаюсь использовать JSSAlertView (github.com/stakes/JSSAlertView) с Swift 2.0, но у меня есть ошибка:не может ссылаться на animateWithDuration со списком аргументов типа
Cannot invoke animateWithDuration with an argument list of type '(Double, delay: Double, usingSpringWithDampling: Double, initialSpringVelocity: Double, options: nil, animations() -> _, completion: (Bool) -> _)'
для кода:
UIView.animateWithDuration(0.5, delay: 0.05, usingSpringWithDamping: 0.8, initialSpringVelocity: 0.5, options: nil, animations: {
self.containerView.center = self.rootViewController.view.center
}, completion: { (finished: Bool) in
})
Я видел это два ответа: Nested closures does not like argument list UIView Animation in Swift not working, wrong arguments error но они мне не помогают.
Я все еще думаю, что проблема возникает либо из «анимации», либо «завершения».
демпфирование ➝ демпфирование. Вы повторно написали это или скопировали и вставили его? – nielsbot
@nielsbot Я перепечатал, моя ошибка извините – Antoine