• 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: Change view on resize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Change view on resize (From: Walker Argendeli <email@hidden>)
 >Re: Change view on resize (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: Change view on resize
  • Next by Date: Re: Change view on resize
  • Previous by thread: Re: Change view on resize
  • Next by thread: Re: Change view on resize
  • Index(es):
    • Date
    • Thread