Building Responsive Interactions
summary
An app built from a collection view with compositional layout and cells hosted via UIKit and SwiftUI starts out hitching, sliders failing about 50 percent of the time, and dismissal gestures dropping. Fixes include async image decoding with prepareForDisplay, using pan gestures and an interruptible decay animation loop instead of discrete swipe recognizers, moving transforms to layers, and profiling hitches with Instruments. On promotion devices at 120 hertz this yields smooth scrolling, responsive sliders and interruptible gestures and the rebuilt scroll behavior using motion works as intended.
AI-written summary Β· about
chapters (24)
- 0:00Introduction
- 3:33Time Machine app updates demo
- 4:58Fix unresponsive touches
- 7:28Improving slider responsiveness
- 10:58Contextual menus for interactions
- 11:39Key takeaways
- 12:01Fixing scrolling hitches
- 15:31Responsive image loading
- 17:16Quick tips for scrolling lag
- 17:38Analyzing gesture responsiveness
- 18:20Reduce gesture latency
- 20:44Perceived responsiveness
- 21:27Avoid swipe recognizer
- 22:31Interruptible gesture loops
- 25:58Motion for animations
- 27:47Rebuilding UIScrollView
- 28:07Optimizing sheet animations
- 29:30Interruptible loops in photo editor
- 32:57Flip animation with hosting
- 33:59Summary
- 34:20Accessibility and reduced motion
- 34:40Final tips
- 35:44Closing thoughts
- 37:48Q&A
related talks
35mSwiftUI Performance for Demanding Apps
47mSwiftUI Performance for Demanding Apps
28mElevating your design with SwiftUI
54m60 fps UI on iOS
44mBoosting Compose UI from Sluggish to Snappy
22mTaming a Four-Year-Old Detail Screen That Slowed Down Over Time
06mEXIT 8 for SwiftUI
30mEvolving Existing Projects With SwiftUI
