On Nov 14, 2011, at 7:18 AM, Richard Somers wrote:

> One way would be to subclass NSWindow and override the designated initializer 
> -initWithContentRect:styleMask:backing:defer: method. In the initializer you 
> could query the screen resolution and set the window frame accordingly.

That seems like overkill. Just set the window’s frame appropriately in your 
controller code after the nib loads but before displaying the window, i.e. in a 
-windowDidLoad: or -awakeFromNib method. (Make sure the window is not set to be 
initially visible; there’s a checkbox for that in IB.) You can use the NSScreen 
class to get the size of the main screen.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to