从SecondViewController.view调用操作按钮时,在 XCode6(Beta)/ Swift环境中会出现运行时错误。请参阅以下内容了解更多详情。
我的情景如下所示
尝试从' didFinishLaunchingWithOptions 中调用FirstView屏幕 以下工作正常。
var varFirstViewController:firstViewController?= firstViewController(nibName:"firstViewController", bundle: nil)
self.navigationController = UINavigationController(rootViewController:varFirstViewController)
self.window!.rootViewController = self.navigationController"
从FirstViewController.view我试图通过以下代码调用第二个视图控制器工作正常
let sec: SecondViewController = SecondViewController(nibName: nil, bundle: nil)
self.view.addSubview(sec.view)
从试图触发ActionButton的secondViewController.view引发RunTime错误EXC_BAD_ACCESS
欣赏你的专业知识。