title: Xcode UIImageView rounded corners doesn't work
body: <p>I wanted to have an UIImageView appear with rounded corners, and found the following code to do it on Stack Overflow: </p>
  
  <pre><code>loginImage = [[UIImageView alloc] initWithImage: [UIImage imageNamed:@"BlueSky.jpg"]];
  CALayer *l = [loginImage layer];
  [l setMasksToBounds:YES];
  [l setCornerRadius:5.0];
  
  [loginImage release];
  </code></pre>
  
  <p>I added this code to my viewDidLoad method, but unfortunately the UIImageView does not give me  the rounded corners I was expecting. I linked the imageview "loginImage" correctly in Interface Builder. </p>
  
  <p>Any ideas what I'm doing wrong here? 
  Thanks! </p>