Objective C – Custom view and implementing init method?

The right thing to do in that case is to create another method containing the code that’s common to both -initWithFrame: and -initWithCoder:, and then call that method from both -initWithFrame: and -initWithCoder:: – (void)commonInit { // do any initialization that’s common to both -initWithFrame: // and -initWithCoder: in this method } – (id)initWithFrame:(CGRect)aRect { … Read more