updated for tintColor for ImageAttribute
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
268fdc5c2a
commit
0da39e621b
@ -17,6 +17,7 @@ class LabelAttributeImageModel: LabelAttributeModel {
|
||||
var size: CGFloat?
|
||||
var name: String?
|
||||
var URL: String?
|
||||
var tintColor: Color?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
@ -34,6 +35,7 @@ class LabelAttributeImageModel: LabelAttributeModel {
|
||||
case size
|
||||
case name
|
||||
case URL
|
||||
case tintColor
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -55,6 +57,7 @@ class LabelAttributeImageModel: LabelAttributeModel {
|
||||
size = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .size)
|
||||
name = try typeContainer.decodeIfPresent(String.self, forKey: .name)
|
||||
URL = try typeContainer.decodeIfPresent(String.self, forKey: .URL)
|
||||
tintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .tintColor)
|
||||
try super.init(from: decoder)
|
||||
}
|
||||
|
||||
@ -64,5 +67,6 @@ class LabelAttributeImageModel: LabelAttributeModel {
|
||||
try container.encodeIfPresent(size, forKey: .size)
|
||||
try container.encodeIfPresent(name, forKey: .name)
|
||||
try container.encodeIfPresent(URL, forKey: .URL)
|
||||
try container.encodeIfPresent(tintColor, forKey: .tintColor)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user