Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-22-2009, 06:48 PM   #2 (permalink)
mcurtis
New Member
 
mcurtis's Avatar
 
Join Date: Oct 2008
Location: St. Louis
Posts: 44
Default

The answer depends on what you have in your MainWindow.xib file. Anything defined there will have to be recreated in your code.

Here are the steps I had to take to go xib-less. They are probably the minimum, since I never used IB on any of my projects.

1. Under the Project menu, choose Edit Active Target "<target name>". Select the Properties tab and blank out the Main Nib File field. Close the Target Info window.

2. Under the Other Sources group and edit the main.m file. In the UIApplicationMain function call, change the last parameter to the name of your application delegate class.
Code:
    int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
3. In your application delegate you need to create a window object. I do this in -applicationDidFinishLaunching:. If you defined anything else in your MainWindow.xib, you can probably create that here, too.
Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
    UIWindow *appWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window = appWindow;
    [appWindow release];
}
4. Delete MainWindow.xib from the Resources group.
__________________
Memos - Easily create, organize & share text documents.

Blue Marble Software
mcurtis is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,780
Threads: 89,204
Posts: 380,599
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Prolocksmith12
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:37 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.