Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

davbeck

macrumors regular
Original poster
May 16, 2008
104
0
Reno, NV
I have a bar style NSProgressIndicator that I am using core animation to fade in when it gets shown. The problem is, that when I set it to layer backed it doesn't animate the progress level (not the fade in, that animates). Also, when I set the value in a background thread, it doesn't update the value visually.

What is causing this and how do I fix it?
 
I have a bar style NSProgressIndicator that I am using core animation to fade in when it gets shown. The problem is, that when I set it to layer backed it doesn't animate the progress level (not the fade in, that animates).

Progress indicators don't draw like other views do. I'm not sure exactly how it works, but I'm guessing they draw directly into OpenGL instead of through Quartz. So, this is probably why they won't draw into layers either.

Also, when I set the value in a background thread, it doesn't update the value visually.

You can't update UI elements from a background thread. You need to do it in the main thread only.
 
If anybody cares, I had to remove setUsesThreadedAnimation from my code to get it to animate with core animation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.