I have a subclass of a UIButton:
import UIKit
class CustomButton: UIButton {
required init?(coder decoder: NSCoder) {
super.init(coder: decoder)
//Customizing the button appearance
}
}
In interface builder, in storyboards, under my main view controller, I dragged and dropped a stock button, and changed it's 'Custom Class' to CustomButton from the drop down menu.
Wired it's 'Touch Up Inside' event to an IBAction.
Custom code for appearance shows up, but the button is not firing the 'Touch Up Inside'.
When I checked for touch events (touch began, ended, eat) within the subclass, the button seems to be receiving touch.