I'm developing an iOS app and need to display a custom, semi-transparent UIView over the entirety of my main map view. When I place this UIView over the AGSMapView, the MapView doesn't respond to touch events. I've tried replacing the touch delegate with a UIView which sits above all the windows, as well as capturing the touch events from the main window and directly sending them to the AGSMapView and touch delegates, but neither work. I can capture simple touch events and send them to the MapView, but gestures, such as pinch and zoom, can't seem to be passed. Is there an easy way to get around this?
If you deselect the "User Interaction Enabled" checkbox on your semi-transparent overlay UIView's Attribute Inspector, you should get interaction bubble through to the underlying AGSMapView.
Note, there is a "User Interaction Enabled" setting under the Identity Inspector's Accessibility section too, but you shouldn't need to modify this unless perhaps you enabled accessibility in that same section.
I've only tested this in the simulator so far, but can click, pan and pinch. Haven't tried any more complex gestures, but I suspect they'll be passed on through.
Cheers,
Nick.
P.S. I've attached a minimal XCode 4.2/iOS 5 sample project to show this in action.
If you deselect the "User Interaction Enabled" checkbox on your semi-transparent overlay UIView's Attribute Inspector, you should get interaction bubble through to the underlying AGSMapView.
Note, there is a "User Interaction Enabled" setting under the Identity Inspector's Accessibility section too, but you shouldn't need to modify this unless perhaps you enabled accessibility in that same section.
I've only tested this in the simulator so far, but can click, pan and pinch. Haven't tried any more complex gestures, but I suspect they'll be passed on through.
Cheers,
Nick.
P.S. I've attached a minimal XCode 4.2/iOS 5 sample project to show this in action.
I can confirm that this solves the problem, allowing a transparent UIView to sit on top of the MapView. I had "User Interaction Enable" unchecked in the Accessibility section, but it was still checked the View section.