Where's the best place to put object mappings in RestKit

前端 未结 3 1294
栀梦
栀梦 2021-02-04 16:12

I\'m using RestKit for a project and i noticed that there is no longer a method in the class that you can control all mappings in (elementToPropertyMappings), i therefore wonder

3条回答
  •  借酒劲吻你
    2021-02-04 16:35

    I typically create a private method in my App Delegate that I call during app setup which sets up the RKObjectManager and then constructs all the mappings I use throughout the app. I believe the RestKit sample projects use this same pattern, so definitely check those out as a reference.

提交回复
热议问题