Siddhartha
Siddhartha

Reputation: 4454

Moving a label without having it nest under a screen filling UIView

I have a UIView implementing a GMSMapView which stretches to fill out the screen. I want a little label displaying text on top of this map on the top-right corner.

I managed to re-order the arrangement to successfully display it on top of the map while in the center:

enter image description here

But the moment I try to move it to another spot, it nests under Map Label and no longer shows up:

enter image description here

How can I prevent it nesting under the Map Label view?

Upvotes: 0

Views: 52

Answers (1)

Katz
Katz

Reputation: 866

First remove all constrains from the label, and then center the label in the middle of the View aligned perfectly. Then go to Resolve Auto Layout Issues and click Update Constrains after add Missing Constrains and run the app. Another way that I use stack the label and place in the middle and add the appropriate constrains. To add a Stack View select your label and click on the first icons horizontally placed on the PIN row.

enter image description here

Upvotes: 1

Related Questions