NSViewAnimation: sliding one view down over another in a tab view
NSViewAnimation: sliding one view down over another in a tab view
- Subject: NSViewAnimation: sliding one view down over another in a tab view
- From: Keith Blount <email@hidden>
- Date: Tue, 19 Sep 2006 14:23:43 -0700 (PDT)
Hello,
I am trying to use NSViewAnimation to slide one view
over the top of another. Here is my code:
NSRect startFrame = [[corkboardView
enclosingScrollView] frame];
startFrame.origin.y += startFrame.size.height;
NSRect endFrame = [corkboardView frame];
NSDictionary *anim = [NSDictionary
dictionaryWithObjectsAndKeys:
[corkboardView enclosingScrollView],
NSViewAnimationTargetKey,
[NSValue valueWithRect:startFrame],
NSViewAnimationStartFrameKey,
[NSValue valueWithRect:endFrame],
NSViewAnimationEndFrameKey,
nil];
NSViewAnimation *animation = [[NSViewAnimation alloc]
initWithViewAnimations:[NSArray
arrayWithObject:anim]];
[animation
setAnimationBlockingMode:NSAnimationBlocking];
[animation setDuration:0.3];
[animation startAnimation];
This works fine - the view (corkboardView, a custom
view inside a scroll view) slides down.
However, the problem is that I want the corkboardView
to slide down over a text view. The corkboardView and
the text view in question, however, are both different
views that are contained within a tab view - ie. they
are both contained in separate tabs. So whereas
previously, the user could click on an item in the
toolbar to toggle between the corkboard view and the
text view (which internally would just change the tab
of the borderless tab view), now I want the corkboard
to appear to slide down over the text view.
However, the above code does not achieve this, because
the corkboard is visible whilst the text view is not
(it cannot be, because it is in a separate tab which
is not visible whilst the corkboard is visible).
Does anybody know how I can get around this, and set
it up so that the corkboard appears to slide down over
the text view rather than over a blank pinstriped view
(which is what it does at the moment)?
Many thanks in advance,
Keith
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden