diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryViewController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryViewController.swift index 825084d0..6131f73c 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryViewController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryViewController.swift @@ -152,14 +152,21 @@ extension GalleryViewController: GalleryItemViewControllerDelegate { extension GalleryViewController: UIViewControllerTransitioningDelegate { public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { + #if os(visionOS) + return nil + #else if let sourceView = galleryDataSource.galleryContentTransitionSourceView(forItemAt: initialItemIndex) { return GalleryPresentationAnimationController(sourceView: sourceView) } else { return nil } + #endif } public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { + #if os(visionOS) + return nil + #else if let sourceView = galleryDataSource.galleryContentTransitionSourceView(forItemAt: currentItemViewController.itemIndex) { let translation: CGPoint? let velocity: CGPoint? @@ -175,5 +182,6 @@ extension GalleryViewController: UIViewControllerTransitioningDelegate { } else { return nil } + #endif } }