Summary

This chapter covered a lot of ground related to how interfaces work and how we can construct them using Xcode's Interface Builder. The chapter started out by explaining the view hierarchy and how we can use that to position elements using frames, bounds, and Auto Layout. We also briefly looked at some of the important states in the view life cycle:

We ended the chapter by making a small application, which we called Starry Night. The application scaled correctly across devices with different screen sizes because we used Auto Layout constraints. The application was able to animate the background color based on the user tapping the buttons. The application also showed how to tie the UI together with the code we write in our view controllers.

In the next chapter, we will continue to build user interfaces and start adding more code to our application, making it more fun and engaging to use.