Question about touches


#1

How can you limit the touches to a view that is smaller than the full screen?

I can catch it in touches moved but can’t call touches ended myself without crashing…

there must be an easier way… Any ideas??? Thanks


#2

Hi GunnyHwy, this is a stab at an answer. You’ve been waiting pretty patiently and I’m surprised no one has answered…

Anyway, my understanding is this: touch events are reported via UIResponder to the view in which they happened. Views that do not have UIResponder methods simply ignore touches that happen within their bounds. So, let’s say you have a UIWindow that has a full screen view (call it primaryView) and a smaller view (secondaryView) whose extents are less than full screen. And, let’s say that you have one or more UITouch’s instantiated within secondaryView but none for primaryView. In that case, touches outside of secondaryView will be ignored. If you will, no one is there to receive and handle them, so it’s like they never happened.