正规365体育投注

Dark mode beta

You’ve been asking for dark mode for years.
The is finally here.

Change your preferences正规365体育投注 any time.

Questions tagged [nsanimationcontext]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Swift MacOS NSAnimationContext not following its duration

I have a very simple animation which is moving a view throughout the main view like this: NSAnimationContext.runAnimationGroup({ (_) in NSAnimationContext.current.duration = 50.0 viewTOModify....
1
vote
1answer
21 views

NSAnimationContext crashing when called by an Observer

I have two WebViews: webView and customizerWebView. Both of these WKWebViews are attached by a trailing constraint. Essentially, when I go to the menu and click "Show Customizer" showCustomizer() or "...
0
votes
1answer
26 views

Whats the best way in Swift to animate an array of NSViews to appear one after another in an NSStackView?

I'm able add a number of NSTextFields to an NSStackView using the following code: optionsStackView.addView(newOption, in: .center) The problem I'm encountering is getting each NSTextField (newOption)...
0
votes
1answer
79 views

How do I animate NSView with curve

I know how to animate NSView objects using +[NSAnimationContext runAnimationGroup:completionHandler:], but I can't see a way of setting the animation curve on this type of animation. I see that ...
0
votes
1answer
107 views

Animation of Auto Layout Constraint Not Happening inside NSTableCellView

I'm trying to get an auto layout constraint to update with animation inside an NSTableCellView. The constraint is updating fine, but it's not happening with animation. The following code is executed ...
0
votes
1answer
108 views

Incorrect animation with layout constraints and NSAnimationContext

I want to expand a view in response to a click on a disclosure triangle, but the animation isn't running the way I want. (Sorry if the gif isn't looping. The tool was supposed to create a looping ...
7
votes
1answer
762 views

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

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 → ...
6
votes
1answer
1k views

Fade out NSButton using NSAnimationContext

I have a simple Swift macOS app (using Xcode 8.2.1) that contains a single NSButton. When I click the button I would like it to fade out over a specified period. I thought I could use ...
0
votes
1answer
157 views

NSAnimationContext completion parameter?

My animation can be performed on several different similar views (managed in an array), but the completion handler does not take a parameter. How then can I tell at completion time which animation I ...
10
votes
0answers
1k views

What's the best approach to animate frame changes on NSView?

Ideally I'd need something like UIView.animateWithDuration, however I know that this is not an API that's available on macOS. What's the best way to manipulate the actual frame of an NSView and ...
5
votes
1answer
1k views

NSAnimationContext does not animate frame size for NSButton

Using NSAnimationContext.runAnimationGroup(_:_:) as demonstrated in the NSAnimationContext documentation to animate both the frame origin and size works as expected for some view types (including ...
0
votes
1answer
174 views

Animating auto layout with NSAnimationContext works only inside dispatch_after block

I'm trying to animate constraints change in Mac app using NSAnimationContext runAnimationGroup... but animation works fine only if I embed it inside dispatch_after block. In result I have this code: ...
4
votes
1answer
432 views

El Capitan broke my NSView animations

I have a Mac app that uses a NSAnimationContext animation grouping to animate one NSView offscreen and another NSView onscreen. Prior to beginning the animation grouping I position the offscreen ...
1
vote
0answers
1k views

NSView fade animation doesn't work

I have created a new project with one button and one hidden NSView (I called this annimationView). The idea is when user pressed the button than the hidden view should fade in and out. But nothing ...
2
votes
0answers
446 views

Animated resizing of a NSView does not effect layer. Bug or totally correct?

I have two NSView subclasses: DrawRectView just draws a background color using the drawRect method LayerBackedView also draws a background color using layer backing The following code snippet a ...

15 30 50 per page