updated controllers
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
68d2a5173e
commit
b9cdc0dc4b
@ -17,6 +17,12 @@ class LabelViewController: BaseViewController {
|
|||||||
picker: self.picker)
|
picker: self.picker)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
lazy var textPositionPickerSelectorView = {
|
||||||
|
PickerSelectorView(title: TextPosition.left.rawValue,
|
||||||
|
picker: self.picker,
|
||||||
|
items: TextPosition.allCases)
|
||||||
|
}()
|
||||||
|
|
||||||
lazy var fontCategoryPickerSelectorView = {
|
lazy var fontCategoryPickerSelectorView = {
|
||||||
FontCategoryPickerSelectorView(title: "",
|
FontCategoryPickerSelectorView(title: "",
|
||||||
picker: self.picker)
|
picker: self.picker)
|
||||||
@ -44,6 +50,7 @@ class LabelViewController: BaseViewController {
|
|||||||
addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch))
|
addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch))
|
||||||
addFormRow(label: "Bold", view: .makeWrapper(for: boldSwitch))
|
addFormRow(label: "Bold", view: .makeWrapper(for: boldSwitch))
|
||||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||||
|
addFormRow(label: "Text Position", view: textPositionPickerSelectorView)
|
||||||
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
|
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
|
||||||
addFormRow(label: "Text Size", view: textSizePickerSelectorView)
|
addFormRow(label: "Text Size", view: textSizePickerSelectorView)
|
||||||
addFormRow(label: "Text", view: textField)
|
addFormRow(label: "Text", view: textField)
|
||||||
@ -117,6 +124,10 @@ class LabelViewController: BaseViewController {
|
|||||||
self?.contentTopView.backgroundColor = item.color
|
self?.contentTopView.backgroundColor = item.color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
|
self?.label.textPosition = item
|
||||||
|
}
|
||||||
|
|
||||||
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
self?.textSize = item
|
self?.textSize = item
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,12 @@ class TrailingTooltipLabelViewController: BaseViewController {
|
|||||||
items: Tooltip.Size.allCases)
|
items: Tooltip.Size.allCases)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
lazy var textPositionPickerSelectorView = {
|
||||||
|
PickerSelectorView(title: TextPosition.left.rawValue,
|
||||||
|
picker: self.picker,
|
||||||
|
items: TextPosition.allCases)
|
||||||
|
}()
|
||||||
|
|
||||||
var boldSwitch = Toggle()
|
var boldSwitch = Toggle()
|
||||||
var disabledSwitch = Toggle()
|
var disabledSwitch = Toggle()
|
||||||
var textField = TextField()
|
var textField = TextField()
|
||||||
@ -55,6 +61,7 @@ class TrailingTooltipLabelViewController: BaseViewController {
|
|||||||
addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch))
|
addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch))
|
||||||
addFormRow(label: "Bold", view: .makeWrapper(for: boldSwitch))
|
addFormRow(label: "Bold", view: .makeWrapper(for: boldSwitch))
|
||||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||||
|
addFormRow(label: "Text Position", view: textPositionPickerSelectorView)
|
||||||
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
|
addFormRow(label: "Font Category", view: fontCategoryPickerSelectorView)
|
||||||
addFormRow(label: "Text Size", view: textSizePickerSelectorView)
|
addFormRow(label: "Text Size", view: textSizePickerSelectorView)
|
||||||
addFormRow(label: "Text", view: textField)
|
addFormRow(label: "Text", view: textField)
|
||||||
@ -162,6 +169,10 @@ class TrailingTooltipLabelViewController: BaseViewController {
|
|||||||
self?.contentTopView.backgroundColor = item.color
|
self?.contentTopView.backgroundColor = item.color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textPositionPickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
|
self?.tooltipLabel.labelTextPosition = item
|
||||||
|
}
|
||||||
|
|
||||||
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
textSizePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||||
self?.textSize = item
|
self?.textSize = item
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user