Re: Best practice with NSProgressIndicator
Re: Best practice with NSProgressIndicator
- Subject: Re: Best practice with NSProgressIndicator
- From: Andreas Mayer <email@hidden>
- Date: Fri, 28 Jul 2017 18:48:43 +0200
> Am 28.07.2017 um 17:57 schrieb Mark Allan <email@hidden>:
>
> Setting the max value to 100 and only updating 100 times (i.e. as a
> percentage) seems too infrequent because the loop can iterate more than a
> million times.
Just keep track of the time of the last update and do it every 0.1 seconds or
so. Redrawing a progress bar 10 times a second shouldn't have any noticeable
impact on the CPU and you'll still get a fluid (enough) animation.
While you could use a timer, that seems unnecessarily complicated.
Andreas
_______________________________________________
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