Explaining use case of Color.

This commit is contained in:
Kevin G Christiano 2020-01-08 09:28:54 -05:00
parent 79f15fd706
commit 2abd6a866a

View File

@ -8,7 +8,19 @@
import UIKit
/*
Use case:
For the Codable model define a variable such as
var color: UIColor
In the decode initializer:
color = try typeContainer.decode(Color.self, forKey: .color).uiColor
In the encode initializer:
try container.encodeIfPresent(Color(uiColor: color), forKey: .color)
*/
public final class Color: Codable {
//--------------------------------------------------
// MARK: - Properties