removed nib issues and calling init
I have deleted my nib file from my UIViewController and now I want t开发者_运维知识库o make it so that it calls init instead of initWithNibName. However, even after I deleted my UIViewController, it is still calling the initWithNibName. What do I need to do to change this so that it calls init?
I initialized the rest of the UIViewController via code, in my UITabBarController I have the following:
- (void)viewDidLoad
{
[self setTabURLs:[NSArray arrayWithObjects:@"tt://mygroup",
@"tt://all",
@"tt://search",
nil]];
}
Three20 framework always calls initWithNib, even if the TTViewController
is created without a nib file.
Just move your initialization code into the - (void)loadView
function as you need to.
Why does it matter to you what init
method is called? Just take the code you would put in init
and put it in initWithNibName:bundle
.
Find where UIViewController is being allocated and initialized and change it to init instead of initWithNib.
精彩评论