【发布时间】:2017-03-22 09:00:33
【问题描述】:
【问题讨论】:
标签: ios swift3 swifty-json
【问题讨论】:
标签: ios swift3 swifty-json
JSONObject 的PropertyKey.RawValue 是String 所以使用字符串值:
enum PropertyKey: String {
case error = "Error"
}
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
/* Here you can see the proper access to the enum case
do the same in your code
*/
let str: String = PropertyKey.error.rawValue
}
}
【讨论】: