cs193p – Lecture #8 – Autolayout and Navigation

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture #8 starts with a discussion on auto layout and shows (slides only) how to adjust the current non-auto layout of the card playing game:

… fixed withs are bad!

… constraints defining distances should be Default or 0 … (use snapping to guidelines) …

… constraints can have priorities from 0 to 1000 – 1000 means mandatory …

… purple constraints are mandatory, blue ones are user constraints …

… content hugging shrinks the size of the surrounding frame to its contents …

… the actual layout (portrait vs landscape) can be tested directly in story board using the attribute inspector of a controller in storybaord …

The second half of the lecture introduces the navigation view controller and segues – and finally shows how to implement them in a demo.

The code of the demo is available at Stanford and on github.

Slides are available on iTunes …..

The lecture is available at iTunes and is named “8. Autolayout and Navigation (January 31, 2013)”.


One thought on “cs193p – Lecture #8 – Autolayout and Navigation”

Leave a Reply

Your email address will not be published.