moar.
This commit is contained in:
parent
35f7024f8d
commit
38c74acc6e
@ -31,16 +31,16 @@ import MVMCore
|
||||
public var checkedColor: UIColor = .black
|
||||
public var unCheckedColor: UIColor = .mfPaleGrey()
|
||||
|
||||
public var hasRoundBorder = false
|
||||
public var hasRoundCorners = false
|
||||
|
||||
private var shapeLayer: CAShapeLayer?
|
||||
private var _lineColor: UIColor = .black
|
||||
private var _borderColor: UIColor = .black
|
||||
private var _lineWidth: CGFloat = 1.0
|
||||
private var _cornerRadius: CGFloat = 5.0
|
||||
private var _lineWidth: CGFloat = 1
|
||||
private var _cornerRadius: CGFloat = 0
|
||||
|
||||
public func setCheckMarkLayer() {
|
||||
checkedSquare.layer.cornerRadius = checkbox.isRoundRectCheckMark ? 5.0 : 0
|
||||
layer.cornerRadius = hasRoundCorners ? 5 : 0
|
||||
}
|
||||
|
||||
public var lineWidth: CGFloat {
|
||||
|
||||
@ -114,29 +114,14 @@
|
||||
init(checkedColor: UIColor?, unCheck unCheckedColor: UIColor?, attributedText: NSAttributedString?) {
|
||||
super.init(frame: .zero)
|
||||
setup(withCheckedColor: checkedColor, unCheck: unCheckedColor, text: nil)
|
||||
descriptionAttributedText = attributedText
|
||||
setDescriptionAttributedText = attributedText
|
||||
addAccessibleProperties()
|
||||
}
|
||||
|
||||
init?(checkMarkView: MVMCoreUICheckMarkView?, checkedColor: UIColor?, unCheck unCheckedColor: UIColor?, text: String?) {
|
||||
super.init(frame: .zero)
|
||||
checkMark = checkMarkView
|
||||
setup(withCheckedColor: checkedColor, unCheck: unCheckedColor, text: text)
|
||||
addAccessibleProperties()
|
||||
}
|
||||
|
||||
init?(checkMarkView: MVMCoreUICheckMarkView?, checkedColor: UIColor?, unCheck unCheckedColor: UIColor?, attributedText: NSAttributedString?) {
|
||||
super.init(frame: .zero)
|
||||
checkMark = checkMarkView
|
||||
setup(withCheckedColor: checkedColor, unCheck: unCheckedColor, text: nil)
|
||||
descriptionAttributedText = attributedText
|
||||
addAccessibleProperties()
|
||||
}
|
||||
|
||||
init(roundRect isRoundRect: Bool) {
|
||||
init(hasRoundedCheckbox: Bool) {
|
||||
super.init(frame: .zero)
|
||||
|
||||
isRoundRectCheckMark = isRoundRect
|
||||
checkbox.hasRoundBorder = hasRoundRectCheckbox
|
||||
setup(withCheckedColor: .white, unCheck: .white, text: nil)
|
||||
addAccessibleProperties()
|
||||
setCheckMarkLayer()
|
||||
@ -262,8 +247,6 @@ extension CheckboxWithLabelView: FormValidationProtocol {
|
||||
public func formFieldValue() -> Any? {
|
||||
return NSNumber(value: checkbox.isSelected)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// MARK:- Accessibility
|
||||
|
||||
Loading…
Reference in New Issue
Block a user