I recently converted my project from Objective-C to Swift and in doing so I acquired this error whenever I click a button in the table view\'s cell. I have multiple cells be
Two changes for Swift 3:
The selector should look like:
#selector(ClassName.followButtonClick(_:))
The function should have an underscore:
@IBAction func followButtonClick(_ sender: UIButton!) { ...
Notice that these two should be in the same class, otherwise, make sure you initialize the ClassName
class.
If you want the selector method(followButtonClick(_:)
) to be in the UITableViewCell
class. Remove @IBAction
(I don't think you need it there):
func followButtonClick(_ sender: UIButton!) { ...