I’ve got a view controller that contains a @property which is a custom subclass of UIView (we can call it CanvasView). This CanvasView is getting @synthesized, but there is some custom initialization I want to do on it. I know I need to implement -(id)initWithFrame on CanvasView and do my custom initialization there, but either -(id)initWithFrame is not getting called, or [self = [super initWithFrame:frame] is failing. Does @synthesize call initWithFrame? And how can I tell if my [super initWithFrame:frame] is failing?
Note: I have built the interface so far programmatically, so -(id)initWithCoder or -(id)initWithNibNamed:bundle: shouldn’t be used here (I think). I’m guessing the answer to this is to start building my interface with nibs.
@synthesize only generates code for the setter and getter of your property based on the options you specified in its declaration.
How are you initializing the instance of CanvasView?