views:

79

answers:

1

I'm currently working with 2 views on a UINavigationController.

I have a Leaves view (Tom Brow's leaves project) to simulate curling effect for pages which only works with images, and my actual view controller with the page and it's contents.

What I'm trying to do is, when tapped on certain place, popViewControllerAnimated:NO the actual view controller, leaving the leaves view behind on top and trying to do the page turn without having to tap again on the screen and keeping things as if no switch ever happened.

My issue here is that the touches seem to go through a black hole and never get to the current view. I've even tried to catch the touches with a custom UIApplication subclass, but as soon as the first view gets popped the touches start coming with nil view and window and phase = UITouchPhaseStationary.

The views in the navigation controller are pushed: one as the rootViewController in the init method and the other with a pushViewController:animated:.

Is there something I'm missing or there's just no way to keep touches through views in a UINavigationController?

A: 

Try saving the touches to nsuserdefaults.

enbr
Both of my views are already allocated from the start. The problem is that after the first viewController is popped every single touch that comes in has nil as its view and window.
Ignacio Inglese
Edited for another solution
enbr
The problem is that there is no touch to save. As soon as the top view pops and the other one becomes the top one no other touch comes up until the current touch event is finished (either ended or cancelled) and I'm trying to make this continue without having to lift the finger.
Ignacio Inglese
You could use a clear overlay that handles touches.
enbr