diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2329ec6..968af7f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 2.2.2 (2019-5-8)
+- fixed iOS13 issues
+
## 2.2.1 (2019-5-6)
- decreased minimum deployment target to iOS10
diff --git a/Jelly.podspec b/Jelly.podspec
index 81f7cbb..7b45a2e 100644
--- a/Jelly.podspec
+++ b/Jelly.podspec
@@ -6,7 +6,7 @@
Pod::Spec.new do |s|
s.name = 'Jelly'
- s.version = '2.2.1'
+ s.version = '2.2.2'
s.summary = 'Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.'
s.description = <<-DESC
diff --git a/Jelly/Classes/private/Animators/Animated Animators/CoverAnimator.swift b/Jelly/Classes/private/Animators/Animated Animators/CoverAnimator.swift
index 5e04f54..95374e6 100644
--- a/Jelly/Classes/private/Animators/Animated Animators/CoverAnimator.swift
+++ b/Jelly/Classes/private/Animators/Animated Animators/CoverAnimator.swift
@@ -3,6 +3,7 @@ import Foundation
final class CoverAnimator: NSObject {
private let presentationType : PresentationType
private let presentation : CoverPresentation
+ private var currentPropertyAnimator: UIViewPropertyAnimator?
init(presentationType: PresentationType, presentation: CoverPresentation) {
self.presentationType = presentationType
@@ -14,11 +15,15 @@ final class CoverAnimator: NSObject {
extension CoverAnimator : UIViewControllerAnimatedTransitioning {
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
let propertyAnimator = createPropertyAnimator(using: transitionContext)
+ currentPropertyAnimator = propertyAnimator
propertyAnimator.startAnimation()
}
func interruptibleAnimator(using transitionContext: UIViewControllerContextTransitioning) -> UIViewImplicitlyAnimating {
- return createPropertyAnimator(using: transitionContext)
+ // According to Apple's document:
+ // "You must return the same animator object for the duration of the transition."
+ // https://developer.apple.com/documentation/uikit/uiviewcontrolleranimatedtransitioning/1829434-interruptibleanimator
+ return currentPropertyAnimator ?? createPropertyAnimator(using: transitionContext)
}
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
diff --git a/Jelly/Classes/private/Animators/Animated Animators/FadeAnimator.swift b/Jelly/Classes/private/Animators/Animated Animators/FadeAnimator.swift
index 5f4391d..9caa0d8 100644
--- a/Jelly/Classes/private/Animators/Animated Animators/FadeAnimator.swift
+++ b/Jelly/Classes/private/Animators/Animated Animators/FadeAnimator.swift
@@ -3,6 +3,7 @@ import Foundation
final class FadeAnimator: NSObject {
private let presentationType : PresentationType
private let presentation : FadePresentation
+ private var currentPropertyAnimator: UIViewPropertyAnimator?
init(presentationType: PresentationType, presentation: FadePresentation) {
self.presentationType = presentationType
@@ -13,7 +14,7 @@ final class FadeAnimator: NSObject {
extension FadeAnimator : UIViewControllerAnimatedTransitioning {
func interruptibleAnimator(using transitionContext: UIViewControllerContextTransitioning) -> UIViewImplicitlyAnimating {
- return createPropertyAnimator(using: transitionContext)
+ return currentPropertyAnimator ?? createPropertyAnimator(using: transitionContext)
}
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
@@ -22,6 +23,7 @@ extension FadeAnimator : UIViewControllerAnimatedTransitioning {
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
let propertyAnimator = createPropertyAnimator(using: transitionContext)
+ currentPropertyAnimator = propertyAnimator
propertyAnimator.startAnimation()
}
diff --git a/Jelly/Classes/private/Animators/Animated Animators/SlideAnimator.swift b/Jelly/Classes/private/Animators/Animated Animators/SlideAnimator.swift
index 7003205..aa73050 100644
--- a/Jelly/Classes/private/Animators/Animated Animators/SlideAnimator.swift
+++ b/Jelly/Classes/private/Animators/Animated Animators/SlideAnimator.swift
@@ -3,6 +3,7 @@ import Foundation
final class SlideAnimator: NSObject {
private let presentationType : PresentationType
private let presentation : SlidePresentation
+ private var currentPropertyAnimator: UIViewPropertyAnimator?
init(presentationType: PresentationType, presentation: SlidePresentation) {
self.presentationType = presentationType
@@ -18,11 +19,12 @@ extension SlideAnimator : UIViewControllerAnimatedTransitioning {
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
let propertyAnimator = createPropertyAnimator(using: transitionContext)
+ currentPropertyAnimator = propertyAnimator
propertyAnimator.startAnimation()
}
func interruptibleAnimator(using transitionContext: UIViewControllerContextTransitioning) -> UIViewImplicitlyAnimating {
- return createPropertyAnimator(using: transitionContext)
+ return currentPropertyAnimator ?? createPropertyAnimator(using: transitionContext)
}
func createPropertyAnimator(using transitionContext: UIViewControllerContextTransitioning) -> UIViewPropertyAnimator{
diff --git a/README.md b/README.md
index 4fa4756..e58f340 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
![Jelly-Animators: Elegant Viewcontroller Animations in Swift](https://github.com/SebastianBoldt/Jelly/blob/master/Github/Jellyfish.png?raw=true)
-
+