• 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: How to implement window fade-in fade-out effects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to implement window fade-in fade-out effects


  • Subject: Re: How to implement window fade-in fade-out effects
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 4 Jun 2008 11:32:41 -0400
  • Organization: Rogue Research

On 6/4/08 2:25 AM, Brian Christensen said:

>The window's frame is an animatable property, so you could try
>something like this:
>
>- (void)showWindow:(id)window
>{
>	NSRect startFrom = NSZeroRect;
>	NSRect endAt = [window frame];
>	CGFloat duration = 5.0;
>
>	[window setFrame:startFrom display:NO];
>	[window orderFrontAndMakeKey:nil];
>
>	[NSAnimationContext beginGrouping];
>	[[NSAnimationContext currentContext] setDuration:duration];
>
>	[[window animator] setFrame:endAt display:YES];
>
>	[NSAnimationContext endGrouping];
>}

That'll work, but in my experience if any of the controls in the window
make use of 'autoresizing springs' then they will resize incorrectly if
starting from a window size smaller that the control's minimum size.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

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: How to implement window fade-in fade-out effects
      • From: Markus Spoettl <email@hidden>
References: 
 >How to implement window fade-in fade-out effects (From: Markus Spoettl <email@hidden>)
 >Re: How to implement window fade-in fade-out effects (From: Brian Christensen <email@hidden>)

  • Prev by Date: Re: garbage collection and WebKit plugins
  • Next by Date: Re: CALayer subclass question
  • Previous by thread: Re: How to implement window fade-in fade-out effects
  • Next by thread: Re: How to implement window fade-in fade-out effects
  • Index(es):
    • Date
    • Thread