UIButton所有的parent class:
UIButton -> UIControl -> UIView -> UIResponder -> NSObject
UIControl:
The base class for controls, which are visual elements that convey a specific action or intention in response to user interactions.
UIView:
An object that manages the content for a rectangular area on the screen.
UIResponder:
An abstract interface for responding to and handling events. (ex: Touch Events、Motion Events、Press Events)
NSObject:
The root class of most Objective-C class hierarchies, from which subclasses inherit a basic interface to the runtime system and the ability to behave as Objective-C objects.
Ref:
https://developer.apple.com/documentation/uikit/uiresponder
About UIResponder:
https://www.readfog.com/a/1633373455331201024
https://www.appcoda.com.tw/responder-chain/
UIView的hitTest和pointInside方法:
https://www.jianshu.com/p/c87de31b3985