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

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

    For reference, I've decided to have a look at the sample and got a similar issue.

    I'm using XCode 8 + Swift 3 and these are my changes in order to get it working:

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

    Note: considering the file name "RatingControl.swift".

    I hope it help =D

提交回复
热议问题