sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

Changing Base Color on v 5.1 #150

Closed jminutaglio closed 4 years ago

jminutaglio commented 4 years ago

Hello!

On the 4.x version I had used: SPPermissionDialogColorSource

To alter the base color. Does this function exist in 5.1?

ivanvorobei commented 4 years ago

Hi!

Let me add this. I am complete today or tomorrow. When I publish new version I am write about it here.

jminutaglio commented 4 years ago

Awesome - thank you in advance!

ivanvorobei commented 4 years ago

I am publish new version 5.2.2 and update readme about new data source and delegate. If big changes, need add some codes.

In data source implement this method:

func configure(_ cell: SPPermissionTableViewCell, for permission: SPPermission) -> SPPermissionTableViewCell {
    return cell
}

And configure cell:

// Colors
cell.iconView.color = .systemBlue
cell.button.allowedBackgroundColor = .systemBlue
cell.button.allowTitleColor = .systemBlue

Available more views for change colors, it for example. Don't forget about dark mode)