IOS: How do paint / paint applications eliminate the initial delay in response to touch?

When I used drawing / drawing applications, I never notice a delay between the tap of a finger and the ability to see something drawn on the display. However, with my application, the initial touches are taken very slowly. The second, third and fourth gestures get 60 per second, but the first gesture is probably 2-3 touch events per second. Also, if I let the application sit idle for 10 seconds, the same delay will recur. It is as if iOS forgets that the application needs attention, or the device (iPad 3, iOS 5.1.1) goes into sleep, where the display is on, but the touch response slows down.

UPDATE: if I put the iPad 3 in standby / lock mode by closing the display and leaving it for 10 seconds, then open the display, each time it reacts with a soft touch.

UPDATE: this problem does not occur on my iPad 1 running iOS 5.1.1. Even when I return iPad 1 from sleep / unlock mode, there is no delay.

+4
source share
1 answer

I have not worked with such things before, but I remember reading somewhere about using UIBezierPath to create a drawing application. You could try using this. According to this question, this is faster:

Why is UIBezierPath faster than Core Graphics?

The tutorial is here: http://soulwithmobiletechnology.blogspot.com/2011/05/uibezierpath-tutorial-for-iphone-sdk-40.html

0
source

Source: https://habr.com/ru/post/1416652/


All Articles