Animating subView moving from one superview to another (MacOS)
Animating subView moving from one superview to another (MacOS)
- Subject: Animating subView moving from one superview to another (MacOS)
- From: Motti Shneor <email@hidden>
- Date: Wed, 06 Jun 2012 14:29:01 +0300
Hello everyone.
I need to add a certain animation to our application. I have two NSSplitViews in my window, each holding several "panels" (NSView hierarchies).
I need to SWAP two panels in separate splitViews with each other. e.g. Child view index:2 of FirstSplitView will move to become child-view index 4 of SecondSplitView, and vice-versa.
Without animation, this change can be irritating, and user can miss it (although he chose to do it from the menu).
I saw a magnificent animation in Apple's "iMovie" - the two child-views "retreat" revealing empty space, then go into their new place using the famous "genie" effect transition.
A stunning and helpful animation, which gave me the motivation to try...
I tried to add animation to my normal code --- to no avail.
I'm forced to use [NSSplitView setSubviews] on the NSSplitViews, to do the actual swapping, in order to maintain the order of all other panels which don't move.
I tried to call the animator proxies of the NSSplitViews, but It seems that NSSplitView only uses "Fade" animation when adding/removing/replacing subviews.
I cannot use "frame" animation (position/bounds) on the moving sub-views, because they need to change their parent views, and they would simply disappear when I will try to "move" them around, because they fill up all their suprview (NSSplitView).
Any help would be appreciated.
Thanks!
Motti Shneor.
_______________________________________________
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