hello can you add an callback when user click on a button done of the keyboard please ?
I added that in your code source, but i think other peoples want this also?
ps: Source Code
Core/BaseRow.swift
open class BaseRow : BaseRowType {
var callbackDiddone: (()-> Void)?
(...)
}
Core/RowType.swift
in "extension RowType where Self: BaseRow " add:
@discardableResult
public func didDone(_ callback: @escaping (Self) -> ()) -> Self{
callbackDiddone = { [unowned self] in callback(self) }
return self
}
Core/Core.swift
in "extension FormViewController" add :
func navigationDone(_ sender: UIBarButtonItem) {
tableView?.endEditing(true)
self.actualRowDone?.callbackDiddone!()
}
Core.swift
in "open class FormViewController : UIViewController, FormViewControllerProtocol" add:
open var actualRowDone: BaseRow?
Core.swift
in "open class FormViewController : UIViewController, FormViewControllerProtocol "
in "open func inputAccessoryView(for row: BaseRow) -> UIView? " add:
actualRowDone = row
Hi @Lausbert
why don't make these 2 methods open...?
func navigationDone(_ sender: UIBarButtonItem) {
tableView?.endEditing(true)
}
func navigationAction(_ sender: UIBarButtonItem) {
navigateTo(direction: sender == navigationAccessoryView.previousButton ? .up : .down)
}
Would like to see this as well, is there another way to accomplish?
Most helpful comment
Hi @Lausbert
why don't make these 2 methods open...?