swift - Build WatchOS Apps: Develop and Design -
i trying run sample code book build watchos: develop , design. following segment of code returns 2 errors: @ibaction func buttontapped(){ if animating { spinnerimage.stopanimating() animating = false animatewithduration(0.2, animations: updatebuttontostopped()) } else { spinnerimage.startanimating() animating = true animatewithduration(0.2, animations: updatebuttontogoing()) } } both errors occur in calls animatewithduration() , indicate there type conflict. ideas of how can fix this? in hurry? instead of calling animatewithduration so: animatewithduration(0.2, animations: updatebuttontostopped()) you'd give updatebuttontostopped function parameter so: animatewithduration(0.2, animations: updatebuttontostopped) notice () after updatebuttontostopped gone. and same goes updatebuttontogoing of course :) why? if @ documentation animatewithduration ...