nsanimation

Animating Auto Layout constraints with NSView.layoutSubtreeIfNeeded() not working on macOS High Sierra

佐手、 提交于 2019-12-07 05:00:57
问题 I have a basic Mac app with a view animation done through Auto Layout: I add a new view to the right of the current view I update the constraints so that the new view ends up filling the window → The animation will make it appear as if the view slides in from the right. The recommended way for animating Auto Layout changes is: Update the constraints Use NSAnimationContext.runAnimationGroup() Set allowsImplicitAnimation to true inside the animation block Call view.layoutSubtreeIfNeeded()

is there a way to run 2 NSAnimation objects simultaneously?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 14:06:28
问题 I created 2 NSAnimation objects of flipping the view with another view. I'd like to run 2 these animations simultaneously. I cannot use NSViewAnimation , since it's now about animating any of view properties. Here is the animation creation: self.animation = [[[TransitionAnimation alloc] initWithDuration:1.0 animationCurve:NSAnimationEaseInOut] autorelease]; [self.animation setDelegate:delegate]; [self.animation setCurrentProgress:0.0]; [self.animation startAnimation]; I tried to link 2