Swift unrecognized selector sent to instance error

前端 未结 3 1282
渐次进展
渐次进展 2020-12-21 21:05

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

3条回答
  •  情歌与酒
    2020-12-21 21:50

    For Swift 2.2 with Xcode 8:

    self.followedButton.addTarget(parentView, action: #selector(CustomCell.followButtonClick(_:)), forControlEvents: .TouchUpInside)
    

提交回复
热议问题