I have two feeds and i want with the content of them to populate a table view, but when i want to display the images the key are diffrents so in cellForRowAtIndexPath i have:
if ([[stories objectAtIndex:storyIndex] objectForKey:@"url"] ==nil) {
[cell.imag setImageWithURL:[NSURL URLWithString:[[stories objectAtIndex:storyIndex] objectForKey:@"_text"]] placeholderImage:[UIImage imageNamed:@"Alb.png"]];
}
else
[cell.imag setImageWithURL:[NSURL URLWithString:[[stories objectAtIndex:storyIndex] objectForKey:@"url"]] placeholderImage:[UIImage imageNamed:@"Alb.png"]];
but it's not working.
use this code
if ([dictionary objectForKey:key]) {
// contains object
}
else
{
//no object
}