title: Why does UIImageView show image tiny compared to Safari?
body: <p>I have a simple custom cell with a UIImageView loading a picture from the Internet as follows</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
   static NSString *CellIdentifier = @"shopifyCell";
   UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
   NSDictionary *dict = [_shopifyCollections objectAtIndex:indexPath.row];
  
   // Configure the cell...
   //[cell.textLabel setText:[NSString stringWithFormat:@"%@", [dict objectForKey:@"description"]]];
  
   NSURL *url = [[NSURL alloc]initWithString:[dict objectForKey:@"imageUrl"]];
   NSData *data =[NSData dataWithContentsOfURL:url];
   cell.imageView.image = [UIImage imageWithData:data];
  
   return cell;
  </code></pre>
  
  <p>The problem is that it shows up extremely tiny ( about 0.5cmx0.5cm ), but if I open the same link in safari on the same iPhone it shows up in much larger size.</p>
  
  <p>I tried resize the UIImage in the storyboard and also to adjust the auto layout constraints but it had no effect so I must be missing something here.</p>
  
  <p>How can I control the size of the UIImageView in my custom cell to make it the size I want which is more similar to the web view of the same image?</p>
  
  <p>EDIT ***</p>
  
  <p>I tried adding the contentMode as follows but nothing changes</p>
  
  <pre><code>NSURL *url = [[NSURL alloc]initWithString:[dict objectForKey:@"imageUrl"]];
   NSData *data =[NSData dataWithContentsOfURL:url];
   cell.imageView.contentMode = UIViewContentModeScaleAspectFill;
   cell.imageView.image = [UIImage imageWithData:data];
  </code></pre>
  
  <p>EDIT 2 ***</p>
  
  <p>fixing some mistakes with not mapping the correct cell, this now works horizontally but not vertically, why can I now scale it in the X direction but not in Y direction?</p>
  
  <pre><code>NSURL *url = [[NSURL alloc]initWithString:[dict objectForKey:@"imageUrl"]];
   NSData *data =[NSData dataWithContentsOfURL:url];
   cell.shopifyCellMainImage.contentMode = UIViewContentModeScaleAspectFill;
   cell.shopifyCellMainImage.image = [UIImage imageWithData:data];
  </code></pre>