连续的陈述错误。尝试编写根视图控制器

时间:2015-11-02 19:20:41

标签: ios swift

我正在关注多视图应用程序的教程,它试图让我编写根视图控制器。我输入了他们给出的确切代码,但我在一行上得到了连续的语句错误。这是我的代码:

blueViewController = storyboard?.instantiateViewControllerWithIdentifier(" Blue") as BlueViewController blueViewController.view.frame = view.frame switchViewController( from: nil, to: blueViewController)

1 个答案:

答案 0 :(得分:1)

应该是这样的:

blueViewController = storyboard?.instantiateViewControllerWithIdentifier(" Blue") as BlueViewController 
blueViewController.view.frame = view.frame 
switchViewController( from: nil, to: blueViewController)