protocol CustomViewAction: class {
func customActionButton(_ sender: UIButton)
}
class MainFooter: UIView {
weak var delegate: CustomViewAction?
@IBAction func languageButton(_ sender: UIButton) {
self.delegate?.customActionButton(sender)
}
private func loadNib() {...}
}
class MainCont: CustomViewAction {
...
let mainFooter = MainFooter()
mainFooter.frame = view.frame
mainFooter.delegate = self
func customActionButton(_ sender: UIButton) {
... not working
}
}
There is custom view. Custom action button interface implemented in the Main controller. This code not working ... Why?