Subclassing UIView in Swift
Provide the functionality that a standard UIView just can’t
7 min readMay 28, 2020
Here are Apple’s Subclassing notes from their documentation:
The
UIView
class is a key subclassing point for visual content that also requires user interactions. Although there are many good reasons to subclassUIView
, it is recommended that you do so only when the basicUIView
class or the standard system views do not provide the capabilities that you need. Subclassing requires more work on your part to implement the view and to tune its performance.