I create a UIButton
in coding phase and never use Interface Builder so how can I call touch up inside
event to hook up with any method in coding phase??
[button addTarget:self action:@selector(BtnPressed:) forControlEvents:UIControlEventTouchUpInside];
Swift 3:
button.addTarget(self, action: #selector(ViewControllerName.BtnPressed), for: .touchUpInside)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With