Hi guys, I'm having some trouble trying to set my navigationController as I want to. Here's the deal:
i) I have a navigationController inside a tabBarController (second item).
ii)When I click on the tabBarController item corresponding to my navigationController a tableView should be created. (That's working)
iii)I then set the title for the navigationController so it said something else than "Root View Controller" on top of the tableView.
On RootViewController.m
Code:
-(void)viewDidLoad{
......
self.title = @"someTitle";
......
}
iv)Then I tried changing the style of the tableView to grouped, but when I do that my title dissapears and goes back to Root View Controller
The only way I could change the style of the tableView was with:
Code:
- (id) initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithStyle:UITableViewStyleGrouped];
return self;
}
So basically I either get the title set or get the style set to grouped. But I can't do both.
The solutions I found used the IB to set the tableView style to grouped, but since I'm not using the IB to create the tableView I couldn't find an answer yet.
I'm kinda new to iPhone programming but I'm guessing I might be overriding something twice?
Thanks in advance