This commit is contained in:
Suresh, Kamlesh 2020-07-16 09:49:32 -04:00
parent b022f09ac2
commit 338e30c33f

View File

@ -14,20 +14,6 @@ enum AlertActionError: Error {
extension UIAlertAction.Style: Codable {
public init(from decoder: Decoder) throws {
let typeContainer = try decoder.singleValueContainer()
let int = try typeContainer.decode(Int.self)
guard let style = UIAlertAction.Style(rawValue: int) else {
throw AlertActionError.notAnAlertAction
}
self = style
}
public func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
try container.encode(rawValueString)
}
init(rawValue: String) {
switch rawValue {
case "default":