updated to return view
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
e0c36b0d67
commit
bcba477e6c
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user