Question

I'm not sure if this is possible, but I have a view that is able to be dragged around the screen via pan gestures. Once the view is selected, little grippers appear on the corners of the view that allow the user to resize the view. The problem is, those grippers go outside the bounds of the view (they still show up, because clipSubviews is off), but gesture recognizers on those grippers are not firing when selecting the part of them that is drawn outside of the view. Making the view bigger to actually hold the grippers would break a lot of already created logic that is based on the size of the view, so that is a last resort for me.

Is there any other way to get gesture recognizers to work on views that are drawn outside of their parent view?

Was it helpful?

Solution

You could try overriding hitTest:withEvent: in a UIView subclass, and return the gripper view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top