I've got an iPhone app that uses Storyboards and I've implemented a View Controller in witch I have a UISegmentedControl
with 2 components and a Container View
.
When I tap one of the 2 components of the segmented control, the container view changes between 2 custom view controllers that I've implemented and connected to it. To do that, I followed this tutorial: http://sandmoose.com/post/35714028270/storyboards-with-custom-container-view-controllers
What I've done more, and it's missing from that tutorial, is adding constraints to the container view in my storyboard file, because I want the container's height to be flexible.
Now, the problem is that the first time I enter the screen, the height of the container is not the expected one, but after switching through components, it's height changes to the correct one. What can cause this problem?