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.
Asked
Active
Viewed 46 times
1 Answers
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
-
I cannot make it work. Can you post layout with constraints? – vrao Mar 30 '17 at 17:55
-
Thanks It works. How can I give border to the buttons? – vrao Mar 30 '17 at 18:11
-
see my answer here : https://stackoverflow.com/questions/18295703/ios-7-and-button-and-border/18893257#18893257 – Mehul Thakkar Mar 31 '17 at 05:11