Commit 85c13ac2 by Orkhan Alikhanov

Removed ..Button prefix from DialogBuilder

parent f58b6471
......@@ -35,25 +35,24 @@ open class DialogBuilder<T: DialogView> {
return self
}
open func positiveButton(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
open func positive(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
dialogView.positiveButton.title = title
controller.positiveHandler = handler
return self
}
open func negativeButton(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
open func negative(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
dialogView.negativeButton.title = title
controller.negativeHandler = handler
return self
}
open func neutralButton(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
open func neutral(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
dialogView.neutralButton.title = title
controller.neutralHandler = handler
return self
}
@discardableResult
open func show(_ vc: UIViewController) -> DialogBuilder {
vc.present(controller, animated: true, completion: nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment