fix
This commit is contained in:
parent
b022f09ac2
commit
338e30c33f
@ -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":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user