There is an error in addTarget of buttonSandK
I Check the reference outlet and it's connected+
if i remove addtarget, the code run. What am i missing here
public protocol tenorFooterDelegate: AnyObject{
func tapSK(message : String)
}
class TenorFooterView: UICollectionReusableView {
@IBOutlet weak var buttonSandK : Button!
weak var delegate : tenorFooterDelegate!
var message : String?
override func awakeFromNib() {
super.awakeFromNib()
buttonSandK.addTarget(self, action: #selector(onTapLaunch(_:)), for: .touchUpInside)
}
@objc
func onTapLaunch(_ sender: UIButton){
// self.delegate.tapSK(message: message ?? "")
}
func configure(with data: String) {
message = data
}
}
You are using
but I think You should change it to