iphone 3d programming : clean project

Optional: Creating a Clean Slate
The following steps remove some Interface Builder odds and ends from the project;
this is optional, but it’s something I like to do to start from a clean slate.
1. Interface Builder uses an XML file called a xib for defining an object graph of UI
elements. Since you’re creating a pure OpenGL application, you don’t need this
file in your project. In the Groups & Files pane on the left, find the folder that says
Resources (or something similar such as Resources-iPhone). Delete the file ending
in .xib. When prompted, move it to the trash.
2. The xib file normally compiles to a binary file called a nib, which is loaded at runtime
to build up the UI. To instruct the OS not to load the nib file, you’ll need to
remove an application property. In the Resources folder, find the HelloArrow-
Info.plist file. Click it and then remove the property called Main nib file base
name (toward the bottom of the Information Property List). You can remove a
property by clicking to select it and then pressing the Delete key.
3. The template application normally extracts the name of the application delegate
from the nib file during startup; since you’re not using a nib file, you need to pass
in an explicit string. Under Other Sources, open main.m, and change the last argument
of the call to UIApplicationMain from nil to the name of your application
delegate class (for example, @"HelloArrowAppDelegate"). The @ prefix means this is
a proper Objective-C string rather than a C-style pointer to char.
4. The template includes a property in the application delegate that allows Interface
Builder to hook in. This is no longer needed. To remove the property declaration,
open HelloArrowAppDelegate.h (in the Classes folder), and remove the
@property line. To remove the implementation, open HelloArrowAppDelegate.m,
and remove the @synthesize line.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值