草庐IT

MyCustomViewController

全部标签

ios - 从 Storyboard加载时 XCTest 中出现 "Could not cast"错误

我正在尝试在XCTest中加载我们的自定义ViewController之一:letmyViewController=storyboard.instantiateViewControllerWithIdentifier("MyViewControllerID")as!MyCustomViewController我收到这个错误:Couldnotcastvalueoftype'MyApp.MyCustomViewController'(0x10852b720)to'MyApp.MyCustomViewController'(0x11a7330a0).我正在使用Xcode7.1.1我在网上找到