Skip to content

Commit

Permalink
Update to 2.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Dec 6, 2018
1 parent 5619ce3 commit bec20d4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion SPPermission.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SPPermission"
s.version = "2.3.2"
s.version = "2.3.4"
s.summary = "Simple request permissions with dialog alert"
s.homepage = "https://github.com/IvanVorobei/RequestPermission"
s.source = { :git => "https://github.com/IvanVorobei/RequestPermission.git", :tag => s.version }
Expand Down
11 changes: 4 additions & 7 deletions Source/Permission/extension/SPUIViewControllerExtenshion.swift
Expand Up @@ -55,15 +55,12 @@ extension UIViewController {
extension UIViewController {

func save(image: UIImage) {
if PHPhotoLibrary.authorizationStatus() == PHAuthorizationStatus.authorized {
if SPPermission.isAllow(.photoLibrary) {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(_:didFinishSavingWithError:contextInfo:)), nil)
} else {
PHPhotoLibrary.requestAuthorization({
finished in
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(_:didFinishSavingWithError:contextInfo:)), nil)
}
})
SPPermission.request(.photoLibrary) {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(_:didFinishSavingWithError:contextInfo:)), nil)
}
}
}

Expand Down
Expand Up @@ -21,7 +21,7 @@

import UIKit

public class SPPermissionDialogController: UIViewController {
public class SPPermissionDialogController: SPBaseViewController {

weak var delegate: SPPermissionDialogDelegate?
weak var dataSource: SPPermissionDialogDataSource?
Expand Down
1 change: 0 additions & 1 deletion Source/Permission/ui/buttons/SPSystemIconButton.swift
Expand Up @@ -76,5 +76,4 @@ class SPSystemIconButton: UIButton {
super.layoutSubviews()
self.iconView.setEqualsFrameFromBounds(self, withWidthFactor: self.widthIconFactor, withHeightFactor: self.heightIconFactor, withCentering: true)
}

}

0 comments on commit bec20d4

Please sign in to comment.