iOS Xcode 解决 \"could not insert new action connection\"
来源:互联网 发布:yum lock如何解锁 编辑:程序博客网 时间:2024/06/05 07:42
在Xcode中,我们可以在StoryBoard编辑界面或者是xib编辑界面中通过“Control键+拖拽“的方式将某个界面元素和对应的代码文件连接起来,在代码文件中创建outlet。
不过,执行以上操作的过程中你可能会遇到下面这样的错误:
Could not insert new outlet connection: Could not find any information for the class named "xxx".
其中的“xxx”就是你的目标代码文件中的类名。
这里就整理一下网上常见的一些情况和对应的解决方法。
1. 首先第一种情况是最简单的,也是最容易被忽略的,就是你在新建类的时候没有选择将这个类加入到对应的“Target”中。
检查方法很简单,选中你需要操作的类的.m文件,在“File inspector”界面的“Target Membership”中确认对应的“Target”有没有选中,如果没有选中就说明你在创建类的时候犯了各小小的错误。
修改方法很简单,直接在“File inspector”界面的“Target Membership”中选上对应的target就好了。
2. 重新将文件加入项目
操作步骤就是选中出问题的.m和.h文件,点删除键,然后选“Remove Reference”,这样就不会真正删除文件。接着选“File -> Add Files to ...”菜单,在文件选择界面选择刚才的.m文件和.h文件将他们重新加入项目中。
3. 直接删除DeriveData
操作步骤是关闭当前项目,然后关闭Xcode,然后通过Terminal或者是Finder找到下面的目录:
~/Library/Developer/XCode/DerivedData
在里面找到以你的项目开头的文件,将他们删除。
接着重新启动Xcode
4. 在Organizer中删除项目的DeriveData
如果你对Mac操作系统不了解,不知道如果操作第2种解决方法,有一个更加直接的方法,就是在Xcode中选择“Windows->Organizer”,然后选择“Projects”,选中你正在处理的项目,点击“DeriveData”对应的“Delete”按钮,Xcode会删除该项目的DeriveData,然后自动重新生成一个。
希望上面的方法可以帮助你解决“Could not insert new outlet connection”的问题。
我通过第2种方法就解决了这个问题。
原文转自:http://blog.csdn.net/keyboardota/article/details/9614383
- iOS Xcode 解决 \"could not insert new action connection\"
- XCode 解决“Could not insert new outlet connection”
- 解决Xcode 的"Could not insert new outlet connection"问题
- iOS Xcode, 解决“Could not insert new outlet connection”的问题。
- ios开发---解决Xcode的"Could not insert new outlet connection"问题
- iOS Xcode, 解决“Could not insert new outlet connection”的问题。
- iOS Xcode, 解决“Could not insert new outlet connection”的问题
- iOS Xcode, 解决“Could not insert new outlet connection”的问题
- iOS Xcode, 解决“Could not insert new outlet connection”的问题。
- iOS Xcode, 解决“Could not insert new outlet connection”的问题。
- iOS Xcode, 解决“Could not insert new outlet connection”的问题。
- Xcode Could not insert new outlet connection.
- iOS Xcode, 解决“Could not insert new outlet connection”的问题。(我使用第二种方法成功了)
- 解决自动生成Connection时发生的xcode could not insert new xxx for的问题
- 解决Xcode 4.3.2的"Could not insert new outlet connection"问题
- 解决Xcode 4.3.2的"Could not insert new outlet connection"问题
- 解决Xcode 4.3.2的"Could not insert new outlet connection"问题
- 解决Xcode 4.3.2的"Could not insert new outlet connection"问题
- Deep Learning(深度学习)学习笔记整理系列之(五)
- windows 安装 openssl 和运行
- 支付宝上传公钥,提示:格式错误
- [转]停止Java线程,小心interrupt()方法
- PHP fopen 失败,返回false
- iOS Xcode 解决 \"could not insert new action connection\"
- iOS xcode textField 点击后虚拟键盘没有弹出的问题
- iOS xcode 模拟器没有home键?
- iOS xcode 网络请求报错:The resource could not be loaded because the App Transport Security policy requires
- Mysql 存储过程 和 函数 区别
- 在XCode6中不能创建空项目?
- Eclipse proguard 代码混淆 微信第三方库 Can\'t process class (Unknown verification type [95] in stack map frame)
- Eclipse中不能创建AVD,提示:No system images installed for this target
- 安卓开发:荣耀,红米,不能真机调试的问题