View Full Version : subclass UIViewController and basic template

Aug 28, 2008, 07:30 AM
I am working on an IPhone app using xcode 3.1.1 and objectivec2.0. My app requires that majority of views have three things in common [a home button, a main heading, and vertical image].
I am creating all views through code and no use of interface builder.First of all I have created a subclass from UIViewController called UIBasicViewController and added all my basic controls there.

Afterwards, I created some other view controllers that are inheriting from UIBasicViewController. In these view conrollers, I am creating my specific stuffs.
My problem is that the loadView of UIBasicViewController is being called but not that of child view controllers.
For example:

@interface UIBasicViewController : UIViewController

@interface UIMainScreenViewController : UIBasicViewController

Does it has anything to do with subclassing levels? Why the loadView of UIMainScreenViewController is not being called?
The loadView of UIBasicViewController is called as usual. Also I am not adding any new view like viewnam addSubView: newview etc.
Just adding my specific stuff on the view coming from the parent class