updated button
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
69482c2c7a
commit
c44beb5e32
@ -48,6 +48,7 @@ public class PickerSelectorView<EnumType: RawRepresentable>: UIStackView, Picker
|
|||||||
instance.size = .small
|
instance.size = .small
|
||||||
instance.use = .secondary
|
instance.use = .secondary
|
||||||
instance.text = "Select"
|
instance.text = "Select"
|
||||||
|
instance.width = 150
|
||||||
}
|
}
|
||||||
|
|
||||||
public var text: String = "" {
|
public var text: String = "" {
|
||||||
@ -73,9 +74,15 @@ public class PickerSelectorView<EnumType: RawRepresentable>: UIStackView, Picker
|
|||||||
self.alignment = .fill
|
self.alignment = .fill
|
||||||
text = title
|
text = title
|
||||||
label.text = title
|
label.text = title
|
||||||
|
let buttonWrapper = View()
|
||||||
|
buttonWrapper.addSubview(button)
|
||||||
|
button.pinTop()
|
||||||
|
button.pinBottom()
|
||||||
|
button.pinTrailing()
|
||||||
|
button.pinLeadingGreaterThanOrEqualTo(anchor: buttonWrapper.leadingAnchor)
|
||||||
updateSelectedIndex()
|
updateSelectedIndex()
|
||||||
addArrangedSubview(label)
|
addArrangedSubview(label)
|
||||||
addArrangedSubview(.makeWrapper(for: button, isTrailing: false))
|
addArrangedSubview(buttonWrapper)
|
||||||
button.onClick = { [weak self] _ in
|
button.onClick = { [weak self] _ in
|
||||||
self?.picker?.delegate = self
|
self?.picker?.delegate = self
|
||||||
self?.picker?.dataSource = self
|
self?.picker?.dataSource = self
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user