如何从RootViewController转到SecondViewController

时间:2015-04-01 17:59:14

标签: objective-c viewcontroller theos

我已经搜索了几个小时没有好的答案,似乎很多人都有这个问题...我在我的iphone上使用theos并且我有一个带有此代码的RootViewController:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    [self performSegueWithIdentifier:@"SecondViewController.m" sender:nil];

}

桌面名称方向上有一个表格和一个单元格点击它我希望它显示我的SecondViewController.m,老实说我不知道​​该怎么做或者怎么做。

1 个答案:

答案 0 :(得分:0)

performSegueWithIdentifier采用segue的名称。它不采用视图控制器的名称,尤其不是包含视图控制器的文件的名称。它适用于故事板。

如果您的rvc中有导航堆栈,请查看UIViewController的presentViewController或NavigationController的pushViewController。