There is a custom view, that consist of class and xib file. I use it as
[[NSBundle mainBundle] loadNibNamed:@"myViewNib" owner:self options:nil];
Question is how to inherit this custom view.
I inherit the myViewClass, but then I can't use the code above to create a instance.I think I'm in the wrong way.
It should be:
One option is not to create
MYBaseView
itself in the .xib file, but it's subview. This way you will be able to inheritMYBaseView
easily.This is the code should work correctly if you create your view object programmatically or in the Interface Builder: