• 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: Brian Christensen <email@hidden>
  • Date: Wed, 4 Jun 2008 02:25:28 -0400

On Jun 4, 2008, at 2:01 , Markus Spoettl wrote:

Hello List,

I need someone to push me in the right direction as I have no idea where to start:

I have an existing window which I'd like to show and hide using a zooming transition effect. I'd like something similar to the one in iCal (on Leopard) when you double click a calendar entry or in Finder when you press SPACE on an item an the QuickLook window becomes visible (same for hiding). How does one go about that?

I'm on 10.5.3 and I'm targeting 10.5. Right now I'm showing the window using orderFrontAndMakeKey: and orderOut:

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];
}

/brian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: "Sean McBride" <email@hidden>
    • 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>)

  • Prev by Date: How to implement window fade-in fade-out effects
  • Next by Date: Re: Frame rate check
  • Previous by thread: 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