Folks, 我需要关于Storyboard的帮助。 我有一个带有表格和视图的Storyboard,我想单击一个单元格并为视图执行交易。 我将DetalheMeuPostoAmigo设置为View并在didSelectRowAtIndexPath中将其作为代码进行调用。Storyboard with Xcode 4.5
当我运行应用程序时,我没有收到任何错误,但事务不起作用。我使用警报测试并确定。我查阅了很多很多次的代码...
Top10.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
DetalheMeuPostoAmigo *detalhesMeuPostoAmigoVC = [storyboard instantiateViewControllerWithIdentifier:@"DetalheMeuPostoAmigo"];
[self.navigationController pushViewController:detalhesMeuPostoAmigoVC animated:YES];
}
试试这个:UIStoryboard *分镜= self.storyboard;而不是thisUIStoryboard * storyboard = [UIStoryboard storyboardWithName:@“MainStoryboard”bundle:nil]; –
Tks Rahul,我尝试过,但没有工作,你有另一种理想吗? – Cauca