Re: rate limiting calls
Re: rate limiting calls
- Subject: Re: rate limiting calls
- From: Scott Ribe <email@hidden>
- Date: Tue, 28 May 2013 09:16:07 -0600
On May 28, 2013, at 8:41 AM, Torsten Curdt wrote:
> Any easier or more elegant way you could think of?
Well, if you don't want to deal with a queue and background thread, use NSTimer. In setValue, cancel the timer if it exists, then create a new one scheduled to run .someting seconds. If a timer ever fires, do your calculation.
Now if you *want* an occasional intermediate update while the user is dragging, then compare values or current time in setValue...
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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