Material design dialog for iOS written in Swift.
pod 'LLDialog', :git => 'https://github.com/LiulietLee/LLDialog.git'
or just move Source/LLDialog.swift to your project.
You can see a simple example by downloading this project.
LLDialog()
// Set title. (Optional, but recommended)
.set(title: "Use Google's location service?")
// Set message. (Optional, but recommended)
.set(message: "Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.")
// Set the buttons.
.setPositiveButton(withTitle: "AGREE", target: self, action: #selector(<#tappedPositiveButton#>))
.setNegativeButton(withTitle: "DISAGREE", target: self, action: #selector(<#tappedNegativeButton#>))
// At last, show the dialog.
.show()
// Or, especially if targeting extensions, show in a parent view.
.show(in: <#T##parent UIView##UIView#>)
LLDialog(
title: "Unapplied method reference",
message: "It produces better indentation. Maybe not after SE-0042.",
positiveButton: .init(
title: "", // Title for positive button is required. Blank is the same as "OK".
onTouchUpInside: (target: self,
action: #selector(<#tappedPositiveButton#>))),
negativeButton: .init(
title: "What?",
onTouchUpInside: (target: self,
action: #selector(<#tappedNegativeButton#>)))
).show()
- The animation after tapping the button.