Lecture 5: Properties Layout @ViewBuilder

Stanford published this video item, entitled “Lecture 5: Properties Layout @ViewBuilder” – below is their description.

Video 5 of the SwiftUI development lecture series given at Stanford during the Spring quarter of 2021 starts off by redefining the need and use cases for @State, while more specifically explaining its memory usage. More broadly in this lecture, the concept of properties is expanded to include computed properties and property observers. We then move on to the next major topic: the architecture for laying Views out on screen. This includes more details about combiner Views, some tools to modify a View’s layout such as GeometryReader, overlay, and background, along with the @ViewBuilder directive which provides syntactical support for building (sometimes conditional) lists of Views. Many of these are demonstrated in the Memorize game by automatically sizing the game’s emoji font to fit the available space. Along the way, the “access control” on the internal APIs of Memorize is tightened up and numerous XCode features such as rename and fold are demonstrated.

Stanford YouTube Channel

Got a comment? Leave your thoughts in the comments section, below. Please note comments are moderated before publication.


About This Source - Stanford

Stanford University, officially Leland Stanford Junior University, is a private research university in Stanford, California. The campus occupies 8,180 acres, among the largest in the United States, and enrolls over 17,000 students. Stanford is ranked among the best universities in the world.

Recent from Stanford:

The movers and shakers of stanford’s earthquake center 1

The movers and shakers of Stanford’s earthquake center

Sarafan ChEM-H Vlog

Two tricks for healthier eating

Leave a Comment

We don't require your email address, or your name, for anyone to leave a comment. If you do add an email address, you may be notified if there are replies to your comment - we won't use it for any other purpose. Please make respectful comments, which add value, and avoid personal attacks on others. Links are not allowed in comments - 99% of spam comments, attempt to post links. Please describe where people may find additional information - for example "visit the UN website" or "search Google for..." rather than posting a link. Comments failing to adhere to these guidelines will not be published.