Select to view content in your preferred language

sending touch input to mapview under UIView

853
4
Jump to solution
08-23-2012 10:41 AM
HamzaHaroon
Regular Contributor
I need to disable and enable touch events to a UIView that is sitting ontop of the mapView. I have tried setting userInteractionEnabled = NO in a class(paintingView) that handles the touches for the UIView, but then i cant turn on the interaction. is there a way that i can send the touch events from paintingView class to my mapView so that the map can pan and zoom and do other functions?
0 Kudos
1 Solution

Accepted Solutions
HamzaHaroon
Regular Contributor
i tried that method of toggline userInteractionEnabled, but the problem with that was that once it was disabled, it would not re enable. I just made a work around to the problem by moving my freehand painting view out of the screen boundaries when its not needed.

View solution in original post

0 Kudos
4 Replies
FrankLin1
Emerging Contributor
HHaroon , I have the same problem , I want to custom AGSMapView User-Action to enable some new gesture , like use "Two Finger Tap" to do a new Map-Action , but not a way yet...:(

Edit:
http://forums.arcgis.com/threads/38228-How-to-catch-AGSMapView-touch-gestures

Here may be the idea.
0 Kudos
HamzaHaroon
Regular Contributor
that seems like a way to do it. I'm just not sure how to send touch events to my uiview like that. currently my setup in storyboard is
viewcontroller
- view
     -- agsmapview
     -- paintingview (my uiview)


im using my painting view to free hand draw on screen. with this setup, my paintingview recieves all of the touches, and i use the touchedBegan and other 3 methods to draw in my paintingView class, and no touch inputs are sent to the mapview. i tried implementing the touch methods in my viewcontroller class, but it only sends touch inputs to the mapview.
0 Kudos
NimeshJarecha
Esri Regular Contributor
You should keep a toggle control which should set userInteractionEnabled of paintingview to ON/OFF. When it's ON, you draw the free hand sketch and OFF will allow you to do other map gestures (pan/zoom).

Hope this helps!

Regards,
Nimesh
0 Kudos
HamzaHaroon
Regular Contributor
i tried that method of toggline userInteractionEnabled, but the problem with that was that once it was disabled, it would not re enable. I just made a work around to the problem by moving my freehand painting view out of the screen boundaries when its not needed.
0 Kudos