我正在尝试以下代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Thing *sub = [[subscriptions objectAtIndex:indexPath.row] retain];
StoriesViewController *thing = [[StoriesViewController alloc] initWithThing:sub];
thing.navigationController.title = sub.title;
[self.navigationController pushViewController:thing animated:YES];
[thing release];
[sub release];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
我认为这是你正确设置推动控制器的标题的方式.我尝试了thing.title但是设置了TabBarItem的标题.