xib files offer a mechanism to customize classes, the majority of
UIKit views outside of standard frameworks are implemented in custom code. This makes it easier to reason what the intrinsic size should be as well as to receive code patches and understand
diffs from version control systems. The downside of this approach is when using Auto Layout, writing the constraints can be a challenge and the intrinsic sizes are often misreported or return the unknown value:
A custom view can be implemented as a subclass of
UIView. Subclasses of
UIView are expected to have two initializers, one that takes a
frame:CGRect and one that takes a
frame is generally used in code, and ...