I had the idea to subclass UIViewController as a base class for my subsequent controllers with the purpose of adding a “logout” button to the UINavigationController in my app delegate.
//MyAppDelegate.m
@synthesize navigationController; //UINavigationController
//-didFinishLaunchingWithOptions...
[self.window addSubview:navigationController.view];
...
In my MainWindow.xib I have a NavigationController attached to.. navigationController with DashboardViewController as its root view controller.
//BaseLogoutViewController.m
- (void)loadView {
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
initWithTitle:NSLocalizedString(@"Logout", @"")
style:UIBarButtonItemStyleBordered
target:self
action:@selector(logoutPressed)];
self.navigationItem.rightBarButtonItem = addButton;
[addButton release];
[super loadView];
}
// -(void)logoutPressed callback implemented
// viewDidLoad, didRecieveMemoryWarning, dealloc implemented
//DashboardViewController.h
@interface DashboardViewController : BaseLogoutViewController { }

DashboardViewController : UIViewController

DashboardViewController : BaseLogoutViewController
The good news is it does show the logout button, but the dashboard does not show it’s own view.
BaseLogoutViewController does not have a Nib of its own.
My question is, how come when I subclass BaseLogoutViewController it no longer shows my DashboardViewController’s view?
things you have implied, but i’d like to confirm:
that said,
loadViewis not what you want to override,viewDidLoadis where you want to put the above code,‘loadView` is responsible for (oddly enough) loading the view, which it is not doing, by overriding it, you have prevented it from happening, you want to augment the view once it has been loaded,