Re: indeterminate progress bar animation and CALayer-backed sibling view
Re: indeterminate progress bar animation and CALayer-backed sibling view
- Subject: Re: indeterminate progress bar animation and CALayer-backed sibling view
- From: Quincey Morris <email@hidden>
- Date: Wed, 9 Feb 2011 10:14:23 -0800
On Feb 9, 2011, at 08:52, Michael Hanna wrote:
> In stage 1, the progress bar won't animate as indeterminate("barber
> pole") unless I set -usesThreadedAnimation:YES. After the CALayer
> backed view animates in stage 2, the progress bar never animates
> indeterminately in stage 5.
'usesThreadedAnimation:YES' isn't what causes progress bars to animate, it just affects the smoothness of the animation. Typically, the animation occurs in response to a *repeated* series of activities, which are either:
1. Requesting an event from the main event loop.
2. Calling a progress method such as 'setDoubleValue:'.
It varies between progress bar styles which of these things works, but processing the main event loop is the most reliable method of keeping progress bars animating. I'm guessing that your code that executes while the progress bar is indeterminate is something compute-intensive that doesn't process events. You can *try* calling 'setDoubleValue:' from time to time, but you might have to rearrange your code so that it processes events.
Alternatively, use the circular indeterminate style for the first and last processing stages. It always (IIRC) animates properly, no matter what you do.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden