-
-
Notifications
You must be signed in to change notification settings - Fork 462
Open
Description
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
- In Quick Look: https://github.com/davidjbng/expo-file-viewer/blob/abba42091d1f863ad0baa252638381df4f2c5012/ios/ExpoFileViewerModule.swift#L46-L49
- App Usage https://github.com/davidjbng/expo-file-viewer/blob/abba42091d1f863ad0baa252638381df4f2c5012/example/App.tsx#L63-L65
Also check out this GIF for how this would behave in the app:

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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels