0
에 나는이 코드 블록과 문제가 있어요 :예상 표현 오류가 스위프트 3.0
private static func replaceAnimationMethods() {
//replace actionForLayer...
method_exchangeImplementations(
class_getInstanceMethod(self, #selector(UIView.actionForLayer(_:forKey:))),
class_getInstanceMethod(self, #selector(UIView.EA_actionForLayer(_:forKey:))))
//replace animateWithDuration...
method_exchangeImplementations(
class_getClassMethod(self, #selector(UIView.animateWithDuration(_:animations:))),
class_getClassMethod(self, #selector(UIView.EA_animateWithDuration(_:animations:))))
method_exchangeImplementations(
class_getClassMethod(self, #selector(UIView.animateWithDuration(_:animations:completion:))),
class_getClassMethod(self, #selector(UIView.EA_animateWithDuration(_:animations:completion:))))
method_exchangeImplementations(
class_getClassMethod(self, #selector(UIView.animateWithDuration(_:delay:options:animations:completion:))),
class_getClassMethod(self, #selector(UIView.EA_animateWithDuration(_:delay:options:animations:completion:))))
method_exchangeImplementations(
class_getClassMethod(self, #selector(UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:))),
class_getClassMethod(self, #selector(UIView.EA_animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:))))
}
내가 스위프트 3.0으로 마이그레이션하는 것을 시도하고있다.
의 경우 :
class_getClassMethod(self, #selector(UIView.animate(withDuration:animations:)(_:animations:))),
나는 오류 Expected expression in list of expressions
을 얻고있다.
의 경우 :
class_getClassMethod(self, #selector(UIView.animate(withDuration:animations:completion:)(_:animations:completion:))),
나는이 문제를 해결하는 방법 아이디어 갇혀 오류 Expected ',' separator
을 얻고있다. 모든 포인터 정말 감사하겠습니다.