Skip to content

[viewer][ios] Support transitionView: smooth transitions when zooming when viewing a document #918

@davidjbng

Description

@davidjbng

Feature description

While building a Quick Look based file viewer expo module myself I discovered that you could pass a transitionViewFor to the PreviewController to "to provide a smooth transition when zooming".

We recently decided to replace our custom module with react-native-documents, but view transitions is something that I miss and it seems not that hard to achieve here.

In my implementation there is only the part of finding the native view by a viewTag (which is returned by findNodeHandle):

let transitionView: UIView? =
          viewTag != nil
          ? appContext?.reactBridge?.uiManager.view(forReactTag: NSNumber(value: viewTag!)) : nil
        self.previewControllerDelegate = PreviewControllerDelegate(transitionView: transitionView)

Example Implementation

Also check out this GIF for how this would behave in the app:
Image

Happy to contribute this as well, but still need to check how my Swift examples translate to this codebase.

What platform(s) should this be implemented on?

iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions