Skip to content

Commit

Permalink
Update to 5.0.9
Browse files Browse the repository at this point in the history
Add `prefersLargeTitles` to list controller.
  • Loading branch information
ivanvorobei committed Nov 20, 2019
1 parent fb0f3a4 commit 10a4b23
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
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 = "5.0.8"
s.version = "5.0.9"
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 @@ -33,6 +33,11 @@ public class SPPermissionsListController: UITableViewController, SPPermissionsCo
public var headerText: String = SPPermissionsText.subtitleText
public var footerText: String = SPPermissionsText.commentText

/**
Allow set small navigation bar. You shoud customize it here, becouse controller add to navigation only before call `present()` func.
*/
public var prefersLargeTitles: Bool = true

private var permissions: [SPPermission]

init(_ permissions: [SPPermission]) {
Expand All @@ -59,7 +64,7 @@ public class SPPermissionsListController: UITableViewController, SPPermissionsCo

navigationItem.title = titleText
navigationItem.largeTitleDisplayMode = .automatic
navigationController?.navigationBar.prefersLargeTitles = true
navigationController?.navigationBar.prefersLargeTitles = prefersLargeTitles
navigationController?.presentationController?.delegate = self

tableView.delaysContentTouches = false
Expand Down
5 changes: 3 additions & 2 deletions Source/SPPermissions/SPPermissions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public enum SPPermissions {

- parameter permissions: List of permissions for request.
*/
public static func native(_ permissions: [SPPermission]) {

public static func native(_ permissions: [SPPermission]) -> SPPermissionsNativeController {
let controller = SPPermissionsNativeController(removeDublicates(permissions))
return controller
}

/**
Expand Down

0 comments on commit 10a4b23

Please sign in to comment.