title: UIImageView image is stretching when i am using rounded corners.
body: <p>I am using UITableViewCell as UITableView Header. I am using the below code to make rounded corners for UIImageView.</p>
  
  <pre><code>- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
      if(section==0){
  
      static NSString *simpleTableIdentifier = @"ContactDetailsHeaderTableViewCell";
  
      ContactDetailsHeaderTableViewCell *cell = (ContactDetailsHeaderTableViewCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
  
  
      if (cell == nil)
      {
          NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"ContactDetailsHeaderTableViewCell" owner:self options:nil];
          cell = [nib objectAtIndex:0];
  
      }
  
      ..................
      .................
  
  UIImage *img = [UIImage imageWithContentsOfFile:getImagePath];
  
          //rounded corners
          cell.profilePicImgView.clipsToBounds = YES;
  
          UIGraphicsBeginImageContextWithOptions(cell.profilePicImgView.bounds.size, NO, 1.0);
  
          // Add a clip before drawing anything, in the shape of an rounded rect
          [[UIBezierPath bezierPathWithRoundedRect:cell.profilePicImgView.bounds
                                      cornerRadius:60.0] addClip];
          // Draw your image
          [img drawInRect:cell.profilePicImgView.bounds];
  
          // Get the image, here setting the UIImageView image
          cell.profilePicImgView.image = UIGraphicsGetImageFromCurrentImageContext();
  
          // end drawing
          UIGraphicsEndImageContext();
  
  
  .............
  .............
  }
  </code></pre>
  
  <p>Below is the output</p>
  
  <p><a href="https://i.stack.imgur.com/2nbaW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2nbaW.png" alt="enter image description here"></a></p>
  
  <p>The image inside the UIImageView is stretching, if i am not using the rounded corners then the image is looking properly. I have tried lot of code sample from StackOverflow but none of them are working. </p>