Objects of the NSAnimation class manage the timing and progress of animations in the user interface. The class also lets you link together multiple animations so that when one animation ends another one starts. It does not provide any drawing support for animation and does not directly deal with views, targets, or actions.
Questions tagged [nsanimation]
22 questions
10
votes
2 answers
How to implement NSTrackingArea's mouseEntered/Exited with animation?
I want to implement a feature that when an user hovers over the specific area, the new view appears with drawer-like animation. And also, when the user leaves the specific area, the drawer should go away with animation. This is exactly what you see…

Blaszard
- 30,954
- 51
- 153
- 233
9
votes
1 answer
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
→ The animation will make it appear as if the view…

Mark
- 6,647
- 1
- 45
- 88
8
votes
1 answer
is there a way to run 2 NSAnimation objects simultaneously?
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…

Nava Carmon
- 4,523
- 3
- 40
- 74
3
votes
2 answers
Rotating NSView around center
I'm trying to animate the rotation of an NSView around its center, but it keeps shifting side to side during rotation. What is causing this?
-(void)startRefreshAnimation {
[NSAnimationContext beginGrouping];
[[NSAnimationContext…

Jack Humphries
- 13,056
- 14
- 84
- 125
3
votes
1 answer
UITextField losing firstResponder reverts frame animations/modifications
I use the following code to modify the frame size to accomodate a keyboard showing up/disappearing:
- (void)moveCodeViewForKeyboard:(NSNotification*)aNotification up:(BOOL)up {
NSDictionary* userInfo = [aNotification userInfo];
…

Jason Pawlak
- 792
- 1
- 6
- 20
2
votes
1 answer
NSAnimation removes button background colour
I am working on a Mac app. I am trying to do a simple animation which makes an NSButton move down. The animation works really nicely, but when i do it, the background colour of my NSButton disappears for some reason. Here is my code:
// Tell the…

Supertecnoboff
- 6,406
- 11
- 57
- 98
2
votes
1 answer
How to Add popover Animation on UIView in iPhone
I have a Button Add. which will add images from Gallery and Camera.
I want to show this UIVIew from ryt corner and it will expand from 1 to 2 to 3 and to final stat 4. like a baloon . and it will hide as same, from 4 to 3 to 2 to 1.
I have used…

Zohaib
- 2,845
- 2
- 23
- 33
1
vote
0 answers
NSAnimation doesn't work with NSTextField colors
I want to set the text color of a NSTextField using an animation and I tried the following code but it doesn't work. It changes the color immediately without animating the color transition. How do I fix it?
public func changeColor(to: NSColor) {
…

Cristian
- 654
- 1
- 13
- 30
1
vote
1 answer
CGAffineTransformMakeScale not working - OS X - Cocoa
I have a simple Mac app that I am developing. I want to be able to apply a transform on a NSButton and make it bigger. Twice its size. However my code is not working, it just slides the button to a corner. Does anyone know what is…

Supertecnoboff
- 6,406
- 11
- 57
- 98
1
vote
1 answer
OS X Menubar App with drag and drop
I have a standard menubar app (with a dropdown menu) and would like to add the ability for my users to drag files on top of my menubar icon (like this).
Do you know how that is accomplished?
I'm assuming my menubar app has to accept drag and drop.…

RobertJoseph
- 7,968
- 12
- 68
- 113
1
vote
2 answers
NSWindow's setFrame:display:animate: run simultaneously with other animations
I'm using a borderless NSWindow to create a slide out menu like you might find in many IOS apps. I currently use setFrame:display:animate: with two pre-defined rects to create the sliding effect, and I also have an animation that fades the…

Swifty
- 95
- 9
0
votes
0 answers
NSAnimation does not work with large NSViews
The code below works fine when I change the NSTextfield coordinate in an NSView with a width of 1000; however, it does not work when the view width is more than ~10000. There is no animation and the text just jumps to the new coordinate.
if…

Steve
- 25
- 1
- 7
0
votes
1 answer
Animating NSView property of custom structure type
I have an NSView subclass with a property declared like this in the header:
@property (nonatomic) BaseRange range;
BaseRange is defined as:
typedef struct BaseRange {
float start;
float len;
} BaseRange;
I want to animate the…

jeanlain
- 382
- 1
- 3
- 13
0
votes
1 answer
How to NSAnimationEffect in swift
I'm trying to play an animation when I remove an item from a NSTableView by dragging the item out of the window.
According to the documentation, its usually done using. NSAnimationEffect.
These effects are used to indicate that an item was removed…

unknown
- 788
- 9
- 24
0
votes
2 answers
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 NSAnimation has an init method which includes a…

mashers
- 1,009
- 7
- 22