0

Basically, I have been using Start Developing iOS Apps (Swift) by Apple for learning and I have come across some code that simply does not work - the Apple version as well.

button.addTarget(self, action: #selector(RatingControl.ratingButtonTapped(_:)), 
forControlEvents: .TouchDown)

And the errors are:

  1. Expected ',' separator (between "action:" and "#selector" TWICE)

  2. Expected expression in lists of expressions

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356

1 Answers1

0

You must define funcion ratingButtonTapped() in your code.

Thành Ngô Văn
  • 142
  • 3
  • 10