Closed imzyf closed 6 years ago
cell 中绑定 uibutton target 时,可能出现多次绑定的问题。应该在绑定前先移除原来的
cell.playButton.removeTarget(nil, action: nil, for: .allEvents) cell.playButton.addTarget(self, action: #selector(playWordTTS(sender:)), for: .touchUpInside)
使用代理进行事件绑定
cell 中绑定 uibutton target 时,可能出现多次绑定的问题。应该在绑定前先移除原来的