views:

60

answers:

1

here's my problem. i couldn't set the name for my navigationBar.. below are some i have tried but to no avail.

- (void)viewDidLload {
  [super viewDidLoad];
  self.title = @"Food"; 
}

- (void)viewDidLload {
  [super viewDidLoad];
  [self.setTitle:@"Food"]; 
}

- (void)viewDidLload {
  [super viewDidLoad];
  MyTableViewController *myTableViewController = [[MyTableViewController alloc] init];
  myTableViewController = @"Food"; 
}

any kind soul?

+5  A: 

Assuming this code is exactly like it is in your project, you mispelled the method name. Try this:

- (void) viewDidLoad {
    self.title = @"Food";
}

Also, the last two examples are just plain wrong.

Cory Kilger
it still doesnt load.. is it because it cannot capture the viewcontroller?
Brionac
Are you saying the view controller isn't being loaded? What do you mean by "capture the viewcontroller"?
Cory Kilger
it is loaded.. but when i go to that page, the name of the navigation bar did not change.. so i was wondering it didn't capture the name for the viewcontroller.
Brionac