我想向UITapGestureRecognizer发送参数。我想将一个didRepond(Bool)发送到" tapRespond"功能。但是,我不知道该怎么做。你能告诉我怎么做吗?如果我不应该使用UITapGestureRecognizer,请 告诉我另一种方式。谢谢你的好意。
didRespond = true
cell.respond.tag = indexPath.row //cell.respond is UILabel
cell.respond.addGestureRecognizer(UITapGestureRecognizer(target:self,action:"tapRespond:"))
//我更新如下。在UITapGestureRecognizer之外,我切换了这个功能。
didRespond = true
cell.respond.tag = indexPath.row //cell.respond is UILabel ]
if didRespond == false {
cell.respond.addGestureRecognizer(UITapGestureRecognizer(target:self,action:"willRespond:"))
} else {
cell.respond.addGestureRecognizer(UITapGestureRecognizer(target:self,action:"didRespond:"))
}