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

前端 未结 4 1115
南旧
南旧 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:41

    If you're using Swift 3, the line in question would have to be changed to:

    button.addTarget(self, action: #selector(StarRatingControl.ratingButtonTapped), for: .touchDown)

提交回复
热议问题