rfactored to new textstyle naming

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-01-13 15:35:54 -06:00
parent 358c23c08a
commit 70beb503c7
7 changed files with 9 additions and 9 deletions

View File

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

View File

@ -37,7 +37,7 @@ public class PickerSelectorView<EnumType: RawRepresentable>: UIStackView, Picker
fileprivate var selectedIndex = 0
private var subscribers = Set<AnyCancellable>()
private var label = Label().with {
$0.textStyle = .BodyLarge
$0.textStyle = .bodyLarge
}
public var selectedItem: EnumType {
@ -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 = TextStyle.TitleMedium.font
label.font = TextStyle.titleMedium.font
label.text = title(for: row)
label.textAlignment = .center
return label

View File

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

View File

@ -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] }

View File

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

View File

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

View File

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