title: How to create a circular image with border (UIGraphics)?
body: <p>How to create a circular image with border (UIGraphics)?</p>
  
  <p>P.S.  I need to draw a picture.</p>
  
  <p>code in <code>viewDidLoad</code>:                     </p>
  
  <pre><code>NSURL *url2 = [NSURL URLWithString:@"http://images.ak.instagram.com/profiles/profile_55758514_75sq_1399309159.jpg"];
  NSData *data2 = [NSData dataWithContentsOfURL:url2];
  UIImage *profileImg = [UIImage imageWithData:data2];
  
  UIGraphicsEndImageContext();
  // Create image context with the size of the background image.
  UIGraphicsBeginImageContext(profileImg.size);
  [profileImg drawInRect:CGRectMake(0, 0, profileImg.size.width, profileImg.size.height)];
  
  // Get the newly created image.
  UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
  
  // Release the context.
  UIGraphicsEndImageContext();
  
  // Set the newly created image to the imageView.
  self.imageView.image = result;
  </code></pre>