Question

I am new in iPhone programming. At the moment I am trying to recognize a constant touch. For example I want the user to leave his finger on the screen for the whole application.

I use a navigationcontroller which holds the different views. If the user now touches the screen in view1 and then the view is changed to view2 by pushing it on the stack (with pushviewcontroller) with still touching the screen then there are no touch events recognized by view2. If the user then releases his finger (no touch event) and touches the screen again then all events are recognized. Is this a bug or am I doing something totally wrong?

I haven't found any answer on this. Could someone help me?

Was it helpful?

Solution

This is expected behaviour. Touches are handled on a per-view basis.

Without overlaying a transparent view to handle touches, you can't change views using a navigation controller.

If you do overlay a transparent view to handle touches then no other views below that will receive touch events unless you propagate them through using some convoluted process.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top