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