title: How to add only right border to UIImageView
body: <p>I want to add a white border to an UIImageView. I tried the following, but it didn't work:</p>
  
  <pre><code>    UIImage *image = [UIImage imageNamed:imagePath];
      UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
      CGRect rect = imageView.frame;        
      rect.size.width = rect.size.width + 1; // create white right border
      [imageView setBackgroundColor:[UIColor whiteColor]]; 
  
      imageView.frame = rect;
      [myViewView addSubview:imageView];
  </code></pre>