From 4b0d9d255744c36c6a4840ba44654a52e63cba66 Mon Sep 17 00:00:00 2001 From: Daniel Podaru Date: Mon, 29 May 2017 10:53:37 +0200 Subject: [PATCH 1/3] Fix bug: refresh icon after camera authorised --- PAPermissions/Classes/Checks/PACameraPermissionsCheck.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PAPermissions/Classes/Checks/PACameraPermissionsCheck.swift b/PAPermissions/Classes/Checks/PACameraPermissionsCheck.swift index e904be5..d7573dc 100644 --- a/PAPermissions/Classes/Checks/PACameraPermissionsCheck.swift +++ b/PAPermissions/Classes/Checks/PACameraPermissionsCheck.swift @@ -52,8 +52,8 @@ public class PACameraPermissionsCheck: PAPermissionsCheck { }else{ self.status = .disabled } + self.updateStatus(); }) - self.updateStatus(); } }else{ //Camera access should be always active on iOS 7 From aacb195f4002ba20a454c80a35bfc56c47f12ee9 Mon Sep 17 00:00:00 2001 From: Daniel Podaru Date: Mon, 29 May 2017 15:49:04 +0200 Subject: [PATCH 2/3] Make permission button localisable --- PAPermissions/Classes/PAPermissionsTableViewCell.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PAPermissions/Classes/PAPermissionsTableViewCell.swift b/PAPermissions/Classes/PAPermissionsTableViewCell.swift index 76b8f6f..2914acb 100644 --- a/PAPermissions/Classes/PAPermissionsTableViewCell.swift +++ b/PAPermissions/Classes/PAPermissionsTableViewCell.swift @@ -192,10 +192,10 @@ class PAPermissionsTableViewCell: UITableViewCell { self.enableButton.imageView?.contentMode = .scaleAspectFit self.enableButton.isUserInteractionEnabled = false }else{ - self.setupEnableDisableButton(title: "Disable") + self.setupEnableDisableButton(title: NSLocalizedString("Disable", comment: "")) } }else if status == .disabled || status == .denied { - self.setupEnableDisableButton(title: "Enable") + self.setupEnableDisableButton(title: NSLocalizedString("Enable", comment: "")) }else if status == .checking { self.enableButton.isHidden = true self.checkingIndicator.isHidden = false From 89e0ab2964f7035ed583b6716dcfd0e7f90dbe9a Mon Sep 17 00:00:00 2001 From: Daniel Podaru Date: Mon, 29 May 2017 15:51:09 +0200 Subject: [PATCH 3/3] Allow details label to adjust font size --- PAPermissions/Classes/PAPermissionsView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/PAPermissions/Classes/PAPermissionsView.swift b/PAPermissions/Classes/PAPermissionsView.swift index eb4d3f9..b397fae 100644 --- a/PAPermissions/Classes/PAPermissionsView.swift +++ b/PAPermissions/Classes/PAPermissionsView.swift @@ -290,6 +290,7 @@ class PAPermissionsView: UIView, UITableViewDataSource, UITableViewDelegate { self.detailsLabel.font = UIFont(name: "HelveticaNeue-Light", size: 15) self.detailsLabel.minimumScaleFactor = 0.1 self.detailsLabel.textColor = self.tintColor + self.detailsLabel.adjustsFontSizeToFitWidth = true } fileprivate func setupTableView() {