Hi,

you can animate a NSSplitView easily to achieve this effect. I use the following code to animate the resize of a split view after the users clicks a button:

- (IBAction)toggleSplitDisplay:(id)sender
{
        NSSize newSize = [detailSplit frame].size;
        
        [NSAnimationContext beginGrouping];
        [[NSAnimationContext currentContext] setDuration:.5];
        
        if ([sender selectedSegment] == 1) {
                [[theLowerSubView animator] setFrameSize:newSize];
                newSize.height = 2;
                [[theUpperSubView animator] setFrameSize:newSize];
        }
        else if ([sender selectedSegment] == 0) {
                [[theUpperSubView animator] setFrameSize:newSize];
                newSize.height = 0;
                [[theLowerSubView animator] setFrameSize:newSize];
        }
        
        [NSAnimationContext endGrouping];
}

Hope that helps, please contact me, if you need more information!

Volker

Am 08.01.2009 um 17:53 schrieb Sam Krishna:

I've been looking for a while now how to replicate a widget like Mail.app's "Mail Activity" slide-up/slide-down panel (the animation, not the widget itself).

The several times I've tried NSViewAnimation, it seemed to be a non- starter.

The bits and pieces that I've worked with CoreAnimation seem promising, but it *feels* like there's something obvious that I'm missing in terms of replicating the slide-up panel. You can see that sliding panel widget in many Apple apps, like Mail, iTunes (album cover), iPhoto's info panel, and Automator's workflow log, workflow variables table, and Automator's Description View.

Again, I'm just trying to replicate the animation--if anyone has any ideas, that would be really great.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to