title: Trying to set Border of an UIImage
body: <p>I am new to swift and I am trying to set a black border around my <code>UIImageView</code> but I am unable to do so. This is my code</p>
  
  <pre><code>@IBOutlet weak var flagImage: UIImageView!
  var image = UIImage(named: "estonia")
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      flagImage.layer.borderColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0).CGColor
      flagImage.layer.cornerRadius = 5.0
  
      flagImage.contentMode = .scaleAspectFit
      flagImage.image = image
   }
  </code></pre>
  
  <p>Could I get some help on this?</p>