1

I create two buttons inside a UIView and by selecting each button I intend to display a subview. I created the views in auto layout. But I cannot set constraints from the UIView containing the buttons to the navigation item. So when I run it in simulator I don't see neither buttons nor the UIview but the color of the navigation item changes to that of the button's UIView Tint (in this case blue) looks like my buttons and the UIview are hidden somewhere.

enter image description here

Display looks like this: enter image description here

vrao
  • 545
  • 2
  • 12
  • 33

1 Answers1

0

Give top constraint to your uiview with Top Layout Guide, make sure it is not with its superview. Then this will surely work.

Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81