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:

  • viewDidLoad(): This is called after the view has been loaded
  • viewWillAppear(_:): This is called every time the view is about to appear to the user
  • viewDidAppear(_:): This is called every time the view appears to the user
  • viewWillDisappear(_:): This is called every time the view is about to disappear for the user

We ended the chapter by making a small application, which we called Starry Night

Get Swift iOS Programming for Kids now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.