code compression
This commit is contained in:
parent
c8b4eaac06
commit
5f17e90921
@ -40,10 +40,7 @@ public extension UIToolbar {
|
||||
|
||||
class func addDismissToolbar(to object: TextFieldOrView, delegate: Any?, action: Selector) {
|
||||
|
||||
let toolbar = createEmptyToolbar()
|
||||
let space = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
|
||||
let dismissButton = UIBarButtonItem(barButtonSystemItem: .done, target: delegate, action: action)
|
||||
toolbar.items = [space, dismissButton]
|
||||
let toolbar = Self.getToolbarWithDoneButton(delegate: delegate, action: action)
|
||||
|
||||
switch object {
|
||||
case is UITextField:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user