Questions tagged [nsviewanimation]

The NSViewAnimation class, a public subclass of NSAnimation, offers a convenient way to animate multiple views and windows. The animation effects you can achieve are limited to changes in frame location and size, and to fade-in and fade-out effects.

17 questions
33
votes
3 answers

How to fade out a NSView with animation?

This is as simple as can be so I can't for the life of me find what's wrong, I looked through the documentation as a guide but it still didn't work. I have a view inside a larger view. An IBAction is supposed to fade out the inner view... that's it.…
Elbimio
  • 1,041
  • 2
  • 10
  • 25
21
votes
2 answers

Animate Auto Layout Constraints and Alpha on NSView

Swift 3, iOS 10, macOS 10.12.4 I am building an app that runs on both iOS and Mac. On the iOS side, I have successfully animated a UIView. When the user taps on something, a popup appears and animates into position. Here's my code inside the tap…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
8
votes
3 answers

Any reason to use NSViewAnimation over CoreAnimation techniques?

I'm working on a Snow Leopard app and I'm doing some view animations (swapping them) and I've seen some older examples using NSViewAnimation. I'm wondering if these are completely obsoleted by Core Animation? It seems fairly simple for me to…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
6
votes
0 answers

Animating an NSView frame, then jumping to specific frame

I'm trying to slide a gridded NSView up, revealing another row from another NSView. Then, once the animation is done, the second NSView will dissapear, and the first will immediately move back to its original position with the new data. It works…
Stuart
  • 286
  • 2
  • 14
2
votes
1 answer

Is there a way to make NSAnimation "Begin from current state" like on the iPhone?

I want to make a view move to a different position on window resize. I currently do this with NSViewAnimation on receiving the NSWindowDidResizeNotification. // Create the view animation object. theAnim = [[NSViewAnimation alloc]…
david
  • 3,553
  • 4
  • 28
  • 39
2
votes
1 answer

Using NSViewAnimation with NSAnimationEaseOut weird behaviour

In one of my views that can be dragged, if the user drops it at an inappropriate place, it simply drops back to the original frame that was recorded when the mouse went down. This has been working fine for a few days with no animation, but I've…
d11wtq
  • 34,788
  • 19
  • 120
  • 195
2
votes
1 answer

CATransition with CIFilter doesn't work first time,works second time

I want to add CATransition animation for NSView. I have the following code: [contentView setWantsLayer:YES]; NSRect rect = [contentView bounds]; NSData *shadingBitmapData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle]…
beefon
  • 3,194
  • 1
  • 21
  • 25
2
votes
1 answer

Prevent an instance of NSView from receiving mouse events

I have an NSView in a window with core animation layer turned on. I use this view to display images with animation from time to time. I need the entire view to be the back layer not only the images. Behind this view which I call AnimationBaseView…
the Reverend
  • 12,305
  • 10
  • 66
  • 121
2
votes
0 answers

Applying CIFilter to NSView on OS X 10.10+

I'm learning working with CoreAnimation. I've tried to add some CIFilter to my NSView, but had a problem. When I add filter to my view (view has NSButton as subview), it just clear all of its content, but it shouldn't! Could you help me, what I'm…
2
votes
0 answers

NSViewAnimation for NSTableView Not Working on Mavericks

I have a laptop that runs OSX 10.8, which is what I have been using to develop an app. I went to test the app on my desktop -- which runs 10.9 -- today and found that everything works the same except one animation. I have an intro screen and want…
2
votes
0 answers

NSViewAnimations used in OS X 10.6 stopped working in OS X 10.9, subsequent animations aren't firing

I wrote some animation code in OS X 10.6, but the animations aren't working properly when I recompile the app for 10.9. I've got an array of buttons, for each of them my goal is to have it shrink, then return to normal size, then shrink, and then…
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
2
votes
3 answers

View swap using push animation

I want to swap out one view with another by pushing the old view aside to slide in a new view (the kCATransitionPush type). To use CoreAnimation I need to work with CALayers with my views. The problem is that attaching a backing layer to my window…
indragie
  • 18,002
  • 16
  • 95
  • 164
1
vote
0 answers

NSViewAnimation - too slow

I am quite new to Cocoa programming. I have custom view (iBox) inside which there are 8 more custom views of another class (iCircle). I want to make animation which would resize the iBox and move each of 8 iCircles at some distance from a specific…
BartoNaz
  • 2,743
  • 2
  • 26
  • 42
1
vote
0 answers

NSViewAnimation: target is not view or window

I am trying to have a view appear with an animation, but all I get is > NSViewAnimation target is not view or window ((null)) Which is strange, because I am pretty sure the target I add is a view. I tried running the animation from the VC of the…
chl
  • 380
  • 3
  • 18
1
vote
0 answers

NSViewAnimation flickers for NSWindow with kCGDesktopWindowLevel

I have an NSWindow set to kCGDesktopWindowLevel so it sits on the desktop behind the desktop icons (like a wallpaper). I'm trying to cross-fade two views inside that window using an NSViewAnimation. The problem is that the animation flickers a lot.…
Mark
  • 6,647
  • 1
  • 45
  • 88
1
2