Summary

Congratulations, you have successfully created an application that runs on all iOS devices and screens sizes. You took an application that had just a single page that worked on an iPhone and turned it into a simple contacts application that works on any device. To achieve this, you made use of Auto Layout and trait collections. 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.

After that, you learned how to make use of UIStackView to create very powerful layouts in a way that's much simpler than manually adding each and every constraint to your UI. Finally, you learned how to pass data from one view to the next by using segues and the prepare(for:sender) method.

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, we'll make some finishing touches on the HelloContacts application. The best applications feature clever and useful animations. In the previous chapters, we used little bits of animation. In the next chapter, we will take a deep dive 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
3.146.35.72