• 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: Goofy NSDrawer behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Goofy NSDrawer behavior


  • Subject: Re: Goofy NSDrawer behavior
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 24 Jul 2001 09:04:36 -0700

On Monday, July 23, 2001, at 05:55 PM, Leslie Orchard wrote:

Actually, now that I look at it, that behavior of the save panel is
precisely what I want, the way it toggles between a small, unresizable
simple window up to a larger, resizable window. And it even remembers and
tweens between the two states.

I don't suppose you'd know where I might find some sample code on how the
save panel implements this, would you? I'm imagining there's something
with adding/removing components from their superview and resizing, but I
haven't yet gotten my hands dirty with it...

You may want to look into the NSWindow method setFrame:display:animate: with the animate option turned on.

From NSWindow.h:

// smooth resize
// subclasses can override animationResizeTime: to control the total time for the frame change.
// newFrame is the rect passed into setFrame:display:animate:
- (NSTimeInterval)animationResizeTime:(NSRect)newFrame;
// setFrame:display:animate: is equivalent to setFrame:display: if animateFlag is NO
// If animationFlag is YES, this method will perform a smooth resize of the window, where the total time for the resize is specified by -animationResizeTime:
- (void)setFrame:(NSRect)frameRect display:(BOOL)displayFlag animate:(BOOL)animateFlag;

Douglas Davidson


  • Follow-Ups:
    • Re: Goofy NSDrawer behavior
      • From: Leslie Orchard <email@hidden>
References: 
 >Re: Goofy NSDrawer behavior (From: Leslie Orchard <email@hidden>)

  • Prev by Date: Re: CFBundleVersion questions
  • Next by Date: Making NSControlTints?
  • Previous by thread: Re: Goofy NSDrawer behavior
  • Next by thread: Re: Goofy NSDrawer behavior
  • Index(es):
    • Date
    • Thread