Just curious. When the user touches the screen in an iPhone app, how does the OS handle the touch event? Does the current code block (function/method) finish, and then the touch event gets handled? Or does the OS interrupt whatever code may be running to handle the touch event?
Thanks!
Sunny
Touches to the screen cause the OS to generate touch events for your app. All events are handled in the main thread (the same thread that runs your code) which is implemented like a loop. The OS does not interrupt your code to handle an event; all events get handled at the next pass of the event loop.