【发布时间】:2015-05-19 13:16:54
【问题描述】:
我有一个UIViewControllers 和两个UIButtons,我想知道如何从这个UIViewController 传递给我的UIPageViewController,
我试图将故事板中的UIButton 链接到我的UIPageViewController,但它给了我这个错误
由于未捕获的异常而终止应用程序 'NSInvalidArgumentException',原因:'Storyboard () 不包含带有标识符的视图控制器 '指南''
我该怎么办?
编辑
- (IBAction)goToGuide:(id)sender{
[self performSegueWithIdentifier:@"goToGuide" sender:self];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"nextView"])
{
FirstLaunch *fLaunch = [segue destinationViewController];
//pass any data to next view here
}
}
将此添加到我的UIViewController 并在我的情节提要中添加标识符,在视图控制器和UIPageViewController 之间建立连接,并将标识符设置为 goToGuide,但同样的错误..
向上
EDIT2
- (IBAction)goToGuide:(id)sender{
[(UINavigationController*)self.window.rootViewController pushViewController:Guide animated:YES];
[self performSegueWithIdentifier:@"NextView" sender:self];
}
它说,在 FirstLaunch 类型的对象上找不到属性窗口
【问题讨论】:
标签: ios model-view-controller uiviewcontroller storyboard uipageviewcontroller