• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why this program does not run without nib file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Why this program does not run without nib file?
      • From: Agha Khan <email@hidden>
  • Prev by Date: Re: my app needs another incoming event after closing modal panel
  • Next by Date: Re: Why this program does not run without nib file?
  • Previous by thread: Re: Use Cocoa in QL Generator
  • Next by thread: Re: Why this program does not run without nib file?
  • Index(es):
    • Date
    • Thread