• 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: 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

  • Follow-Ups:
    • Re: Change view on resize
      • From: Andy Lee <email@hidden>
    • Re: Change view on resize
      • From: Kyle Sluder <email@hidden>
References: 
 >Change view on resize (From: Walker Argendeli <email@hidden>)

  • Prev by Date: Re: NSURLConnection crashes with EXC_BAD_ADDRESS -- can't find why...
  • Next by Date: Re: Send click to window
  • Previous by thread: Change view on resize
  • Next by thread: Re: Change view on resize
  • Index(es):
    • Date
    • Thread