added ability to return views in addRow
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f8085bb258
commit
79a51f7239
@ -209,12 +209,14 @@ public class BaseViewController<Component: UIView>: UIViewController, Initable {
|
|||||||
open func append(section: FormSection) {
|
open func append(section: FormSection) {
|
||||||
formStackView.addArrangedSubview(section)
|
formStackView.addArrangedSubview(section)
|
||||||
}
|
}
|
||||||
|
|
||||||
open func addFormRow(label: String, view: UIView) {
|
@discardableResult
|
||||||
formStackView.addFormRow(label: label, view: view)
|
open func addFormRow(label: String, view: UIView) -> UIView {
|
||||||
|
let view = formStackView.addFormRow(label: label, view: view)
|
||||||
if let pickerViewable = view as? any PickerViewable {
|
if let pickerViewable = view as? any PickerViewable {
|
||||||
pickerViewable.scrollToBottom = { [weak self] in self?.scrollToBottom() }
|
pickerViewable.scrollToBottom = { [weak self] in self?.scrollToBottom() }
|
||||||
}
|
}
|
||||||
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
open func setup() {
|
open func setup() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user