简体   繁体   English

添加.xib,.h和。 m到现有的情节提要。

[英]Adding .xib , .h & . m to an existing storyboard.

I am very new at iOS programing and Xcode. 我是iOS编程和Xcode的新手。 I have learned a lot. 我学到了很多东西。 And most of it from this forem but I just can't find the answer to what I think is such a basic question. 而且大部分都是从这个角度出发的,但是我只是找不到我认为是一个基本问题的答案。

I have started a new project using Xcode 4.5 that has a storyboard. 我使用具有情节提要的Xcode 4.5开始了一个新项目。 The storyboard is just the basic two view storyboard. 情节提要只是两个视图的基本情节提要。 My app needs a "start up" view. 我的应用程序需要一个“启动”视图。 While I've been able, through "add file" to add the view (.xib) file. 虽然我已经能够,但是通过“添加文件”来添加视图(.xib)文件。 I don't see a way to include this view ( and it's .h & .m) to the storyboard. 我没有办法将此视图(以及.h和.m)包括到情节提要中。 I would think it would be basically drag & drop but I see no such option. 我认为这基本上是拖放操作,但我看不到这样的选择。

Thanks. 谢谢。

File..> New>File>Objective C File > Class name (yourname) Subclass of: UIViewController and click on the checkbox for: "With XIB for User Interface" File ..> New> File> Objective C File>类名(您的名称)的子类:UIViewController,然后单击以下复选框:“ With XIB for User Interface”

Good Luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM