changed comment.

This commit is contained in:
Kevin G Christiano 2020-01-08 09:37:47 -05:00
parent 2d0377acfc
commit 84462a197e

View File

@ -9,16 +9,9 @@
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)
UIColor is not supported by Codable. This Color class
effectively turns UIColor into a primitive class like
Int and String and can be used the same.
*/
public final class Color: Codable {
//--------------------------------------------------