如何在Xcode 4的Interface Builder中的类窗格中定义Outlets和Actions? [英] How to define Outlets and Actions in the Classes Pane in Interface Builder in Xcode 4?

查看:104
本文介绍了如何在Xcode 4的Interface Builder中的类窗格中定义Outlets和Actions?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Xcode 3中,曾经可以通过转到Library> Classes Pane并从列表中选择类来定义Interface Builder中的Outlets,Actions等。 Xcode 4中缺少此功能吗?

In Xcode 3 one used to be able to define Outlets, Actions etc in Interface Builder by going to the Library > Classes Pane and selecting the class from the list. Is this functionality missing in Xcode 4 ?

Xcode 4中的Utility区域(右下角)有一个文件模板库,但我的自定义文章没有在这里显示!!

There is a File Template Library in the Utility area (Lower Right Corner) in Xcode 4 but my custom clases do not show here !!

推荐答案

这似乎从Xcode 4中删除了,但由于Xcode 4直接将编辑器与IB集成,因此不再需要它。无论如何,该功能在Xcode 3 IMO中从未真正发挥过这么好。

This does appear to be removed from Xcode 4, but there isn't much need for it anymore since Xcode 4 integrates the editor directly with IB. The feature never really worked that well in Xcode 3 IMO anyway.

在Xcode 4中,通过选择对象和View> Editors> Assistant来显示对象的标题。现在控制 - 从要连接的对象拖动到标题中。这将允许您自动创建一个插座或操作并立即将其绑定。

In Xcode 4, display the header for your object by selecting your object and View>Editors>Assistant. Now control-drag from the object you want to connect into the header. This will let you automatically create an outlet or action and bind it all at once.

请参阅 Xcode 4 Transition Guide 以获取更多信息。

See the Xcode 4 Transition Guide for more information.

这篇关于如何在Xcode 4的Interface Builder中的类窗格中定义Outlets和Actions?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆