• 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
Newbie Q: Why is UIWindow in the AppDelegate not an ivar?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie Q: Why is UIWindow in the AppDelegate not an ivar?


  • Subject: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?
  • From: "Debajit Adhikary" <email@hidden>
  • Date: Sat, 13 Dec 2008 18:34:47 -0800

When you create an iPhone app, in the AppDelegate, why is the
UIWindow created locally within -applicationDidFinishLaunching and not
declared
as an ivar? The functionality does not seem to change either way. I'd
like to know how one approach is better than the other.

What I presume is that the window object really doesn't need to be accessed
from outside later. But doesn't declaring it as an ivar make it more
accessible from the "outside" allowing greater application extensibility?

@implementation AppDelegate

- (void) applicationDidFinishLaunching:(UIApplication*) application
{
   UIWindow* window = ... ;
   [window addSubView: ...];
   [window makeKeyAndVisible];
}

...
@end
_______________________________________________

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: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?
      • From: "Debajit Adhikary" <email@hidden>
  • Prev by Date: Re: constraining autoresizing of a splitview subview
  • Next by Date: override hide on deactivate?
  • Previous by thread: Re: NSTask with ssh-agent
  • Next by thread: Re: Newbie Q: Why is UIWindow in the AppDelegate not an ivar?
  • Index(es):
    • Date
    • Thread