Can a UIScreenEdgePanGestureRecognizer be added to a subheading that is not near the edge of the screen?

I downloaded this example from github: https://github.com/PaulSolt/UIScreenEdgePanGestureDemo It seems to work fine. However, if I change the left frame to green to say 30 points from the supervisor in the storyboard (not the same with supervisor as in the example) and change this code

[self.view addGestureRecognizer:leftEdgeGesture];

      

to

[_edgeView addGestureRecognizer:leftEdgeGesture];

      

the gesture does not respond. I think you cannot add a UIScreenEdgePanGestureRecognizer to the subview if the subview edge is not near the edge of the screen, but I need to know that I am doing something wrong. Thanks to

+3


source to share


1 answer


Yes you are right. It only works for views that touch the edge.



0


source







All Articles