Commit 85c13ac2 by Orkhan Alikhanov

Removed ..Button prefix from DialogBuilder

parent f58b6471
...@@ -35,25 +35,24 @@ open class DialogBuilder<T: DialogView> { ...@@ -35,25 +35,24 @@ open class DialogBuilder<T: DialogView> {
return self return self
} }
open func positiveButton(_ title: String?, handler: (() -> Void)?) -> DialogBuilder { open func positive(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
dialogView.positiveButton.title = title dialogView.positiveButton.title = title
controller.positiveHandler = handler controller.positiveHandler = handler
return self return self
} }
open func negativeButton(_ title: String?, handler: (() -> Void)?) -> DialogBuilder { open func negative(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
dialogView.negativeButton.title = title dialogView.negativeButton.title = title
controller.negativeHandler = handler controller.negativeHandler = handler
return self return self
} }
open func neutralButton(_ title: String?, handler: (() -> Void)?) -> DialogBuilder { open func neutral(_ title: String?, handler: (() -> Void)?) -> DialogBuilder {
dialogView.neutralButton.title = title dialogView.neutralButton.title = title
controller.neutralHandler = handler controller.neutralHandler = handler
return self return self
} }
@discardableResult @discardableResult
open func show(_ vc: UIViewController) -> DialogBuilder { open func show(_ vc: UIViewController) -> DialogBuilder {
vc.present(controller, animated: true, completion: nil) 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