ios - xcode 7.3 : Could not insert new outlet connection and deleting DerivedData doesnt work

标签 ios xcode swift

the most common answer for this question SO 上已有 3 年历史,普遍同意的解决方案(删除 DerivedData)对我不起作用,所以我不得不重新问这个问题。

this is the problem i have, optically looks the same

我正在尝试通过拖动为我的 tableview 创建一个 outlet。

如前所述,删除 DerivedData 对我没有任何作用(但我可以看到它正在重新编制索引)。第二个最常见的答案是

Removing(removing reference, not deleting) and then adding the appropriate file(the file of class you want to add the outlet to) is actually enough.

Edit 1 I found that after unchecking (in XCode 6.3.1) I had to wait a few seconds for the Indexing to appear and complete in the project name box. Same for the way backwards. This increased chances to fix the issue in almost all (but not all) cases.

Edit 2 Removing reference means that You do not delete the file completely but just remove it from the project (it still exist in the folder of your project, you add it later).

我不知道这是否仍然适用于 Xcode 7.3,因为我在 Storyboard上工作并且没有任何 .h 或 .m 文件可以删除或删除对其的引用。如果此建议在 xcode 7.3 中仍然有效,您能否告知点击哪里?

其他我试过但没用的东西

  • 清洁项目
  • 重新启动 xcode
  • 在终端中:defaults delete com.apple.dt.Xcode
  • 在终端中:默认写入 com.apple.dt.XCode IDEIndexDisable 0
  • 从头开始重写整个项目

帮一个兄弟出去?

最佳答案

嗨, future 的 xcode n00bs(我讨厌提问者没有关闭循环!),请引用@Paulw11 的评论。为我修好了

You can just create the IBOutlet manually and then in IB drag from "new referencing outlet" to your view controller object in the left hand panel (you will need to expand this panel first, from your screenshot it is currently hidden) and make the connection. The assistant view is often a bit flakey

关于ios - xcode 7.3 : Could not insert new outlet connection and deleting DerivedData doesnt work,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37694655/

相关文章:

ios - iphone: Apple ID 没有访问 iTunes Connect 的权限

c# - GetStringAsync 方法调用挂起 UI 并且永远不会完成

objective-c - 是否可以在没有任何按钮的情况下创建 UIAlertView?

c - 如何使用共享静态库避免 xcode 中的 "duplicate symbol"错误?

swift - 以编程方式创建 NSWindow

objective-c - 如何从实例方法返回 Swift 中的实例类型

audio - 低录音音量结合 AVAudioSessionCategoryPlayAndRecord

ios - XCode 无法启动应用程序,不允许操作

ios - 当用户点击 uisearchbar 时禁用键盘弹出窗口

swift - tableView.reloadData() 如何正确重新加载数据?