【发布时间】:2012-06-13 01:21:04
【问题描述】:
这段代码是否假设在我要连接的 ViewController 上设置标题?
两个 UIViewControllers 通过 push segue 连接 - 第一个嵌入在 NavigationController 中。
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"settingsSegue"])
{
self.navigationItem.title = [[NSString alloc] initWithFormat:@"Custom Title"];
}
}
它对我不起作用,但语法是正确的。
提前谢谢:-)
【问题讨论】:
标签: ios uinavigationcontroller storyboard