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")
}
open func addFormRow(label: String, view: UIView) {
@discardableResult
open func addFormRow(label: String, view: UIView) -> UIView {
let formRow = UIStackView().with {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.alignment = .fill
@ -46,6 +47,7 @@ public class FormSection: UIStackView {
formRow.addArrangedSubview(view)
addArrangedSubview(formRow)
return formRow
}
}