-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add getCropRegion to ImageContainerProtocol
- Loading branch information
Yingtao Guo
committed
Jan 20, 2023
1 parent
ccd462d
commit 035b079
Showing
7 changed files
with
69 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// CropViewControllerDelegate.swift | ||
// Mantis | ||
// | ||
// Created by yingtguo on 1/20/23. | ||
// | ||
|
||
import UIKit | ||
|
||
public protocol CropViewControllerDelegate: AnyObject { | ||
func cropViewControllerDidCrop(_ cropViewController: CropViewController, | ||
cropped: UIImage, | ||
transformation: Transformation, | ||
cropInfo: CropInfo) | ||
func cropViewControllerDidFailToCrop(_ cropViewController: CropViewController, original: UIImage) | ||
func cropViewControllerDidCancel(_ cropViewController: CropViewController, original: UIImage) | ||
|
||
func cropViewControllerDidBeginResize(_ cropViewController: CropViewController) | ||
func cropViewControllerDidEndResize(_ cropViewController: CropViewController, original: UIImage, cropInfo: CropInfo) | ||
func cropViewControllerDidImageTransformed(_ cropViewController: CropViewController) | ||
} | ||
|
||
public extension CropViewControllerDelegate where Self: UIViewController { | ||
func cropViewControllerDidFailToCrop(_ cropViewController: CropViewController, original: UIImage) {} | ||
func cropViewControllerDidBeginResize(_ cropViewController: CropViewController) {} | ||
func cropViewControllerDidEndResize(_ cropViewController: CropViewController, original: UIImage, cropInfo: CropInfo) {} | ||
func cropViewControllerDidImageTransformed(_ cropViewController: CropViewController) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters