开发者

Back button isn't getting displayed upon pushing a controller into the stack

I created iOS application from Navigation-based application template.

This snippet is from RootViewController.m:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  DotoViewController *detailViewController = [[DotoViewController alloc] 
                             initWithNibName:@"DotoViewController" bundle:nil];
  NSManage开发者_运维知识库dObject *selectedObject = [[self fetchedResultsController] 
                             objectAtIndexPath:indexPath];

  detailViewController.dotoObj = selectedObject;
  [self.navigationController pushViewController:detailViewController animated:YES];
  [detailViewController release];   
}

DotoViewController is a subclass of UIViewController and has an accompanying NIB file.

Upong clicking on a row, DotoViewController is getting displayed but without the back button to RootViewController on the left side.

What I'm missing?


Perhaps your root view controller has an empty title? The view controller's title is used as the title for the back button, so if you have an empty string there, this can cause the back button to disappear. If it's nil, it should display the standard "Back" though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜