当我在我的朋友mac中编写代码以从firstViewController导航到secondViewController时,代码可以工作,如果我从该mac获取相同的代码到我的mac然后它可以工作,但如果我在我的mac中写它它给了我以下错误:
Unknown class secondviewcontroller in Interface Builder file.
请在我的Xcode中建议一种解决此问题的方法。我可以在Objective-C中进行编码,没问题。
我用来导航的示例代码
@IBAction func btnNext(sender: AnyObject)
{
let story = UIStoryboard(name: "Main", bundle: nil)
let next = story.instantiateViewControllerWithIdentifier("secondviewcontroller") as secondviewcontroller
navigationController?.pushViewController(next, animated: true)
}