In my program, I have a UIViewController
subclass MyViewController
and two subclasses of that view controller.
I want them all to use the same xib so I initiate them as
SubClass *SC = [[SubClass alloc] initWithNibName:@"MyViewController" bundle:nil];
[self presentModalViewController:SC animated:NO];
[SC release];
SubClass is a subclass of MyViewController, which is a subclass of UIViewController
. In MyViewController.xib
, I have File's Owner set to MyViewController
.
If I only was going to have two subclasses, I would probably just duplicate the xib but I plan to have many, many subclasses, all using the same xib.