So I'm doing this in my code now:
UIViewController* ctrl =
[[UIViewController alloc] // i'm alloc'ing a UIViewController...
initWithNibName:@"TheNibName" // But this NIB has, within
// interface builder, a link to "UIViewControllerDERIVATIVE". So really,
// `ctrl` is a UIViewControllerDERIVATIVE instance, not just
// a UIViewController instance.
bundle:nil] ;
The reason I'm doing this is it makes a massive convenience in writing some code that pushes modal dialogs on.. since Objective-C doesn't support <template>.
My question is, is this ok?? Can I [alloc]
a UIViewController
only, while really what comes out of a NIB is an instance of UIViewControllerDERIVATIVE
? Or will it bite me in the ass later?