more color
This commit is contained in:
parent
f816081d8e
commit
5dafbe6a85
@ -478,7 +478,7 @@ import MVMCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let borderColorHex = checkboxModel.borderColor {
|
if let borderColorHex = checkboxModel.borderColor {
|
||||||
layer.borderColor = UIColor.mfGet(forHex: borderColorHex).cgColor
|
layer.borderColor = borderColorHex.uiColor.cgColor
|
||||||
}
|
}
|
||||||
|
|
||||||
if let borderWidth = checkboxModel.borderWidth {
|
if let borderWidth = checkboxModel.borderWidth {
|
||||||
@ -496,11 +496,11 @@ import MVMCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let unCheckedBackgroundColorHex = checkboxModel.unCheckedBackgroundColor {
|
if let unCheckedBackgroundColorHex = checkboxModel.unCheckedBackgroundColor {
|
||||||
unCheckedBackgroundColor = UIColor.mfGet(forHex: unCheckedBackgroundColorHex)
|
unCheckedBackgroundColor = unCheckedBackgroundColorHex.uiColor
|
||||||
}
|
}
|
||||||
|
|
||||||
if let checkedBackgroundColorHex = checkboxModel.checkedBackgroundColor {
|
if let checkedBackgroundColorHex = checkboxModel.checkedBackgroundColor {
|
||||||
checkedBackgroundColor = UIColor.mfGet(forHex: checkedBackgroundColorHex)
|
checkedBackgroundColor = checkedBackgroundColorHex.uiColor
|
||||||
}
|
}
|
||||||
|
|
||||||
if let isAnimated = checkboxModel.isAnimated {
|
if let isAnimated = checkboxModel.isAnimated {
|
||||||
|
|||||||
@ -16,12 +16,12 @@ import Foundation
|
|||||||
public var value: String?
|
public var value: String?
|
||||||
public var fieldKey: String?
|
public var fieldKey: String?
|
||||||
public var required: Bool?
|
public var required: Bool?
|
||||||
public var borderColor: String?
|
public var borderColor: Color?
|
||||||
public var borderWidth: CGFloat?
|
public var borderWidth: CGFloat?
|
||||||
public var isChecked: Bool = false
|
public var isChecked: Bool = false
|
||||||
public var checkColor: Color?
|
public var checkColor: Color?
|
||||||
public var unCheckedBackgroundColor: String?
|
public var unCheckedBackgroundColor: Color?
|
||||||
public var checkedBackgroundColor: String?
|
public var checkedBackgroundColor: Color?
|
||||||
public var isAnimated: Bool?
|
public var isAnimated: Bool?
|
||||||
public var isRound: Bool?
|
public var isRound: Bool?
|
||||||
public var isEnabled: Bool?
|
public var isEnabled: Bool?
|
||||||
@ -51,12 +51,12 @@ import Foundation
|
|||||||
self.value = try typeContainer.decodeIfPresent(String.self, forKey: .value)
|
self.value = try typeContainer.decodeIfPresent(String.self, forKey: .value)
|
||||||
self.fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
|
self.fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
|
||||||
self.required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required)
|
self.required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required)
|
||||||
self.borderColor = try typeContainer.decodeIfPresent(String.self, forKey: .borderColor)
|
self.borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor)
|
||||||
self.borderWidth = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .borderWidth)
|
self.borderWidth = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .borderWidth)
|
||||||
self.isChecked = try typeContainer.decodeIfPresent(Bool.self, forKey: .isChecked) ?? false
|
self.isChecked = try typeContainer.decodeIfPresent(Bool.self, forKey: .isChecked) ?? false
|
||||||
self.checkColor = try typeContainer.decodeIfPresent(Color.self, forKey: .checkColor)
|
self.checkColor = try typeContainer.decodeIfPresent(Color.self, forKey: .checkColor)
|
||||||
self.unCheckedBackgroundColor = try typeContainer.decodeIfPresent(String.self, forKey: .unCheckedBackgroundColor)
|
self.unCheckedBackgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .unCheckedBackgroundColor)
|
||||||
self.checkedBackgroundColor = try typeContainer.decodeIfPresent(String.self, forKey: .checkedBackgroundColor)
|
self.checkedBackgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .checkedBackgroundColor)
|
||||||
self.isAnimated = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAnimated)
|
self.isAnimated = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAnimated)
|
||||||
self.isRound = try typeContainer.decodeIfPresent(Bool.self, forKey: .isRound)
|
self.isRound = try typeContainer.decodeIfPresent(Bool.self, forKey: .isRound)
|
||||||
self.isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled)
|
self.isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled)
|
||||||
|
|||||||
@ -42,8 +42,6 @@
|
|||||||
@"textEntryField": TextEntryField.class,
|
@"textEntryField": TextEntryField.class,
|
||||||
@"itemDropdownEntryField": ItemDropdownEntryField.class,
|
@"itemDropdownEntryField": ItemDropdownEntryField.class,
|
||||||
@"dateDropdownEntryField": DateDropdownEntryField.class,
|
@"dateDropdownEntryField": DateDropdownEntryField.class,
|
||||||
@"checkbox": Checkbox.class,
|
|
||||||
@"checkboxLabel": CheckboxWithLabelView.class,
|
|
||||||
@"cornerLabels" : CornerLabels.class,
|
@"cornerLabels" : CornerLabels.class,
|
||||||
@"progressBar": ProgressBar.class,
|
@"progressBar": ProgressBar.class,
|
||||||
@"circleProgress": GraphView.class,
|
@"circleProgress": GraphView.class,
|
||||||
|
|||||||
@ -24,6 +24,13 @@ import Foundation
|
|||||||
ModelRegistry.register(NumberedListModel.self)
|
ModelRegistry.register(NumberedListModel.self)
|
||||||
mapping?.setObject(NumberedList.self, forKey: NumberedListModel.identifier as NSString)
|
mapping?.setObject(NumberedList.self, forKey: NumberedListModel.identifier as NSString)
|
||||||
|
|
||||||
|
//Checkbox
|
||||||
|
ModelRegistry.register(CheckboxModel.self)
|
||||||
|
mapping?.setObject(Checkbox.self, forKey: CheckboxModel.identifier as NSString)
|
||||||
|
|
||||||
|
ModelRegistry.register(CheckboxLabelModel.self)
|
||||||
|
mapping?.setObject(CheckboxWithLabelView.self, forKey: CheckboxLabelModel.identifier as NSString)
|
||||||
|
|
||||||
ModelRegistry.register(LabelModel.self)
|
ModelRegistry.register(LabelModel.self)
|
||||||
ModelRegistry.register(HeaderModel.self)
|
ModelRegistry.register(HeaderModel.self)
|
||||||
ModelRegistry.register(FooterModel.self)
|
ModelRegistry.register(FooterModel.self)
|
||||||
@ -71,9 +78,5 @@ import Foundation
|
|||||||
ModelRegistry.register(NumberedListModel.self)
|
ModelRegistry.register(NumberedListModel.self)
|
||||||
ModelRegistry.register(UnOrderedListModel.self)
|
ModelRegistry.register(UnOrderedListModel.self)
|
||||||
ModelRegistry.register(HeadlineBodyToggleModel.self)
|
ModelRegistry.register(HeadlineBodyToggleModel.self)
|
||||||
|
|
||||||
//Checkbox
|
|
||||||
ModelRegistry.register(CheckboxModel.self)
|
|
||||||
ModelRegistry.register(CheckboxLabelModel.self)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user