Re: "Morphing" Sheets
Re: "Morphing" Sheets
- Subject: Re: "Morphing" Sheets
- From: Finlay Dobbie <email@hidden>
- Date: Wed, 10 Jul 2002 13:17:06 +0100
On Wednesday, July 10, 2002, at 03:14 AM, Sebastian Celis wrote:
I just recently ran the Warcraft III installer which had a really
impressive visual effect. All of the information was displayed on
sheets that came out of a window with a picture on it. Instead of each
having each consecutive sheet slide in and out of the window's
titlebar, each sheet "morphed" into the next sheet. I'd push the OK
button at the bottom of the sheet, all of its contents would disappear,
and the sheet would then change size and display new contents instead
of sliding in and out.
Is this a feature of Cocoa that I was unaware of? Or did Blizzard
write some of their own sheet code? Maybe they used a third-party
program for creating their installer that does this...
You can accomplish this by changing your sheet's contentView (or a
subview of that) and using the following functions:
// 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 re
size is specified by -animationResizeTime:
- (void)setFrame:(NSRect)frameRect display:(BOOL)displayFlag
animate:(BOOL)animateFlag;
-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.