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.

Leave a Comment