title: Change Image Frame Width IF image Width = 200
body: <p>I need to change <code>cell.image.frame</code> to <code>CGRectMake(105, 110, 10, 180)</code> if the image width I get back from the API is <strong>200</strong>.</p>
  
  <p>Currently any size image I get I have at <code>CGRectMake(0, 140, 320, 180)</code>.</p>
  
  <p>So I just need to change the <code>cell.image.frame</code> only in the cases where the image width I get back is exactly 200.</p>
  
  <p>I need help figuring out <strong>where to put the <code>if</code> statement</strong>, and <strong>what exactly to put in the <code>if</code> statement</strong>.</p>
  
  <p>I can't seem to get it to work, so any help would be appreciated, thanks!</p>
  
  <p>Below is the code:</p>
  
  <p>WebListCell.m</p>
  
  <pre><code>- (void)layoutSubviews {
      [super layoutSubviews];
      self.imageView.frame = CGRectMake(0, 140, 320, 180);   
  }
  </code></pre>
  
  <p>WebListViewController.m</p>
  
  <pre><code>Images *imageLocal = [feedLocal.images objectAtIndex:0];
  NSString *imageURL = [NSString stringWithFormat:@"%@", imageLocal.url];
  [cell.imageView setImageWithURL:[NSURL URLWithString:imageURL]
                     placeholderImage:[UIImage imageNamed:@"img.gif"]
                            completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType)
          {
          // Code
          }];
  </code></pre>
  
  <p>Edit: I've tried putting this inside of the <code>//Code</code> part:</p>
  
  <pre><code>if(imageWith == [NSString stringWithFormat:@"200"])
           {
             cell.imageView.frame = CGRectMake(105, 110, 10, 180);
           }
  </code></pre>
  
  <p>But it didn't work and also gave me a warning about capturing the cell strongly could lead to retain cycle.</p>