I'm using the following code to create an animated sliding SplitView using an NSButton to toggle whether the split view is *up* and you can see the lower split view, or *down* and the lower split view is hidden. Here's the code:

- (IBAction)toggleVariables:(id)sender
{
    NSSize newSize = [detailSplit frame].size;

    [NSAnimationContext beginGrouping];
    [[NSAnimationContext currentContext] setDuration:.25];

    if ([sender state] == NSOnState)
    {
        newSize.height = 4 * (newSize.height / 5);
        [[theUpperSubView animator] setFrameSize:newSize];
        newSize.height = (newSize.height / 5);
        [[theLowerSubView animator] setFrameSize:newSize];
    }
    else if ([sender state] == NSOffState)
    {
        [[theUpperSubView animator] setFrameSize:newSize];
        newSize.height = 0;
        [[theLowerSubView animator] setFrameSize:newSize];
    }

    [NSAnimationContext endGrouping];
}

Currently, the above code animated the sliding split view as if it's opening, but it essentially *pushes* the top edge of theUpperSubView above the superview's top edge in the window.

I'd like to replicate the result that you see in Automator where, on the left-hand side of the main split view, when you click on the "Description View" button, the library view is essentially placed below/behind the DescriptionView. when it slides up as it's opening. To see this, open Automator, select any random Automator Action, and click the "View Description" button on the lower left-hand side of the document window.

TIA!

Live Playfully,

Sam
-----
If he listens in faith,
finding no fault, a man is free
and will attain the cherished words
of those who act in virtue.

_______________________________________________

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