Streaming is available in most browsers,
and in the Developer app.
-
Enhance your UI animations and transitions
Explore how to adopt the zoom transition in navigation and presentations to increase the sense of continuity in your app, and learn how to animate UIKit views with SwiftUI animations to make it easier to build animations that feel continuous.
Chapters
- 0:00 - Introduction
- 1:34 - New transitions!
- 2:07 - Zoom transitions in SwiftUI
- 3:02 - Zoom transitions in UIKit
- 4:15 - UIKit view controller life cycle and callbacks
- 7:02 - Additional tips for UIKit
- 8:10 - SwiftUI animation
- 9:46 - Animating representables
- 11:20 - Gesture-driven animations
Resources
Related Videos
WWDC23
-
DownloadArray
-
-
2:10 - Zoom transition in SwiftUI
NavigationLink { BraceletEditor(bracelet) .navigationTransitionStyle( .zoom( sourceID: bracelet.id, in: braceletList ) ) } label: { BraceletPreview(bracelet) } .matchedTransitionSource( id: bracelet.id, in: braceletList )
-
3:02 - Zoom transition in UIKit
func showEditor(for bracelet: Bracelet) { let braceletEditor = BraceletEditor(bracelet) braceletEditor.preferredTransition = .zoom { context in let editor = context.zoomedViewController as! BraceletEditor return cell(for: editor.bracelet) } navigationController?.pushViewController(braceletEditor, animated: true) }
-
8:39 - Animate UIView with SwiftUI animation
UIView.animate(.spring(duration: 0.5)) { bead.center = endOfBracelet }
-
9:56 - Animating representables
struct BeadBoxWrapper: UIViewRepresentable { @Binding var isOpen: Bool func updateUIView(_ box: BeadBox, context: Context) { context.animate { box.lid.center.y = isOpen ? -100 : 100 } } } struct BraceletEditor: View { @State private var isBeadBoxOpen = false var body: some View { BeadBoxWrapper($isBeadBoxOpen.animated()) .onTapGesture { isBeadBoxOpen.toggle() } } }
-
11:39 - Gesture-driven animations
switch gesture.state { case .changed: UIView.animate(.interactiveSpring) { bead.center = gesture.translation } case .ended: UIView.animate(.spring) { bead.center = endOfBracelet } }
-
-
Looking for something specific? Enter a topic above and jump straight to the good stuff.
An error occurred when submitting your query. Please check your Internet connection and try again.