I’m using a subclass of UIWindow to handle touch event in all views of the app.
I’m trying to implement a drag and drop mechanism.
When tapping and holding on a view, i remove that view and start dragging with the finger.
problem is after i remove the view the window stop receiving touch events until i lift my finger and touch it again.
help?
EDIT:
i found that after the subview is removed, the window is receiving touches but the touch phase is UITouchPhaseStationary and not UITouchPhaseMoved, even though there is only one UITouch in [event touches]; how is this possible?
I am not quite sure, but I think your problem is because your are trying to handle events in
UIWindowclass, rather thanUIViewControllerclass. UIWindow is not designed to do so. Why don’t you try this:UIViewControllerclass to your project.UIViewControllerto yourUIWindowinstance.UIViewController.UIViewController.UIViewController, and bring in the second view, or whatever.(It is kind of swapping views under the
UIViewController, rather than in the instance ofUIWindow.)