I am trying to use UIControl as the superclass for a custom ActionView , in the Apple docs it says I need to use beginTracking(.. to track interactions:
Override the beginTracking(:with:), continueTracking(:with:), endTracking(_:with:), and cancelTracking(with:) methods to track touch events occurring in the control. You can use the tracking information to perform additional actions. Always use these methods to track touch events instead of the methods that the UIResponder class defines.
More importantly, it stays I should avoid the UIResponder methods, e.g.: touchesBegan(....
Well, all subviews of the UIControl need to have isUserInteractionEnabled set to false so beginTracking(..) is called.
Disabling the interaction of all subviews makes that my custom view cannot have a UIButton as subview anymore (or not so easily). Using touchesBegan(..) makes that everything works, view works as I want it, UIButton subviews are interacted with.
Does someone know why touchesBegan(..) should be avoided, what are the downsides?