From 70beb503c725fc89a2c2ec6a73c7f1a5164ee9ff Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 13 Jan 2023 15:35:54 -0600 Subject: [PATCH] rfactored to new textstyle naming Signed-off-by: Matt Bruce --- VDSSample/Classes/TextField.swift | 2 +- VDSSample/Protocols/PickerBase.swift | 4 ++-- VDSSample/ViewControllers/BaseViewController.swift | 2 +- VDSSample/ViewControllers/ButtonGroupViewController.swift | 4 ++-- VDSSample/ViewControllers/LabelViewController.swift | 2 +- VDSSample/ViewControllers/MenuViewController.swift | 2 +- VDSSample/ViewControllers/TileContainerViewController.swift | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/VDSSample/Classes/TextField.swift b/VDSSample/Classes/TextField.swift index 05d1488..7f1c499 100644 --- a/VDSSample/Classes/TextField.swift +++ b/VDSSample/Classes/TextField.swift @@ -22,7 +22,7 @@ public class TextField: UITextField { public override init(frame: CGRect) { super.init(frame: frame) - font = TextStyle.BodyLarge.font + font = TextStyle.bodyLarge.font } public required init?(coder: NSCoder) { diff --git a/VDSSample/Protocols/PickerBase.swift b/VDSSample/Protocols/PickerBase.swift index 5b8be88..a674209 100644 --- a/VDSSample/Protocols/PickerBase.swift +++ b/VDSSample/Protocols/PickerBase.swift @@ -37,7 +37,7 @@ public class PickerSelectorView: UIStackView, Picker fileprivate var selectedIndex = 0 private var subscribers = Set() private var label = Label().with { - $0.textStyle = .BodyLarge + $0.textStyle = .bodyLarge } public var selectedItem: EnumType { @@ -113,7 +113,7 @@ public class PickerSelectorView: UIStackView, Picker public func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { var label = UILabel() if let v = view as? UILabel { label = v } - label.font = TextStyle.TitleMedium.font + label.font = TextStyle.titleMedium.font label.text = title(for: row) label.textAlignment = .center return label diff --git a/VDSSample/ViewControllers/BaseViewController.swift b/VDSSample/ViewControllers/BaseViewController.swift index 321d394..8239696 100644 --- a/VDSSample/ViewControllers/BaseViewController.swift +++ b/VDSSample/ViewControllers/BaseViewController.swift @@ -170,7 +170,7 @@ public class BaseViewController: UIViewController, Initable { let label = Label().with { $0.text = label - $0.textStyle = .BodyLarge + $0.textStyle = .bodyLarge } formRow.addArrangedSubview(label) diff --git a/VDSSample/ViewControllers/ButtonGroupViewController.swift b/VDSSample/ViewControllers/ButtonGroupViewController.swift index 0949b7f..e93d2ff 100644 --- a/VDSSample/ViewControllers/ButtonGroupViewController.swift +++ b/VDSSample/ViewControllers/ButtonGroupViewController.swift @@ -66,8 +66,8 @@ class ButtonGroupViewController: BaseViewController { let largeButtonGroup = ButtonGroup() let smallButtonGroup = ButtonGroup() - let largeLabel = Label().with{ $0.text = "Large Button Group"; $0.textStyle = .BoldTitleSmall } - let smallLabel = Label().with{ $0.text = "Small Button Group"; $0.textStyle = .BoldTitleSmall } + let largeLabel = Label().with{ $0.text = "Large Button Group"; $0.textStyle = .boldTitleSmall } + let smallLabel = Label().with{ $0.text = "Small Button Group"; $0.textStyle = .boldTitleSmall } override func allTextFields() -> [TextField]? { [widthTextField, percentageTextField] } diff --git a/VDSSample/ViewControllers/LabelViewController.swift b/VDSSample/ViewControllers/LabelViewController.swift index 121253e..d573c78 100644 --- a/VDSSample/ViewControllers/LabelViewController.swift +++ b/VDSSample/ViewControllers/LabelViewController.swift @@ -70,7 +70,7 @@ class LabelViewController: BaseViewController { func setupModel() { label.text = "Label Component" - label.textStyle = .FeatureSmall + label.textStyle = .featureSmall //setup UI surfacePickerSelectorView.text = label.surface.rawValue diff --git a/VDSSample/ViewControllers/MenuViewController.swift b/VDSSample/ViewControllers/MenuViewController.swift index 8438b94..f1cdd3f 100644 --- a/VDSSample/ViewControllers/MenuViewController.swift +++ b/VDSSample/ViewControllers/MenuViewController.swift @@ -37,7 +37,7 @@ class MenuCell: UITableViewCell { $0.translatesAutoresizingMaskIntoConstraints = false } var label = Label().with { - $0.textStyle = .BodyLarge + $0.textStyle = .bodyLarge } override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { diff --git a/VDSSample/ViewControllers/TileContainerViewController.swift b/VDSSample/ViewControllers/TileContainerViewController.swift index 28bfeb9..7f249c0 100644 --- a/VDSSample/ViewControllers/TileContainerViewController.swift +++ b/VDSSample/ViewControllers/TileContainerViewController.swift @@ -60,7 +60,7 @@ class TileContainerViewController: BaseViewController { override func allTextFields() -> [TextField]? { [widthTextField, heightTextField] } func setupForm(){ formStackView.addArrangedSubview(Label().with{ - $0.textStyle = .BoldBodyLarge + $0.textStyle = .boldBodyLarge $0.text = "This object does NOT reflect normal \"surface\" changes, all properties are maually set" }) addFormRow(label: "Surface", view: surfacePickerSelectorView)