This project is about managing permissions with the customizable visual effects. Beautiful dialog increases the chance of approval (which is important when we request notification). Simple control of this module saves you hours of development. You can start using this project with just two lines of code and easy customization! You can see how I am designed UI and how use pod tutorial on youtube
Preview GIF loading [4mb]. Please, wait
The project is absolutely free, but but it takes time to support and update it. Your support is very motivating and very important. I often receive emails asking me to update or add functionality. Small donate for a cup of coffee helps to develop the project and make it better
Swift 4.2. Ready for use on iOS 10+
Drop in Sparrow
folder to your Xcode project. Make sure to enable Copy items if needed
and Create groups
Or via CocoaPods:
pod 'SPPermission'
Call SPRequestPermission
and use func request(). Also passed controller, on which dialog should present
class ViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
SPPermission.Dialog.request(with: [.camera, .microphone, .notification], on: self)
}
}
If you want to know if you have received permission, you should call the function:
let isAvailableCamera = SPPermission.isAllow(.сamera)
To track events hide & allowed permission associated with SPPermission
, implement the protocol SPPermissionDialogDelegate
and pass the delegate
SPPermission.Dialog.request(
with: [.calendar, .microphone],
on: self,
delegate: self
)
If you want to change the text, you need to implement the SPPermissionDialogDataSource
protocol. Redefine the needed parameters to see the changes. In the project you can find an example
SPPermission.Dialog.request(
with: [.photoLibrary, .contacts],
on: self,
delegate: self,
dataSource: self
)
if you want add or remove close button (for close dialog, need swipe it), you need ovveride parametr showCloseButton
I like the idea to specify applications that use the RequestPermission. Please, contact me via email. You can find it in the section Contacts
so that I added app here
RequestPermission is released under the MIT license. Check LICENSE.md for details
my apps in AppStore & in AppStore 2
If you need develop application or nice UI, write me