Using AlignmentGuide - WWDC21 SwiftUI Part 5

Опубликовано: 03 Ноябрь 2021
на канале: Coding With Tom
290
7

We will use AlignmentGuide to position views beside each other. Since it's not that easy to find out the coordinates of views in SwiftUI, alignment guide offers a suitable approach to constrain the position of a view in regards to another.

Chapters:
0:00 Using AlignmentGuide to Position Views
0:35 Creating DemoView
2:29 Creating Custom Alignments
5:28 Creating if ViewModifier
7:48 Creating FocusModifier
9:19 Creating FocusAreaModifier
10:32 Adding FocusModifierViewModel
12:21 Adding GloablFocusAreaViewModel as an EnvironmentObject
16:54 Hiding Focus When Not Needed
18:40 Adding a Position to the Focus Arrow
20:08 Adding DemoView and Modifiers to WWDC App

Source code: https://github.com/codingWithTom/WWDC...

WWDC 2021 playlist:    • WWDC 2021  

Intro song: All That from Bensound.com
Outro song: Endless Motion from Bensound.com