1

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 side of iBox.

I made it in a simplest way. A created a NSViewAnimation object which contains 9 NSDictionaries containing NSViewAnimationTargetKey, NSViewAnimationStartFrameKey, NSViewAnimationEndFrameKey for each of 8 iCircles and iBox.

So when I start animation it plays very slowly, like a slideshow, but not an animation. It looks like a 3D game which runs on very old GPU. If I animate only iBox and 1 iCircle it plays smoothly.

So my question is: Do you know what exactly causes such behaviour? Is that a large number of Dictionaries in NSViewAnimation object, or is that a large number of iCircles. Maybe they should be something like NSViewCells. I read somewhere that using cells is much more efficient than separate views of same type.

What is the best way to optimise such animation to be efficient and run smoothly?

I would very appreciate any help with this question.

Black Frog
  • 11,595
  • 1
  • 35
  • 66
BartoNaz
  • 2,743
  • 2
  • 26
  • 42

0 Answers0