Adding UIButtons on top of the map

924
2
11-18-2010 08:47 AM
JavierAbadía_Miranda
New Contributor
Hi,

How can I add an UIButton on top of the map?

I've tried creating the UIButton and adding it as a subview of AGSMapView.

However the mapLayers are drawn on top of the button and it is hidden by them.

Thank you.
0 Kudos
2 Replies
JeffPapirtis
New Contributor III
Have you tried using Interface Builder.  It sounds like the buttons you are creating are a subview of the MapView.  This will most likely cause it to be covered by the map. 

open your xib in IB.  add a button to it and make sure that it is not contained as a subview of mapView.  Drag your button out of mapView, and place it below mapView.  not inside mapView. 

Hope that helps.
0 Kudos
JavierAbadía_Miranda
New Contributor
Hi,

Thank you. Yes it worked.

Even if the button is inside the MapView it doesn't have to be a subview of it.

Thank you.
0 Kudos