code review
This commit is contained in:
parent
24ab8f5ece
commit
312bc0b868
@ -11,10 +11,10 @@ import UIKit
|
||||
|
||||
@objcMembers open class RadioButton: ViewConstrainingView {
|
||||
|
||||
var selectedRadioButton: MFRadioButton?
|
||||
let radioButton = MFRadioButton()
|
||||
let label = Label()
|
||||
var target: RadioButtonListProtocol?
|
||||
var dummyButton: MFCustomButton?
|
||||
|
||||
// MARK: - Inits
|
||||
public init() {
|
||||
@ -59,7 +59,12 @@ import UIKit
|
||||
|
||||
func addActionHandler() {
|
||||
|
||||
if dummyButton != nil {
|
||||
return
|
||||
}
|
||||
|
||||
let dummyButton = MFCustomButton(frame: .zero)
|
||||
self.dummyButton = dummyButton
|
||||
dummyButton.translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(dummyButton)
|
||||
NSLayoutConstraint.constraintPinSubview(toSuperview: dummyButton)
|
||||
|
||||
@ -79,6 +79,9 @@ extension RadioButtonList {
|
||||
}
|
||||
|
||||
setupFormValidation(delegateObject: delegateObject)
|
||||
|
||||
StackableViewController.remove(self.subviews)
|
||||
|
||||
var items:[UIView] = []
|
||||
for option in optionsList {
|
||||
let radioButton = RadioButton(target: self)
|
||||
@ -86,7 +89,7 @@ extension RadioButtonList {
|
||||
items.append(radioButton)
|
||||
}
|
||||
|
||||
let verticalSpace = MFStyler.defaultVerticalPadding(forSize: MVMCoreUIUtility.getWidth())
|
||||
let verticalSpace = MFStyler.defaultVerticalPaddingForApplicationWidth()
|
||||
StackableViewController.populateView(self,
|
||||
withUIArray: items) { (item) -> UIEdgeInsets in
|
||||
return UIEdgeInsets(top: verticalSpace,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user