Xcode - Terminating with uncaught exception of type NSException when a button is pressed

前端 未结 4 1156
南旧
南旧 2021-01-20 18:46

I\'m new to app development and I\'m following Apple\'s tutorial to learn. I\'ve looked through a lot of questions asked about this type of error but none of them are helpin

4条回答
  •  星月不相逢
    2021-01-20 19:30

    You're missing the ":" in the selector, try the following instead:

    button.addTarget(self, action: "ratingButtonTapped:", forControlEvents: .TouchDown)
    

    I hope this help you.

提交回复
热议问题