updated to return view

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-06-08 15:39:06 -05:00
parent e0c36b0d67
commit bcba477e6c

View File

@ -28,7 +28,8 @@ public class FormSection: UIStackView {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
open func addFormRow(label: String, view: UIView) { @discardableResult
open func addFormRow(label: String, view: UIView) -> UIView {
let formRow = UIStackView().with { let formRow = UIStackView().with {
$0.translatesAutoresizingMaskIntoConstraints = false $0.translatesAutoresizingMaskIntoConstraints = false
$0.alignment = .fill $0.alignment = .fill
@ -46,6 +47,7 @@ public class FormSection: UIStackView {
formRow.addArrangedSubview(view) formRow.addArrangedSubview(view)
addArrangedSubview(formRow) addArrangedSubview(formRow)
return formRow
} }
} }