Summary

Congratulations, you have successfully created an application that runs on all iOS devices and screen sizes. You took an application that had just a single page and turned it into a simple contacts application with a detail view. To achieve this, you made use of Auto Layout and traitCollections. You learned about size classes and what they tell you about the available screen's real estate for your application. You also learned how to make use of Auto Layout through code and how to respond to changes in your app's environment in real time. Finally, you learned how to simplify a lot of the Auto Layout work you've done by implementing UIStackView. To top it all off, you saw how prepare(for:sender) allows you to pass data from one view controller to another.

The lessons you've learned in this chapter are extremely valuable. The increase in possible screen sizes over the past few years has made Auto Layout an invaluable tool for developers and not using it will make your job much harder. If Auto Layout is still a bit hard for you, or it doesn't fully make sense, don't worry. We'll keep using Auto Layout in this book so you will get the hang of it. Going over this chapter again if you feel lost should help you as well; it's a lot to take in, so there's no shame in reading it again. In the next chapter, you'll add some finishing touches to Hello-Contacts. The best applications feature clever and useful animations. In the previous chapters, you have already used little bits of animation. In the next chapter, you are going to dive deep into more complex animations and custom transitions between view controllers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset