Re: UIResponder Woes
Re: UIResponder Woes
- Subject: Re: UIResponder Woes
- From: Dylan Copeland <email@hidden>
- Date: Thu, 22 Apr 2010 21:00:18 -0400
Hi Fritz,
Thanks for the detailed response and sorry for my incorrect posting. This is the first time I've ever used a mailing list, heh. The last paragraph in your response seems to sum up what I was trying to do exactly. After playing with this all day, it looks like you are indeed correct, and "every so often" is all I'm going to be able to get. I'm going to add some math to perform some curve fitting to concur my problem.
Thanks again for the great response!
-- Dylan Copeland
On Apr 22, 2010, at 8:47 PM, Fritz Anderson wrote:
> On 22 Apr 2010, at 8:18 AM, Dylan Copeland wrote:
>
>> I have a UIView subclass that overrides UIResponder's touchesMoved: message. I've noticed that when I swipe my finger very quickly across the UIView, my touchesMoved: message only gets called every so often and not constantly getting messaged.
>
> You are, of course, apologetic about posting an entire digest to the list. Remember to keep up the subject line.
>
> What user-visible behavior are you trying to produce? "Every so often" seems to mean not often enough for you, but it would help to know, "not often enough for what?" Are you expecting to be notified of every pixel's worth of movement, no matter how little time comes between?
>
> Back-of-the-envelope math: A fast swipe across the face of an iPhone may take 1/10 of a second, or 3200 pixels per second, or 312.5 microseconds per pixel. I suppose the screen refreshes 60 times a second, or every 16700 µs, which means the pixel movements are piling up 53 times faster than anything you can do to represent them on screen (even granting that your code can do any worthwhile graphical work in its share of 312 µs).
>
> So somebody — you or the OS — has to aggregate touch movements. You can't always get the smallest quantum of movement, so strictly speaking, "every so often" is all you can expect. The question then is: Is that often enough? And for what?
>
> I've heard people raising this sort of question about drawing programs. They had hoped to be notified of every pixel, so all they'd have to do is blit the brush tip onto the screen at each event. Can't do it; even desktop mouse movements get aggregated. If they wanted to do it, they had to calculate the straight line between the reported positions, and draw the brush tip at every pixel.
>
> — F
>
_______________________________________________
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