ios - 在 XCode 6.1 中工作的代码在 XCode 6.3 中不起作用

标签 ios xcode macos swift

如果我在我的 Xcode 中编写代码从一个 UIViewController 导航到另一个,那么它将给我错误“Interface Builder 文件中的未知类 xxx”。

但如果我执行相同的代码或使用相同的项目文件并清理构建并在下一个 mac 中运行,它将运行,没有任何问题。将项目文件带回我的 PC,它在我的 PC 上运行良好。

我曾多次尝试卸载和安装 Xcode 的最新 Beta 版以及休息和模拟器并重新启动 PC。但是我使用 Xcode 编写的代码的错误没有改变。

我如何在我的电脑上编码或让我的电脑运行我在我自己的电脑上编写的代码,而不是在另一台电脑上运行并将其取回。

我正在使用:- 操作系统 x 10.10.2, xcode 6.3

谢谢。

最佳答案

Apple 随 Xcode 6.3 一起发布了 Swift 1.2。参见 https://developer.apple.com/swift/blog/?id=22

他们还添加了迁移工具:

Swift 1.2 is a major step forward for both the language and the tools. It does include some source-incompatible changes that require updates to your code, so Xcode 6.3 includes a migrator to help automate the process. To begin the migration, click the Edit menu, then choose Convert > To Swift 1.2...

目前,6.3 仍处于测试阶段。

希望对您有所帮助:)

关于ios - 在 XCode 6.1 中工作的代码在 XCode 6.3 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29005550/

相关文章:

iOS 委托(delegate)方法在需要时没有被调用

iphone - 当 UIWebView 中的文本字段处于事件状态时禁用缩放

ios - 从 Firebase 打印出一些 child

ios - 应用程序崩溃 - 已被应用程序商店接受

java - 如何强制 Maven 3.1 在 Mac OS 8.10 上使用正确版本的 Java?

ruby-on-rails - Docker 作为有效的 Rails 开发环境

ios - dispatch_async 中的 dispatch_sync

ios - 使用 CameraRoll.saveToCameraRoll 将图像保存到相册?

ios - #selector(Aclass.method) 和#selector(self.method) 的区别

macos - 从 bash 脚本调用 conda source activate