xcode5 添加新的引用出口 [英] xcode5 add new referencing outlet
问题描述
我刚刚将我的 xcode 更新为 xcode5,但我不知道如何使用 xcode 5 通过 ctrl-drag 并放下标签或按钮来添加新的引用插座,就像我之前在 xcode 4.5 中所做的一样
Hi I have Just Update my xcode to xcode5, but I have no idea how to add new referencing outlet using xcode 5 by ctrl-drag and drop the label or buttons just like previous what I did in xcode 4.5
提前致谢
推荐答案
打开你的故事板并点击编辑器按钮(看起来像一个套装)并选择 .h 关联到你的视图:
Open your storyboard and click on the editor button (seems like a suit) and select the .h associate to your view :
然后,ctrl 将 UI 元素从故事板或头文件上的 xib 或 @interface 和 @end 之间的 .m 中拖动.
Then, ctrl drag the UI element from the storyboard or xib on your header file or your .m between @interface and @end.
XCode 会显示一个带有一些选项的弹出窗口:
XCode will show you a pop-up with some options :
您将获得以下代码:
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIScrollView *myScrollView;
@end
这篇关于xcode5 添加新的引用出口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!