XtremeDevX
XtremeDevX

Reputation: 1802

Adding View On Top Of Map View

I am not able to add this view on to the map view to be displayed ... I am working with the map view and I want to add a view on top of it... Here is what I have tried :

enter image description here

Here is my output : enter image description here

As far as I can see, the map view is covering the icon view! enter image description here

I tried this too but I got the same output! Please forgive me if this is a silly mistake, I am relatively new to using MapViews. Thanks a lot for your help and I really appreciate it!

enter image description here

I tried your suggestions too :

enter image description here

enter image description here

Upvotes: 2

Views: 1007

Answers (3)

emmics
emmics

Reputation: 1063

You have to call view.bringSubviewToFront(iconView) in your viewDidLoad function.

Also make sure you have correct layouting / constraints for all your views.

Glad I could help!

Upvotes: 1

user7142686
user7142686

Reputation:

You shouldn't need code to place a view on top of a map view. Just drag the icon view under the map view in the document hierarchy.

Upvotes: 0

XtremeDevX
XtremeDevX

Reputation: 1802

Thanks a lot for the help. I found out that

view.bringSubviewToFront(iconView)

worked properly and it turns out that the first time it was suggested, I had written it wrongly! I really appreciate your help! Thanks again!

Upvotes: 2

Related Questions