Creating reusable container views
summary
Builds a reusable SwiftUI pager called PagerTabStripView using GeometryReader, the new Layout protocol (iOS 16), LazyHStack inside a ScrollView, and an EnvironmentObject-backed data store. Implements tappable “tab” items, a moving indicator, and per-page views that preserve their state when you navigate away. Explains layout math for indicator placement, shows how pages are registered via frames, and proves the library works and composes inside other scrollable containers.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:33What are container views
- 4:04Library overview
- 5:51Challenges in development
- 7:22Arranging views with GeometryReader
- 8:46Using Layout protocol
- 12:48Sharing state between views
- 15:41Q&A session
related talks
38mCreating adaptable layouts using Trait Collections and Container Views
41mWhen You Can’t Go All In On SwiftUI, Build a Hybrid UI App Instead!
23mUsing SwiftUI as a Language
41mSwiftUI Tutorial 2024: Master Navigation - NavigationStack, NavigationPath & NavigationDestination
17mMastering SwiftUI Previews: How the Project Structure can hel
39mBuilding REUSABLE SwiftUI components
26mThe SwiftUI Mindset: 5 Key Ideas to Avoid Common Pitfalls
46mPreviews and Package Oriented Programming
