On Jan 20, 2015, at 7:28 AM, Roland King <r...@rols.org> wrote: > I'm trying to see if I can make insertions/deletions in an NSStackView a > little more animated. So I did the simplest thing I could think of, wrapped > the insert/delete in an NSAnimationContext, made the control layer-backed, > turned on implicit animations and called layoutSubviewsIfNeeded. Something > like this > > stackView.wantsLayer = YES; > ... > [ NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ > context.duration = somethingVeryLong; > context.allowsImplicitAnimation = YES; > > [ stackView insertView:aNewView atIndex:aNewIndex ]; > [ stackView layoutSubviewsIfNeeded ]; // doesn't appear to be needed, > also tried [ stackView.window layoutIfNeeded ] > } > completionHandler:NULL ];
Have you tried simply sending the -insertView:atIndex: message to the stack view's animator proxy, instead? (I have no particular reason to expect that it works better, just asking.) Regards, Ken _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com