что такое Zoom transition

Generated on 8/8/2024

1 search

Zoom transition is a new type of transition introduced in iOS 18 that enhances the visual continuity in your app by morphing a tapped cell into the incoming view. This transition is continuously interactive, allowing users to grab and drag it around from the beginning or during the transition. It is particularly useful in parts of your app where you transition from a large cell, as it keeps the same UI elements on screen across the transition.

To implement a zoom transition in SwiftUI, you need to:

  1. Add the navigationTransitionStyle modifier to the presented view and specify the zoom transition.
  2. Connect this modifier to a source view so that the system knows which view to zoom from.

For UIKit, the process is similar:

  1. Specify on the push view controller that it would like to zoom.
  2. Provide the view to use as a source of the zoom transition.

This transition is also interruptible, making your app feel more responsive as users navigate your UI. It has been well-received in apps like Photos and Notes, where it enhances the user experience by allowing fluid and interactive transitions.

For more details, you can refer to the session Enhance your UI animations and transitions at the timestamp 02:07.