Re: Change view on resize
Re: Change view on resize
- Subject: Re: Change view on resize
- From: Andy Lee <email@hidden>
- Date: Fri, 10 Apr 2009 03:32:51 -0400
On Apr 9, 2009, at 6:52 PM, Dave Keck wrote:
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!
I was going to say this doesn't handle the case where the user selects
Zoom from the Window menu, but actually it does, because the menu
item's action is performZoom:, so the above approach would work too.
Just make sure to use performZoom: if you want to invoke zooming from
your own code.
--Andy
_______________________________________________
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