added init

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-01-11 15:52:27 -06:00
parent d3f4f21b02
commit 1fe73feb1f

View File

@ -24,10 +24,14 @@
case textColor case textColor
} }
public init(_ textColor: Color?, _ location: Int, _ length: Int){
self.textColor = textColor
super.init(location, length)
}
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Codec // MARK: - Codec
//-------------------------------------------------- //--------------------------------------------------
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
textColor = try typeContainer.decodeIfPresent(Color.self, forKey: .textColor) textColor = try typeContainer.decodeIfPresent(Color.self, forKey: .textColor)