I could not get the values from NSDictionary in Model class?
<p>In my iPhone App.</p>

<p><strong>Problem: When I am trying to get the value from dictionary in model class it is giving me the nil values.</strong></p>

<p><strong>Why this is happening, is this the memory management issue ?</strong></p>

<p>I did this,</p>

<p><strong>I am passing NSDictionary, from my viewController to NSMutableArray Category and from that I am passing it to my Modelclass.</strong> </p>

<p>If you want to see the coding,</p>

<ol>
<li><p>In my ViewController.m file</p>

<p>[arrayNews convertToNewsArticles];</p></li>
<li><p>In my NSMutableArray category I am calling method convertToNewsArticles.</p>

<p>for(NSMutableDictionary *dictionary in self) {</p>

<pre><code>      NewsArticle *newsArticle=[[NewsArticle alloc] initWithDictionary:dictionary];
        [arrayConverted addObject:newsArticle];

    }
</code></pre></li>
</ol>

<p><strong>I am talking about this dictionary that I am passing.</strong></p>

<ol start="3">
<li><p>Here is my Model class</p>

<p>-(NewsArticle*)initWithDictionary:dictionary{</p>

<pre><code>self.title=dictionary[@"title"];

self.author=dictionary[@"author"];


self.urlString=dictionary[@"url"];


return self;
</code></pre>

<p>}</p></li>
</ol>

<p>Update:</p>

<p>I solved by using IAModelBase class on GitHub.<a href="https://github.com/oarrabi/IAModelBase" rel="nofollow">IAModelBase</a> </p>