From f69682f594fb5bed75374e2aaa64ec136133c9bc Mon Sep 17 00:00:00 2001 From: hhh <65709676+huanghui1998hhh@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:44:19 +0800 Subject: [PATCH] fix warning: use 'AnyObject' instead 'class' (#120) Co-authored-by: huanghui1998hhh <465040840@qq.com> --- Example/ImagePicker.swift | 2 +- Sources/Mantis/CropView/CropView.swift | 2 +- Sources/Mantis/CropViewController/CropToolbarProtocol.swift | 2 +- Sources/Mantis/CropViewController/CropViewController.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Example/ImagePicker.swift b/Example/ImagePicker.swift index 5bed8ab7..577e6a50 100644 --- a/Example/ImagePicker.swift +++ b/Example/ImagePicker.swift @@ -8,7 +8,7 @@ import UIKit -public protocol ImagePickerDelegate: class { +public protocol ImagePickerDelegate: AnyObject { func didSelect(image: UIImage?) } diff --git a/Sources/Mantis/CropView/CropView.swift b/Sources/Mantis/CropView/CropView.swift index a991adef..b3925ba5 100644 --- a/Sources/Mantis/CropView/CropView.swift +++ b/Sources/Mantis/CropView/CropView.swift @@ -24,7 +24,7 @@ import UIKit -protocol CropViewDelegate: class { +protocol CropViewDelegate: AnyObject { func cropViewDidBecomeResettable(_ cropView: CropView) func cropViewDidBecomeUnResettable(_ cropView: CropView) func cropViewDidBeginResize(_ cropView: CropView) diff --git a/Sources/Mantis/CropViewController/CropToolbarProtocol.swift b/Sources/Mantis/CropViewController/CropToolbarProtocol.swift index 51baca70..b0c9fd95 100644 --- a/Sources/Mantis/CropViewController/CropToolbarProtocol.swift +++ b/Sources/Mantis/CropViewController/CropToolbarProtocol.swift @@ -7,7 +7,7 @@ import UIKit -public protocol CropToolbarDelegate: class { +public protocol CropToolbarDelegate: AnyObject { func didSelectCancel() func didSelectCrop() func didSelectCounterClockwiseRotate() diff --git a/Sources/Mantis/CropViewController/CropViewController.swift b/Sources/Mantis/CropViewController/CropViewController.swift index 9d8530aa..90fb6030 100644 --- a/Sources/Mantis/CropViewController/CropViewController.swift +++ b/Sources/Mantis/CropViewController/CropViewController.swift @@ -24,7 +24,7 @@ import UIKit -public protocol CropViewControllerDelegate: class { +public protocol CropViewControllerDelegate: AnyObject { func cropViewControllerDidCrop(_ cropViewController: CropViewController, cropped: UIImage, transformation: Transformation) func cropViewControllerDidFailToCrop(_ cropViewController: CropViewController, original: UIImage)