From 90d83a2ab7692cf31ac5e98ea6850143abaf3b40 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 13 Jan 2023 14:04:28 -0600 Subject: [PATCH] converted to textStyle Signed-off-by: Matt Bruce --- VDSSample/Classes/TextField.swift | 2 +- VDSSample/Protocols/PickerBase.swift | 8 ++++---- VDSSample/ViewControllers/LabelViewController.swift | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VDSSample/Classes/TextField.swift b/VDSSample/Classes/TextField.swift index 34f7ed7..05d1488 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 = TypographicalStyle.BodyLarge.font + font = TextStyle.BodyLarge.font } public required init?(coder: NSCoder) { diff --git a/VDSSample/Protocols/PickerBase.swift b/VDSSample/Protocols/PickerBase.swift index 23d83aa..5b8be88 100644 --- a/VDSSample/Protocols/PickerBase.swift +++ b/VDSSample/Protocols/PickerBase.swift @@ -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 = TypographicalStyle.TitleMedium.font + label.font = TextStyle.TitleMedium.font label.text = title(for: row) label.textAlignment = .center return label @@ -146,7 +146,7 @@ public class TextPositionPickerSelectorView: PickerSelectorView{ } } -public class TextSizePickerSelectorView: PickerSelectorView{ +public class TextSizePickerSelectorView: PickerSelectorView{ init(title: String, picker: UIPickerView? = nil){ super.init(title: title, picker: picker, items: [.small, .large]) } @@ -156,9 +156,9 @@ public class TextSizePickerSelectorView: PickerSelectorView{ +public class FontCategoryPickerSelectorView: PickerSelectorView{ init(title: String, picker: UIPickerView? = nil){ - super.init(title: title, picker: picker, items: TypographicalStyle.FontCategory.allCases) + super.init(title: title, picker: picker, items: TextStyle.FontCategory.allCases) } required init(coder: NSCoder) { diff --git a/VDSSample/ViewControllers/LabelViewController.swift b/VDSSample/ViewControllers/LabelViewController.swift index e372199..121253e 100644 --- a/VDSSample/ViewControllers/LabelViewController.swift +++ b/VDSSample/ViewControllers/LabelViewController.swift @@ -86,7 +86,7 @@ class LabelViewController: BaseViewController { } //Picker - private var fontCategory: TypographicalStyle.FontCategory = .feature { + private var fontCategory: TextStyle.FontCategory = .feature { didSet { fontCategoryPickerSelectorView.text = fontCategory.rawValue textSizePickerSelectorView.items = fontCategory.sizes @@ -99,7 +99,7 @@ class LabelViewController: BaseViewController { } } - private var textSize: TypographicalStyle.FontSize? = .large { + private var textSize: TextStyle.FontSize? = .large { didSet { textSizePickerSelectorView.text = textSize?.rawValue ?? "" updateLabelStyle()