diff --git a/DLAutoSlidePageViewController.podspec b/DLAutoSlidePageViewController.podspec index 1df6f79..48a6ce9 100644 --- a/DLAutoSlidePageViewController.podspec +++ b/DLAutoSlidePageViewController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DLAutoSlidePageViewController' - s.version = '1.3.1' + s.version = '1.3.2' s.summary = 'An auto slide PageViewController.' s.description = <<-DESC diff --git a/Sources/DLAutoSlidePageViewController.swift b/Sources/DLAutoSlidePageViewController.swift index 9dfdf2b..b835bae 100644 --- a/Sources/DLAutoSlidePageViewController.swift +++ b/Sources/DLAutoSlidePageViewController.swift @@ -28,6 +28,17 @@ open class DLAutoSlidePageViewController: UIPageViewController { return UIPageControl.appearance(whenContainedInInstancesOf: [UIPageViewController.self]) } + // MARK: - Lifecycle + + public override func willTransition(to newCollection: UITraitCollection, + with coordinator: UIViewControllerTransitionCoordinator) { + super.willTransition(to: newCollection, with: coordinator) + coordinator.animate(alongsideTransition: nil) { _ in + self.transitionInProgress = false + self.restartTimer() + } + } + // MARK: - Initializers public convenience init(pages: [UIViewController],