title: Toggle 2 different images in a tableView's cell
body: <p>I have a tableView that checks if a cell has being opened: if yes, it shows an empty cell (no image), if no, it shows a little image to state that the cell has not being read (opened) yet.</p>
  
  <p>Now, i have the "favorites" function in my app, and i want to show a little image in the tableView that states that the cell is a favorite, so the user can quickly recognize those added to favorites right from the table. </p>
  
  <p>I was trying to do, in <code>cellForRowAtIndexPath</code> method</p>
  
  <pre><code>NSDictionary *item = [rows objectAtIndex:indexPath.row];
  cell.textLabel.text = [item objectForKey:@"name"];
  if ([[item valueForKey:@"isRead"] boolValue] == NO) {
      cell.imageView.image = [UIImage imageNamed:@"unread.png"];
  } else {
        if ([[item valueForKey:@"isFav"] boolValue] == YES){
            cell.imageView.image = [UIImage imageNamed:@"favorite.png"];
        }
        else{
            cell.imageView.image = nil;
        }
      cell.imageView.image = nil;
  }
  </code></pre>
  
  <p>Where <code>name</code>, <code>isRead</code>, <code>isFav</code> are value took from a plist where i store all the data.
  Of course when the user opens a cell, the "unread" image goes away.</p>
  
  <p>The problem is now that i want to show BOTH unread and favorites. In the code above, it shows only those unread.</p>
  
  <p>How can i do to achieve this? I'm missing something stupid maybe!</p>