Skip to content

Commit

Permalink
'UIViewAnimationOptions' has been renamed to 'UIView.AnimationOptions'
Browse files Browse the repository at this point in the history
  • Loading branch information
ykws committed Jan 18, 2022
1 parent 1307194 commit b818f74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions AKImageCropperView/AKImageCropperView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b818f74

Please sign in to comment.