• 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
Re: Using NSWindow without NIB (XIB) file ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSWindow without NIB (XIB) file ?


  • Subject: Re: Using NSWindow without NIB (XIB) file ?
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 26 Jan 2011 10:50:27 +0100

On 26.01.2011, at 07:10, Lou Zell wrote:
>  NSView *localView = [[NSView alloc] init];
>  [window setContentView:localView];
>  [localView release];

 While this is perfectly valid code, usually you want to leave the content view alone (NSWindow already creates one for you). A better example would probably be:

NSButton*	localView = [[NSButton alloc] initWithFrame: NSMakeRect(10,10,100,20)];
[[window contentView] addSubview: localView];
[localView release];

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

_______________________________________________

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

References: 
 >Using NSWindow without NIB (XIB) file ? (From: email@hidden (David Remacle))
 >Re: Using NSWindow without NIB (XIB) file ? (From: Lou Zell <email@hidden>)

  • Prev by Date: Re: Creating a mouse event & event number
  • Next by Date: How to scale a TabBarItem Image
  • Previous by thread: Re: Using NSWindow without NIB (XIB) file ?
  • Next by thread: Image preview with UIWebView
  • Index(es):
    • Date
    • Thread