Skip to content

Commit

Permalink
race fixed
Browse files Browse the repository at this point in the history
when autoClosePicker is false
  • Loading branch information
Jari Kalinainen committed Apr 6, 2018
1 parent 59b567b commit a489ecf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UIImageCropper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'UIImageCropper'
s.version = '1.3.0'
s.version = '1.3.1'
s.summary = 'Simple Image cropper for UIImage and UIImagePickerController with customisable aspect ratio.'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion UIImageCropper/UIImageCropper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ public class UIImageCropper: UIViewController, UIImagePickerControllerDelegate,

//MARK: - button actions
@objc func cropDone() {
delegate?.didCropImage(originalImage: self.image, croppedImage: self.cropImage)
self.dismiss(animated: false, completion: {
if self.autoClosePicker {
self.picker?.dismiss(animated: true, completion: nil)
}
self.delegate?.didCropImage(originalImage: self.image, croppedImage: self.cropImage)
})
}

Expand Down

0 comments on commit a489ecf

Please sign in to comment.