Skip to content

Commit

Permalink
added two function in AKImagePickerControllerDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkhitev committed Mar 1, 2017
1 parent ffa2aad commit 7e748b1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion AKImagePickerController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |s|

s.name = "AKImagePickerController"
s.version = "1.1.1"
s.version = "1.1.2"
s.summary = "A short description of AKImagePickerController."

s.description = "This is an ImagePickerController"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ open class AKImagePickerController: UIViewController {
checkPhotoLibraryAccess()
}

open override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
delegate?.akImagePickerControllerWillDisappear?()
}

open override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
delegate?.akImagePickerControllerDidDisappear?()
}

// MARK: - Camera

// MARK: - Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ import Photos

@objc public protocol AKImagePickerControllerDelegate {

@objc optional func controllerWillEnlargePreview(_ controller: AKImagePickerController)
@objc optional func controllerDidEnlargePreview(_ controller: AKImagePickerController)

@objc optional func controller(_ controller: AKImagePickerController, willSelectAsset asset: PHAsset)
@objc optional func controller(_ controller: AKImagePickerController, didSelectAsset asset: PHAsset)
@objc optional func akImagePickerController(_ image: UIImage, with cropRect: CGRect, angle: Int)

@objc optional func controller(_ controller: AKImagePickerController, willDeselectAsset asset: PHAsset)
@objc optional func controller(_ controller: AKImagePickerController, didDeselectAsset asset: PHAsset)
// MARK: - Lifecycle

@objc optional func akImagePickerController(_ image: UIImage, with cropRect: CGRect, angle: Int)
@objc optional func akImagePickerControllerDidDisappear()
@objc optional func akImagePickerControllerWillDisappear()


}
2 changes: 1 addition & 1 deletion AKImagePickerController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<string>1.1.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSCameraUsageDescription</key>
Expand Down

0 comments on commit 7e748b1

Please sign in to comment.