It is said that when a UIView object is created with programmer's code, then initWithFrame
is the method to use for initialization, but when the UIView object is created with a NIB, then initWithCoder
is used for initialization.
When a new subclass of UIView is created within Xcode, is there a way to make it so that the proper initWithCoder
is created, because right now the usual method that is created is initWithFrame
and I wonder if there is some steps in Xcode that I did wrong so it created initWithFrame
instead -- could I have made it create initWithCoder
instead?