Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gestures and Responder Chain

Im developing an ipad application. And i have a outer scroll view and inner scroll views. Inside the inner scroll views im using a grid view to render my items. Im using a library for this called GMGridView.

and in the grid view im using gestures. (ex: pan gesture). The gridviews are added as subviews to the outer scroll view. So if my understanding of the responder chain is correct, first the super view should respond and then the subviews. But now wat happens is wen i touch on the gridview the control immediately goes to the gridview.

Any idea as to why this is happening? Basically what i want to be done is the outer scroll view to be scrolled before the control goes to the inner scroll view which is a vertical scrol view.

It'll be great if anyone can help me out with this. Thanks in advance.

like image 946
era Avatar asked Sep 18 '12 08:09

era


People also ask

What is a responder chain?

The responder chain is the series of events that happen once we start interacting with the application on the iPhone. As an example, whenever we tap on an UITextfield, the whole series of responder initiates. It happens because of elements like UIView, UIViewController, UIApplication subclass UIResponder.

What is regular expression and responder chain?

Regular Expression – These are the special string patterns that describe how a search is performed through a string. Responder Chain – It is a hierarchy of objects that obtain the opportunity to respond to the events.

What is a responder in swift?

A responder object is any instance of the UIResponder class, and common subclasses include UIView , UIViewController , and UIApplication . Responders receive the raw event data and must either handle the event or forward it to another responder object.

What is a UIResponder?

An abstract interface for responding to and handling events.


1 Answers

Gesture recognizers don't participate in responder chain, see here: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html

like image 133
Vlad Grichina Avatar answered Nov 15 '22 08:11

Vlad Grichina