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.
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.