views:

31

answers:

1

Hey guys, I am trying to implement a UIViewController hirarchy where the top most UIView Controller implements just a few basic methods the second level view controller a few more methods (depending on which one it is) and the last one on the third level has some more customized methods and also a nib file whereas none of the UIView Controller on level one and two have nibs.

Now I was wondering whether this is a good approach. So far it seems to work just fine.

Cheers, Andy

A: 

It should work fine. Inheritance is great! If any of your views ever deviate too much, you can override methods or pull them out of the hierarchy to customize.

Peter DeWeese
Inheritance of course is a good thing for structuring code and lots of other stuff. But I was not sure if it is ok to have a nib file for the controller at the bottom level due to the fact that my first and second level controllers have outlets which refer to the nib file of the 3rd level...
jagse
But it all seems to work perfectly.
jagse