我正在关注多视图应用程序的教程,它试图让我编写根视图控制器。我输入了他们给出的确切代码,但我在一行上得到了连续的语句错误。这是我的代码:
blueViewController = storyboard?.instantiateViewControllerWithIdentifier(" Blue") as BlueViewController blueViewController.view.frame = view.frame switchViewController( from: nil, to: blueViewController)
答案 0 :(得分:1)
应该是这样的:
blueViewController = storyboard?.instantiateViewControllerWithIdentifier(" Blue") as BlueViewController
blueViewController.view.frame = view.frame
switchViewController( from: nil, to: blueViewController)