converted to textStyle

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-01-13 14:04:28 -06:00
parent b7c250809b
commit 90d83a2ab7
3 changed files with 7 additions and 7 deletions

View File

@ -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) {

View File

@ -113,7 +113,7 @@ public class PickerSelectorView<EnumType: RawRepresentable>: 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<TextPosition>{
}
}
public class TextSizePickerSelectorView: PickerSelectorView<TypographicalStyle.FontSize>{
public class TextSizePickerSelectorView: PickerSelectorView<TextStyle.FontSize>{
init(title: String, picker: UIPickerView? = nil){
super.init(title: title, picker: picker, items: [.small, .large])
}
@ -156,9 +156,9 @@ public class TextSizePickerSelectorView: PickerSelectorView<TypographicalStyle.F
}
}
public class FontCategoryPickerSelectorView: PickerSelectorView<TypographicalStyle.FontCategory>{
public class FontCategoryPickerSelectorView: PickerSelectorView<TextStyle.FontCategory>{
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) {

View File

@ -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()