How to specify child objects type in an NSArray with Mantle(如何使用 Mantle 在 NSArray 中指定子对象类型)
本文介绍了如何使用 Mantle 在 NSArray 中指定子对象类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有这样的字典
还有两个模型:
如何使用 Mantle,以便我的个人模型中的汽车数组成为 CarModels?
How do I use Mantle so that my array of cars in my person model are CarModels?
推荐答案
啊,想通了.我需要添加一个私有方法:
Ah figured it out. I needed to add a private method:
并确保我使用过:
这篇关于如何使用 Mantle 在 NSArray 中指定子对象类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!