Find me!
Archives
Categories
- Adobe
- Android
- apple
- art
- Beer
- Books
- Business
- cars
- celebrities
- Cloud Computing
- cocoa
- coding
- Communication
- computing
- Cool
- design
- development
- devinsblog
- Events
- gadgets
- games
- hack
- hardware
- ideas
- IM
- innovation
- interesting
- iPad
- iPhone
- LoD
- Math
- microsoft
- mobile
- movie
- Multitouch
- Music
- nature
- news
- notebooks
- Personal
- photography
- programs
- quickie
- review
- rumor
- silverlight
- Software
- speakers
- Surface
- technology
- The Other Dingo
- Tips
- Tips & Tricks
- TV
- Uncategorized
- Useless
- Utilities
- UX
- video
- Web
- Windows
- WPF
- Xbox
- Zune
-
iPhone SDK tutorial: disconnecting your application from Interface Builder
This is a quick tutorial on disconnecting your iPhone project from Interface Builder using Xcode.
When you initially start a new iPhone project in Xcode, you get a project that loads from a NIB file. This NIB file describes a template for how visual elements are layed out on the screen.
As a newbie to iPhone development I want to watch my project get created 100% through the code – I don’t want there to be any magic going on behind the scenes. I’ll introduce the magic pieces one at a time, but for now: no Interface Builder. (There are a whole bunch of other things about Interface Builder that I actually don’t like, but that’s a different blog post)
To remove your dependence on Interface Builder from the application you need only to do these three things:
int retVal = UIApplicationMain(argc, argv, nil, nil);TOint retVal = UIApplicationMain(argc, argv, nil, @"[yourAppName]AppDelegate")And presto – no dependency on InterfaceBuilder.