Search code examples
xcodewatchkituiviewanimation

WatchKit: Extra argument completion in call error


I am getting this error on my InterfaceController (watch Extension) but not on my iphone viewcontroller:

self.animate(withDuration: 0.2, animations: {
    self.someButton.setAlpha(0.5)
}, completion: {

})

enter image description here

What gives?


Solution

  • In UIKit, an animate(alongsideTransition:completion:) takes a completion parameter, but WatchKit's animate(withDuration:animations:) doesn't.