通过addTarget传递参数的新Xcode 7.3通常适用于我,但在这种情况下,它会在标题中抛出错误.有任何想法吗?当我尝试将其更改为@objc时,它会抛出另一个
谢谢!
cell.commentButton.addTarget(self, action: #selector(FeedViewController.didTapCommentButton(_:)), forControlEvents: UIControlEvents.TouchUpInside)
Run Code Online (Sandbox Code Playgroud)
它正在调用的选择器
func didTapCommentButton(post: Post) {
}
Run Code Online (Sandbox Code Playgroud)