Define custom touch area in custom UIControl object
问题 I am creating a custom UIControl object as detailed here. It is all working well except for the touch area. I want to find a way to limit the touch area to only part of the control, in the example above I want it to be restricted to the black circumference only rather than the whole control area. Any idea? Cheers 回答1: You can override UIView's pointInside:withEvent: to reject unwanted touches. Here's a method that checks if the touch occurred in a ring around the center of the view: - (BOOL