Init from nib, but alloc only [UIViewController]
- by bobobobo
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?? Or will it bite me in the ass later?