From bcffdb26213db6a31a49e9d0514e8a5162e29c6a Mon Sep 17 00:00:00 2001 From: Peter Meyers Date: Tue, 19 Jan 2021 18:33:20 -0500 Subject: [PATCH] remove willStartFullscreenTransition --- MediaSlideshow/Source/AV/AVPlayerSlide.swift | 4 ---- .../Source/Fullscreen/ZoomAnimatedTransitioning.swift | 2 -- MediaSlideshow/Source/Images/ImageSlide.swift | 2 -- MediaSlideshow/Source/MediaSlideshowSlide.swift | 2 -- 4 files changed, 10 deletions(-) diff --git a/MediaSlideshow/Source/AV/AVPlayerSlide.swift b/MediaSlideshow/Source/AV/AVPlayerSlide.swift index 3d5f6e6..829209d 100644 --- a/MediaSlideshow/Source/AV/AVPlayerSlide.swift +++ b/MediaSlideshow/Source/AV/AVPlayerSlide.swift @@ -93,10 +93,6 @@ public class AVPlayerSlide: AVPlayerView, MediaSlideshowSlide { return transitionView } - public func willStartFullscreenTransition(_ type: FullscreenTransitionType) { - source.player.pause() - } - public func didAppear() { switch onAppear { case .play(let muted): diff --git a/MediaSlideshow/Source/Fullscreen/ZoomAnimatedTransitioning.swift b/MediaSlideshow/Source/Fullscreen/ZoomAnimatedTransitioning.swift index 136251c..3cf1274 100644 --- a/MediaSlideshow/Source/Fullscreen/ZoomAnimatedTransitioning.swift +++ b/MediaSlideshow/Source/Fullscreen/ZoomAnimatedTransitioning.swift @@ -204,7 +204,6 @@ class ZoomInAnimator: ZoomAnimator, UIViewControllerAnimatedTransitioning { } toViewController.view.frame = transitionContext.finalFrame(for: toViewController) - toViewController.slideshow.currentSlide?.willStartFullscreenTransition(.zoomIn) let transitionBackgroundView = UIView(frame: containerView.frame) transitionBackgroundView.backgroundColor = toViewController.backgroundColor @@ -295,7 +294,6 @@ class ZoomOutAnimator: ZoomAnimator, UIViewControllerAnimatedTransitioning { guard let fromViewController = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from) as? FullScreenSlideshowViewController else { fatalError("Transition not used with FullScreenSlideshowViewController") } - fromViewController.slideshow.currentSlide?.willStartFullscreenTransition(.zoomOut) let containerView = transitionContext.containerView var transitionImageView: UIImageView? diff --git a/MediaSlideshow/Source/Images/ImageSlide.swift b/MediaSlideshow/Source/Images/ImageSlide.swift index 5fe163f..b2b35b8 100644 --- a/MediaSlideshow/Source/Images/ImageSlide.swift +++ b/MediaSlideshow/Source/Images/ImageSlide.swift @@ -190,8 +190,6 @@ open class ImageSlide: UIScrollView, UIScrollViewDelegate, ZoomableMediaSlidesho zoomOut() } - public func willStartFullscreenTransition(_ type: FullscreenTransitionType) {} - // MARK: - Image zoom & size func tapZoom() { diff --git a/MediaSlideshow/Source/MediaSlideshowSlide.swift b/MediaSlideshow/Source/MediaSlideshowSlide.swift index bc559fe..a150ae0 100644 --- a/MediaSlideshow/Source/MediaSlideshowSlide.swift +++ b/MediaSlideshow/Source/MediaSlideshowSlide.swift @@ -22,6 +22,4 @@ public protocol MediaSlideshowSlide: UIView { func didAppear() func didDisappear() - - func willStartFullscreenTransition(_ type: FullscreenTransitionType) }