0
votes

The view controller on the left has 2 containers ("the top container" and "the bottom container"). The top container has the constraint bottom space to superview = 60. The bottom container has a height of 60. The top container has an embedded VC to its rights. Inside the embedded VC there is a text field. The text field has the constraint bottom space to superview = 0. It seems like that should align the text field with the bottom of the top container.

Instead, it aligns the the text field with the bottom of the VC on the left; in other words, with the bottom of the bottom container. When the app is run, the text field is completely hidden behind the bottom container.

Why is this? Isn't the text field's superview the top container (or at least coincident with it?)

visual

visual

1
It seems to me that in the embedded view controller, you have another container? What happens when you run the application?Legoless
The container in the embedded VC has no effect. I just deleted it and it made no difference. When I run the application, there is just a blank screen. The text field is hidden behind the bottom container. I know that because I have tried moving it up 60 pixels, and then it becomes visible.mkc842

1 Answers

0
votes

The problem was that the container view in which the VC on the left was embedded was sized to extend all the way to the bottom of its VC, overlapping the tab bar menu, because I hide the tab bar menu anyway, so I thought that was correct. But in fact, I needed the parent container view to extend only down as far as the top of the tab bar menu.