Xcode 4 - 连接插座

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3346350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:28:27  来源:igfitidea点击:

Xcode 4 - Connecting Outlets

iphonexcodeconnectioniboutletxcode4

提问by Bryan

This page shows how easily I can connect outlets http://developer.apple.com/technologies/tools/whats-new.htmlin Xcode 4, but I can't get it.

此页面显示了我可以多么轻松地在 Xcode 4 中连接插座http://developer.apple.com/technologies/tools/whats-new.html,但我无法得到它。

I right click and drag an outlet from the new referencing outlet circle, and into my header where the object is declared, but nothing happens.

我右键单击并从新的引用出口圆圈中拖动一个出口,并将其拖到声明对象的标题中,但没有任何反应。

Has anyone used this?

有人用过这个吗?

Thanks a lot

非常感谢

回答by Martin

I had the same problem with the final version of Xcode 4 and solved it by selecting the File's Owner Custom Classbefore using the drag & drop outlet feature like shown on the screenshot below.

我在 Xcode 4 的最终版本中遇到了同样的问题,并通过在使用拖放出口功能之前选择File's Owner Custom Class来解决它,如下面的屏幕截图所示。

Screenshot

截屏

回答by ort11

Also, fyi, for outlets the item has to be on a window, not just on the background. It will connect fine, but it will not process the outlet gesture. ort11

另外,仅供参考,对于出口,该项目必须在窗口上,而不仅仅是在背景上。它会正常连接,但不会处理出口手势。ort11

回答by Alexander Volkov

In my case I was dragging the outlet from "Outlets/delegate", but it must come from "Referencing outlets".

在我的情况下,我从“Outlets/delegate”中拖出插座,但它必须来自“参考插座”。