-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
用空的@protocal 实现容器类的伪泛型识别? #79
Comments
稍后会再考虑下。 倒不是说不好,但总感觉这么写显得太 trick 了。。除了要多写一个 protocol 外,还要假定这个 protocol 和类名一样。另外这么写也会和 OC 新加的 Lightweight Generics 有点冲突。。 |
可惜Lightweight Generics是编译时特性,我也想过如果property能获取到Lightweight Generics的ObjectType就好了,可惜不行。 |
其实这样似乎蛮好的,哈哈。 |
@ibireme 希望能增加你添加这个功能的兴趣,个人觉得这建议蛮好的,这样一来基本上就不需要写什么映射的玩意了。:) |
就是类似JSONModel的方案,
这样在YYClassPropertyInfo->_typeEncoding就拿到的是NSArray,这时候分离出Dog,就可以拿到容器类成员对象的类型了。可以作为modelContainerPropertyGenericClass的一个简便写法。
The text was updated successfully, but these errors were encountered: