Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift iOS Programming for Kids

You're reading from   Swift iOS Programming for Kids Help your kids build simple and engaging applications with Swift 3.0

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787120747
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Steffen D. Sommer Steffen D. Sommer
Author Profile Icon Steffen D. Sommer
Steffen D. Sommer
Jim Campagno Jim Campagno
Author Profile Icon Jim Campagno
Jim Campagno
Arrow right icon
View More author details
Toc

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. 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime