Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
3314076967
commit
788b226104
@ -9,6 +9,7 @@ import Foundation
|
||||
import UIKit
|
||||
import VDS
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
class RadioButtonViewController: UIViewController, StoryboardInitable {
|
||||
enum PickerType {
|
||||
@ -30,9 +31,13 @@ class RadioButtonViewController: UIViewController, StoryboardInitable {
|
||||
// var radioButton: RadioButton!
|
||||
// var radioButton2: RadioButton!
|
||||
var radioButtonGroup = RadioButtonGroup()
|
||||
|
||||
|
||||
public var model = RadioButtonGroupModel()
|
||||
public var cancellables = Set<AnyCancellable>()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
var model1 = DefaultRadioButtonModel()
|
||||
model1.inputId = "model1"
|
||||
model1.labelText = "Terms and conditions"
|
||||
@ -58,23 +63,9 @@ class RadioButtonViewController: UIViewController, StoryboardInitable {
|
||||
showErrorSwitch.isOn = model1.showError
|
||||
errorTextField.text = model1.errorText
|
||||
|
||||
// radioButton = RadioButton(with: model)
|
||||
// radioButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
//
|
||||
// radioButton2 = RadioButton(with: model2)
|
||||
// radioButton2.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
// let radioButtonController = RadioButtonController()
|
||||
// radioButton.selectorController = radioButtonController
|
||||
// radioButton2.selectorController = radioButtonController
|
||||
model.selectors = [model1, model2]
|
||||
|
||||
// let stackView = UIStackView()
|
||||
// stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||
// stackView.axis = .vertical
|
||||
// stackView.spacing = 10
|
||||
// stackView.addArrangedSubview(radioButton)
|
||||
// stackView.addArrangedSubview(radioButton2)
|
||||
radioButtonGroup.set(with: RadioButtonGroupModel(selectors: [model1, model2]))
|
||||
radioButtonGroup.set(with: model)
|
||||
componentContainerView.addSubview(radioButtonGroup)
|
||||
|
||||
radioButtonGroup.leadingAnchor.constraint(equalTo: componentContainerView.leadingAnchor, constant: 10).isActive = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user