| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Am 30.07.2005 um 17:40 schrieb Martin Linklater:
Cool. Although I got it working with a lot less code than your example. I'm not sure if I've done something horrendous but my solution was a bit simper.
- Create simple Cocoa project in XCode.
- Double click the NIB - CTRL-drag from the Window instance to the AppController instance - connect the delegator.
Then simply add this function declaration and definition to AppController.h /.m respectively:
*** add to AppController.h
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize;
*** add to AppController.m
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize { frameSize.width = frameSize.height / 2;
return frameSize; }
Then when I resize the Window the size is snapped to be twice as high as it is wide. Am I missing anything important by not including all the IBOutlet stuff that is present in your code ?
_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
| References: | |
| >Newbie: Getting an NSWindow and setting its delegate (From: Martin Linklater <email@hidden>) | |
| >Re: Newbie: Getting an NSWindow and setting its delegate (From: Michael Ströck <email@hidden>) | |
| >Re: Newbie: Getting an NSWindow and setting its delegate (From: Martin Linklater <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.