我有一个名为Cast from '_?' to unrelated type 'MySwitch' always fails
SPEFormFieldData
我一声明财产就可以吗?它给我一个错误
类型“ SPEFormFieldData”不符合协议“可解码” ,
类型“ SPEFormFieldData”不符合协议“可编码”
我如何解析Any类型并符合Codable,我想将其实现为类,并且必须限制为import Foundation
class SPEFormFieldData: NSObject, Codable {
public var fieldType: String?
public var fieldDescription: String?
public var fieldValue: Any?
public var fieldTitle: String?
public var fieldKey: String?
override init() {
self.fieldValue = ""
super.init()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}