Xcode:在另一台PC上写的相同代码,但是当我在我的电脑上写不工作时

时间:2015-03-27 08:37:16

标签: ios swift

当我在我的朋友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)
}

0 个答案:

没有答案