Skip to content

Commit

Permalink
Fixed RTL for list style.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Aug 11, 2021
1 parent 7eaa872 commit c2c6d58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion SPPermissions.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SPPermissions"
s.version = "6.6.3"
s.version = "6.6.4"
s.summary = "Ask permissions on Swift. Available List, Dialog & Native interface. Can check state permission."
s.homepage = "https://github.com/ivanvorobei/SPPermissions"
s.source = { :git => "https://github.com/ivanvorobei/SPPermissions.git", :tag => s.version }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,18 @@ public class SPPermissionsListController: UITableViewController, SPPermissionsCo

override public func viewDidLoad() {
super.viewDidLoad()

if showCloseButton {
if #available(iOS 13.0, *) {
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .close, target: self, action: #selector(dismissAnimated))
let closeBarButtonItem: UIBarButtonItem = {
if #available(iOS 13.0, *) {
return UIBarButtonItem(barButtonSystemItem: .close, target: self, action: #selector(dismissAnimated))
} else {
return UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(dismissAnimated))
}
}()
if view.effectiveUserInterfaceLayoutDirection == .leftToRight {
navigationItem.rightBarButtonItem = closeBarButtonItem
} else {
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(dismissAnimated))
navigationItem.leftBarButtonItem = closeBarButtonItem
}
}

Expand Down

0 comments on commit c2c6d58

Please sign in to comment.