I have created a custom subclass of UIView for an interface element that I want to create on an iPad screen. (it creates a list of buttons)
To use this view, I have added a view in IB, set the size properly, and updated the class to be of my sub-class.
When I run my project, non of the buttons are created, because the – (id)initWithFrame:(CGRect)frame is never called.
So to the question. When elements are created by virtue of being in IB, what delegate should I implement that will properly init my class?
Thanks in advance!
Override
initWithCoder:and call some common code thatinitWithFrame:also calls. The first will be called to initialize from a nib, the second to initialize from code.awakeFromNibis also an option, that would happen later in the life cycle.