Reputation: 1079
How frequently touch events are supplied to the top-most application?
For instance, touch, drag finger around screen (for 1 second), release <- how many discrete samples do i get?
edit: What's the maximum? And will it be different for different generations of iPhone and different OS versions?
Upvotes: 2
Views: 436
Reputation: 4557
Depends on the device and OS and what else is running. They are pretty much fired any chance they get. That is to provide apps with the most fluid and accurate movements possible.
Upvotes: 0
Reputation: 27601
You can profile this yourself by overriding the following UIResponder
methods:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
Save a date stamp when a touch begins, increment a static counter when a touch moves, save another time stamp one when a touch ends, and then do some simple division: rate = (# of touches)/(time interval)
Upvotes: 2