Hello,
I am trying to do AutoLayout correctly. I often end up with views that look correct in Storyboard, look fine in Storyboard Preview, look fine one screen, but throw an Auto Layout Constraint error.
One case is when I put a view on top of another view. For example if I have a SEARCH BARwith 4 buttons below it, and I want the user to select one of the 4 buttons first, on top of the SEARCH BAR I put a LABEL with a colour background. Once a button is selected, I slide up the LABEL, and give focus to the SEARCH BAR. This throws an CONSTRAINT ERROR with Auto Layout when the App is run listing every single button and the search bar.
Another example is putting two views into a Main View if it contains a Segmented Control, and I want to design the views the Segment Control shows with Storyboard. I see no other way of doing this beside putting two subviews into the view, designing them with Storyboard. It works fine, but again throws a CONSTRAINT ERROR.
What are best practises with this ?
Thanks.