“classname has no member functionname” when adding UIButton target
问题 Super newb in Swift and iOS development here. I am following this tutorial about implementing a custom control in a single view iOS app. It's a Swift 2 tutorial, but so far I'm doing OK transposing everything to 3 as I go (I use XCode 8 Beta). I have a custom class, RatingControl , connected to a View in the storyboard. In the class's constructor, I create a button: let button = UIButton(frame: CGRect(x: 0, y: 0, width: 44, height: 44)) button.backgroundColor = UIColor.red() Then, I try to