Arpit Parekh Arpit Parekh - 1 month ago 4
Objective-C Question

want to convert NSDictionary to Model objects

In my iPhone App.

What I am trying to achieve is this?

I want to convert the NSdictionary Objects to Model objects.

I have less experience in creating Model objects.


I solved by using IAModelBase class on GitHub.IAModelBase


Please suggest me some design patterns to solve it.


If it is subclass of NSMutableArray then you can add object like,

  [self addObject:newsArticle];

in your for loop and return self will return your final mutable array and you can use it as per desired need!

And refer Apple documentation for more detail. You have to implement some mandatory methods if you want to subclass the NSMutableArray.