From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Fix stackview disasters

Fix stackview disasters

- [Instructor] Stack views are supposed to help make layout and auto layout easier, but often, they will leave you very frustrated. Take a look at this storyboard, which you can download from the exercise files. It's a mess, let's discuss some solutions for a mess of nested stack views like this one. You'll see on the Error panel that I have a lot of errors, much of this is from the stack views being a set of constraints. But let's add one more stack view first before we start resolving all these constraints. Go back to the outline and select with a Command + click the chicken, the vegetable, the fish, and the beef, which is our soup bases. And I'm going to make this a stack view by going down to the button on the bottom, the Embed in button, and I'm going to embed it in a stack view. That embeds it in a stack view, and it disappears off the screen. You can see it's actually way down here on the bottom now. And what I'll do is go back up here to the Access and change it to Horizontal.…

Contents