【发布时间】:2011-03-23 21:25:30
【问题描述】:
我正在尝试以下代码:
- (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];
}
我认为这就是您正确设置推动控制器标题的方式。我尝试了 thing.title ,但是那是设置 TabBarItem 的标题。
【问题讨论】:
-
在这里进行更深入的讨论:stackoverflow.com/questions/2280710/…
标签: iphone ios uinavigationcontroller uitabbarcontroller