Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public protocol DocumentCropViewControllerDelegate: class {

func documentCropViewController(result: Result)
func documentCropViewController(failed: Error)
func documentCropViewControllerWillConfigure()
func documentCropViewControllerDidConfigure()

}

Expand Down Expand Up @@ -60,6 +62,9 @@ open class DocumentCropViewController: UIViewController {
}

public func configure() {
DispatchQueue.main.async { [weak self] in
self?.cropDelegate?.documentCropViewControllerWillConfigure()
}
image = image?.fixOrientation()
imageView.transform = CGAffineTransform.identity
imageView.image = image
Expand All @@ -68,6 +73,9 @@ open class DocumentCropViewController: UIViewController {

guard let image = image else { return }
rectangleDetector.detect(image: image, completion: handleDetection)
DispatchQueue.main.async { [weak self] in
self?.cropDelegate?.documentCropViewControllerDidConfigure()
}
}

private func updateCropview() {
Expand Down