📜  addtarget sender - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:46.462000             🧑  作者: Mango

代码示例1
buttonSection.addTarget(self, action: #selector(actionWithParam(_:)), for: .touchUpInside)
@objc func actionWithParam(sender: UIButton){
    //...
}

buttonSection.addTarget(self, action: #selector(actionWithoutParam), for: .touchUpInside)
@objc func actionWithoutParam(){
    //...
}