Why this program does not run without nib file?
Why this program does not run without nib file?
- Subject: Why this program does not run without nib file?
- From: Agha Khan <email@hidden>
- Date: Tue, 14 Jul 2009 19:23:03 -0700
Hi:
you may download DigiClock http://appsamuck.com/day28.html
I just wanted to remove MainWindow.xib from the project.
so go to the info.plist and remove MainWindow.xib
go to the main.m and replace this line
int retVal = UIApplicationMain(argc, argv, nil,
@"DigiClockAppDelegate");
go to DigiClockAppDelegate.m and add
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen]
bounds]];
rootViewController = [[RootViewController alloc] init];
last goto RootViewController.m and remove - (void)viewDidLoad we are
not using NIB file
Add this line
- (void)loadView
{
MainViewController *viewController = [[MainViewController alloc]
initWithNibName:@"MainView" bundle:nil];
self.mainViewController = viewController;
[viewController release];
// we did not add infoButton
}
Run it The window will never show, but why? :-)
I have not remove any other Nib file.
Technically it should work.
What I am doing wrong?
Any help will be very much appreciated.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden