retain cycle fix
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
80e23e190a
commit
263e692bad
@ -142,10 +142,10 @@ class CheckboxViewController: UIViewController, StoryboardInitable {
|
|||||||
|
|
||||||
func setupPicker(){
|
func setupPicker(){
|
||||||
picker.isHidden = true
|
picker.isHidden = true
|
||||||
surfacePicker.onPickerDidSelect = { item in
|
surfacePicker.onPickerDidSelect = { [weak self] item in
|
||||||
self.checkbox.surface = item
|
self?.checkbox.surface = item
|
||||||
self.checkboxContainerView.backgroundColor = item.color
|
self?.checkboxContainerView.backgroundColor = item.color
|
||||||
self.surfaceLabel.text = item.rawValue
|
self?.surfaceLabel.text = item.rawValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,8 +31,6 @@ class RadioButtonViewController: UIViewController, StoryboardInitable {
|
|||||||
@IBOutlet weak var childTextField: UITextField!
|
@IBOutlet weak var childTextField: UITextField!
|
||||||
@IBOutlet weak var showErrorSwitch: UISwitch!
|
@IBOutlet weak var showErrorSwitch: UISwitch!
|
||||||
|
|
||||||
// var radioButton: RadioButton!
|
|
||||||
// var radioButton2: RadioButton!
|
|
||||||
var radioButtonGroup = RadioButtonGroup()
|
var radioButtonGroup = RadioButtonGroup()
|
||||||
public var model = DefaultRadioButtonGroupModel()
|
public var model = DefaultRadioButtonGroupModel()
|
||||||
public var subscribers = Set<AnyCancellable>()
|
public var subscribers = Set<AnyCancellable>()
|
||||||
@ -150,10 +148,10 @@ class RadioButtonViewController: UIViewController, StoryboardInitable {
|
|||||||
|
|
||||||
func setupPicker(){
|
func setupPicker(){
|
||||||
picker.isHidden = true
|
picker.isHidden = true
|
||||||
surfacePicker.onPickerDidSelect = { item in
|
surfacePicker.onPickerDidSelect = { [weak self] item in
|
||||||
self.radioButtonGroup.surface = item
|
self?.radioButtonGroup.surface = item
|
||||||
self.componentContainerView.backgroundColor = item.color
|
self?.componentContainerView.backgroundColor = item.color
|
||||||
self.surfaceLabel.text = item.rawValue
|
self?.surfaceLabel.text = item.rawValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,25 +112,25 @@ class ToggleViewController: UIViewController, StoryboardInitable {
|
|||||||
|
|
||||||
func setupPicker(){
|
func setupPicker(){
|
||||||
picker.isHidden = true
|
picker.isHidden = true
|
||||||
surfacePicker.onPickerDidSelect = { item in
|
surfacePicker.onPickerDidSelect = { [weak self] item in
|
||||||
self.toggle.surface = item
|
self?.toggle.surface = item
|
||||||
self.toggleContainerView.backgroundColor = item.color
|
self?.toggleContainerView.backgroundColor = item.color
|
||||||
self.surfaceLabel.text = item.rawValue
|
self?.surfaceLabel.text = item.rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
fontWeightPicker.onPickerDidSelect = { item in
|
fontWeightPicker.onPickerDidSelect = { [weak self] item in
|
||||||
self.toggle.fontWeight = item
|
self?.toggle.fontWeight = item
|
||||||
self.fontWeightLabel.text = item.rawValue
|
self?.fontWeightLabel.text = item.rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
textSizePicker.onPickerDidSelect = { item in
|
textSizePicker.onPickerDidSelect = { [weak self] item in
|
||||||
self.toggle.fontSize = item
|
self?.toggle.fontSize = item
|
||||||
self.textSizeLabel.text = item.rawValue
|
self?.textSizeLabel.text = item.rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
textPositionPicker.onPickerDidSelect = { item in
|
textPositionPicker.onPickerDidSelect = { [weak self] item in
|
||||||
self.toggle.textPosition = item
|
self?.toggle.textPosition = item
|
||||||
self.textPositionLabel.text = item.rawValue
|
self?.textPositionLabel.text = item.rawValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user