Re: Change view on resize
Re: Change view on resize
- Subject: Re: Change view on resize
- From: Dave Keck <email@hidden>
- Date: Thu, 9 Apr 2009 12:52:45 -1000
> How do I enable the resize button without enabling drag-resize?
> - Do I use windowWillResize:toSize: to be notified? How am I notified of
> the user clicking clicking the button?
To satisfy both these requirements, I would first disable window
resizing for your window in IB. Then, somewhere in your app's
initialization code, do a little something like this:
NSButton *zoomButton = [window standardWindowButton: NSWindowZoomButton];
[zoomButton setEnabled: YES];
[zoomButton setTarget: self];
[zoomButton setAction: @selector(doFancyThings:)];
Then, when your window's zoom button is clicked, doFancyThings: will
be called. Viola!
David
_______________________________________________
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