Material design dialog for iOS written in Swift.
Just move Source/LLDialog.swift to your project.
You can see a sample example by downloading this project.
let dialog = LLDialog()
// Set title. (Not required)
dialog.title = "Use Google's location service?"
// Set message. (Not required)
dialog.message = "Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running."
// Set the buttons.
// Title for positive button is required. If set it to be a "blank" string, it will automatically change to “OK”
dialog.setPositiveButton(title: "AGREE", target: self, action: #selector(<#tappedPositiveButton#>))
dialog.setNegativeButton(title: "DISAGREE", target: self, action: #selector(<#tappedNegativeButton#>))
// At last, show the dialog.
dialog.show()
DO NOT set other attributes.
- The animation after tapping the button.