updated swatch example

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-09-09 12:52:50 -05:00
parent c99fbd0656
commit 45d2768a52
4 changed files with 27 additions and 5 deletions

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "S_1590095FQ_975.jpeg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -22,7 +22,7 @@ class MenuViewController: UITableViewController {
MenuComponent(title: "Checkbox", viewController: CheckboxViewController.self), MenuComponent(title: "Checkbox", viewController: CheckboxViewController.self),
MenuComponent(title: "CheckboxGroup", viewController: CheckboxGroupViewController.self), MenuComponent(title: "CheckboxGroup", viewController: CheckboxGroupViewController.self),
MenuComponent(title: "Label", viewController: LabelViewController.self), MenuComponent(title: "Label", viewController: LabelViewController.self),
MenuComponent(title: "RadioButton", viewController: RadioButtonViewController.self), MenuComponent(title: "RadioButtonGroup", viewController: RadioButtonViewController.self),
MenuComponent(title: "RadioBoxGroup", viewController: RadioBoxGroupViewController.self), MenuComponent(title: "RadioBoxGroup", viewController: RadioBoxGroupViewController.self),
MenuComponent(title: "RadioSwatchGroup", viewController: RadioSwatchGroupViewController.self), MenuComponent(title: "RadioSwatchGroup", viewController: RadioSwatchGroupViewController.self),
MenuComponent(title: "Toggle", viewController: ToggleViewController.self) MenuComponent(title: "Toggle", viewController: ToggleViewController.self)

View File

@ -93,13 +93,14 @@ class RadioSwatchGroupViewController: ModelScrollViewController<DefaultRadioSwa
var defaultModel = DefaultRadioSwatchGroupModel() var defaultModel = DefaultRadioSwatchGroupModel()
var model1 = DefaultRadioSwatchModel() var model1 = DefaultRadioSwatchModel()
model1.primaryColor = .red model1.fillImage = UIImage(named: "imageSwatch")
model1.text = "Red" model1.text = "Image"
model1.inputId = "radioSwatch1" model1.inputId = "radioSwatch1"
var model2 = DefaultRadioSwatchModel() var model2 = DefaultRadioSwatchModel()
model2.primaryColor = .blue model2.primaryColor = .red
model2.text = "Blue" model2.secondaryColor = .blue
model2.text = "Red/Blue"
model2.inputId = "radioSwatch2" model2.inputId = "radioSwatch2"
var model3 = DefaultRadioSwatchModel() var model3 = DefaultRadioSwatchModel()