Skip to content

Latest commit

 

History

History

day-032

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Day 32: Milestone for Projects 4-6

Follow along at https://www.hackingwithswift.com/100/32.

📒 Field Notes

This day resolves around recapping the content covered while going through Projects 4-6 in Hacking with Swift. I won't try to rehash what I wrote up already, but a few additional tidbits are noteworthy:

  • Whenever we're creating views in code — instead of with storyboards — overriding our view controller's loadView function is often the place to do it. For that matter, it's worth knowing about UIViewController's view loading lifecycle as a whole:

    • loadView
    • viewDidLoad
    • viewWillAppear
    • viewDidAppear
    • viewWillDisappear
    • viewDidDisappear
    • viewWillLayoutSubviews
    • viewDidLayoutSubviews

    The UIViewController docs have more on all of these — as well as this handy graph:

    view controller lifecycle

  • Auto Layout in code:

    • VFL is cool
    • Anchors are cool — and usually a lot more useful.
    • UIStackView is another important part of this paradigm — but also a much larger topic 🙂.

🔗 Additional/Related Links