I was able to create an instance of my CustomLabel in a test project. What I did differently was instead of dragging a UILabel, I pulled in an instance of CustomLabel into the view.
I implemented awakeFromNib against a target for the latest sdk as follows.
-(void)awakeFromNib
{
[self setText:[NSString stringWithFormat:@"%@",[self class]]];
}
- (void)drawTextInRect:(CGRect)rect // called as expected
{
NSLog(@"drawTextInRect: called");
[super drawTextInRect:rect];
}
Couple of mysteries...
I implemented init and initWithFrame in CustomLabel, neither was called by the machinery that loads the view from the nib.