Question

i have four viewcontroller in my UIwindow.i want to interchange my viewcontroller's view among four through UItouch in UIWindow?is it possible to handle touchmoved in appdelegate.m file to change the frame origins of those viewcontrollers?

Was it helpful?

Solution

A UIWindow is the parent class of a UIControl (which is what receives touch events) so it cannot handle touch events. You should put one master VC as a subview to the UIWindow, and then use that VC to exchange the subsequent VC's and views.

OTHER TIPS

You can add a UIGestureRecognizer (UIPanGestureRecognizer among them) to any view handle the action from any other object using the gesture's:

- (id)initWithTarget:(id)target action:(SEL)action;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top