1
在swift中是否有類似java反射的東西,或者我必須總是像下面的代碼一樣映射一個屬性?Swift Reflection映射屬性
class User: Model {
var name: String
override init(data: Dictionary<String, AnyObject>){
super.init(data: data)
self.name = data["name"] as? String
if let vouchers_count = data["vouchers_count"] as? Int {
self.vouchers_count = vouchers_count
}
}