diff --git a/AKImageCropperView/AKImageCropperOverlayViewConfiguration.swift b/AKImageCropperView/AKImageCropperOverlayViewConfiguration.swift index 2e36b7d..39d44ec 100644 --- a/AKImageCropperView/AKImageCropperOverlayViewConfiguration.swift +++ b/AKImageCropperView/AKImageCropperOverlayViewConfiguration.swift @@ -39,7 +39,7 @@ public struct AKImageCropperCropViewConfiguration { - duration: The duration of the transition animation, measured in seconds. - options: Specifies the supported animation curves. */ - public var animation: (duration: TimeInterval, options: UIViewAnimationOptions) = (duration: 0.3, options: .curveEaseInOut) + public var animation: (duration: TimeInterval, options: UIView.AnimationOptions) = (duration: 0.3, options: .curveEaseInOut) /// Edges insets for crop rectangle. Static values for programmatically rotation. diff --git a/AKImageCropperView/AKImageCropperView.swift b/AKImageCropperView/AKImageCropperView.swift index f88565c..a2d6358 100644 --- a/AKImageCropperView/AKImageCropperView.swift +++ b/AKImageCropperView/AKImageCropperView.swift @@ -427,7 +427,7 @@ open class AKImageCropperView: UIView, UIScrollViewDelegate, UIGestureRecognizer - Parameter completion: A block object to be executed when the animation sequence ends. This block has no return value and takes a single Boolean argument that indicates whether or not the animations actually finished before the completion handler was called. If the duration of the animation is 0, this block is performed at the beginning of the next run loop cycle. This parameter may be NULL. */ - open func showOverlayView(animationDuration duration: TimeInterval = 0, options: UIViewAnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { + open func showOverlayView(animationDuration duration: TimeInterval = 0, options: UIView.AnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { guard let image = image, let overlayView = overlayView, !isOverlayViewActive && !isAnimation else { return @@ -492,7 +492,7 @@ open class AKImageCropperView: UIView, UIScrollViewDelegate, UIGestureRecognizer - Parameter completion: A block object to be executed when the animation sequence ends. This block has no return value and takes a single Boolean argument that indicates whether or not the animations actually finished before the completion handler was called. If the duration of the animation is 0, this block is performed at the beginning of the next run loop cycle. This parameter may be NULL. */ - open func hideOverlayView(animationDuration duration: TimeInterval = 0, options: UIViewAnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { + open func hideOverlayView(animationDuration duration: TimeInterval = 0, options: UIView.AnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { guard let image = image, let overlayView = overlayView, isOverlayViewActive && !isAnimation else { return @@ -561,7 +561,7 @@ open class AKImageCropperView: UIView, UIScrollViewDelegate, UIGestureRecognizer - Parameter completion: A block object to be executed when the animation sequence ends. This block has no return value and takes a single Boolean argument that indicates whether or not the animations actually finished before the completion handler was called. If the duration of the animation is 0, this block is performed at the beginning of the next run loop cycle. This parameter may be NULL. */ - open func rotate(_ angle: Double, withDuration duration: TimeInterval = 0, options: UIViewAnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { + open func rotate(_ angle: Double, withDuration duration: TimeInterval = 0, options: UIView.AnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { guard angle.truncatingRemainder(dividingBy: Double.pi/2) == 0 else { return @@ -600,7 +600,7 @@ open class AKImageCropperView: UIView, UIScrollViewDelegate, UIGestureRecognizer - Parameter completion: A block object to be executed when the animation sequence ends. This block has no return value and takes a single Boolean argument that indicates whether or not the animations actually finished before the completion handler was called. If the duration of the animation is 0, this block is performed at the beginning of the next run loop cycle. This parameter may be NULL. */ - open func reset(animationDuration duration: TimeInterval = 0, options: UIViewAnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { + open func reset(animationDuration duration: TimeInterval = 0, options: UIView.AnimationOptions = .curveEaseInOut, completion: ((Bool) -> Void)? = nil) { guard !isAnimation else { return