I want to be able to create a UIButton with an oversized responsive area. I know that one way to do that is to override the hitTest method in a subclass, but how do I insta
Here's how I do it:
+ (instancetype)customButtonWithCustomArgument:(id)customValue {
XYZCustomButtom *customButton = [super buttonWithType:UIButtonTypeSystem];
customButton.customProperty = customValue;
[customButton customFunctionality];
return customButton;
}
Works also with other types, UIButtonTypeSystem
is just an example.