SwiftUI

Oct 22 2019 · Swift 5, iOS 13, Xcode 11

Part 2: Building Interfaces with Container Views

17. ScrollView & Stacks

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 16. Lists & Forms Next episode: 18. Navigation

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 17. ScrollView & Stacks

Note: In the demo where you use the frame modifier to affect the layout of the cells, we use a min calculation with a + operator. However, you should use a max with a -. This has been added as notes to the project and you'll be notified within the project. The line in question should be written: .frame(width: max(proxy.size.width - proxy.frame(in: .global).midX,. The culprit seems to cause a crash in the latest version of SwiftUI.

Note: In this episode, you may see the now-obsolete #if DEBUG macro, which used to be utilised for previews to run in the canvas. This is now no longer necessary, and you can safely ignore it. We’ve removed it from the project for convenience as well.