I want the button to be reactive to tap only in the custom polygonal shape that I create and not in the CGRect frame.
button.frame only supports CGRect.
I want the button to be reactive to tap only in the custom polygonal shape that I create and not in the CGRect frame.
button.frame only supports CGRect.
Here is an example of a button that only responds to touches within a certain area.
If you want to do it in Swift 3/4: