the most common answer for this question SO 上已有 3 年历史,普遍同意的解决方案(删除 DerivedData)对我不起作用,所以我不得不重新问这个问题。
我正在尝试通过拖动为我的 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/