title: I can't make corners of images and buttons rounded
body: <p>I'm creating the cells of a UITableViewController.
  In one of them, a small image is contained. I tried the following to make its corners rounded:</p>
  
  <pre><code>profileImage.layer.cornerRadius = 8;
  profileImage.clipsToBounds = YES;
  </code></pre>
  
  <p>In another cell prototype, I tried to make the corners of a button rounded:</p>
  
  <pre><code>    chooseImageFromRoll.clipsToBounds = YES;
      chooseImageFromRoll.layer.cornerRadius = 8;
  </code></pre>
  
  <p>In both cases I included</p>
  
  <pre><code>#import &lt;QuartzCore/QuartzCore.h&gt;
  </code></pre>
  
  <p>The button and the image whose corners must be rounded are property of the UITableViewController owning them:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface profileRegistrationCellVC : UITableViewCell
  @property (weak, nonatomic) IBOutlet UIImageView *profileImage;
  @property (weak, nonatomic) IBOutlet UIButton *chooseImageFromRoll;
  @property (weak, nonatomic) IBOutlet UIButton *shootImage;
  
  @end
  </code></pre>
  
  <p>In relative .m class:</p>
  
  <pre><code>#import "profileRegistrationCellVC.h"
  #import &lt;QuartzCore/QuartzCore.h&gt;
  
  @implementation profileRegistrationCellVC
  @synthesize profileImage;
  @synthesize chooseImageFromRoll;
  @synthesize shootImage;
  
  - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  {
      self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
      if (self) {
          // Initialization code
          chooseImageFromRoll.clipsToBounds = YES;
          chooseImageFromRoll.layer.cornerRadius = 8;
          shootImage.layer.cornerRadius = 8;
  
          profileImage.layer.cornerRadius = 8;
          profileImage.clipsToBounds = YES;
  
          profileImage.layer.borderColor = [UIColor whiteColor].CGColor;
          profileImage.layer.borderWidth = 20.0;
  
          [self addSubview:profileImage];
          [self addSubview:chooseImageFromRoll];
          [self addSubview:shootImage];
  
  
      }
      return self;
  }
  
  - (void)setSelected:(BOOL)selected animated:(BOOL)animated
  {
      [super setSelected:selected animated:animated];
  
      // Configure the view for the selected state
  }
  
  @end
  </code></pre>
  
  <p>Here's the code of my function cellForRowAtIndexPath, in my uitableviewcontroller:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      if (indexPath.section == 0) {
          static NSString *CellIdentifier = @"profileRegistrationCell";
  
          profileRegistrationCellVC *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
          if (cell == nil) {
              cell = [[profileRegistrationCellVC alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
          }
  
          //cell.profileImage.image.layer.masksToBounds = YES;
          //cell.profileImage.layer.cornerRadius = 5.0;
  
          return cell;
  
      }
  
      else if (indexPath.section == 1) {
          static NSString *CellIdentifier = @"regularRegistrationCell";
  
          regularRegistrationCellVC *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
          if (cell == nil) {
              cell = [[regularRegistrationCellVC alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
          }
  
          cell.regularFieldName.text = [_registrationItems objectAtIndex:indexPath.row];
  
          if ([[_registrationItems objectAtIndex:indexPath.row] isEqualToString:@"Email*"])
              cell.regularTextField.keyboardType = UIKeyboardTypeEmailAddress;
  
          if ([[_registrationItems objectAtIndex:indexPath.row] isEqualToString:@"Età"]) {
              cell.regularTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
          }
  
          return cell;
  
      }
  
      else{
          static NSString *CellIdentifier = @"orientationRegistrationCell";
  
          orientationRegistrationCellVC *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
          if (cell == nil) {
              cell = [[orientationRegistrationCellVC alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
          }
  
          cell.fieldLabel.text = [_registrationItems objectAtIndex:[_registrationItems count]-1];
          cell.orientationLabel.text = @"Non specificato";
          return cell;
  
      }
  }
  </code></pre>
  
  <p>But in no case I managed to make corners rounded. Can you tell where I'm mistaking?</p>
  
  <p>Thanks</p>