title: Swift how change the background color and button border
body: <p>I have function:</p>
  
  <pre><code>func setSelectedSystemButtonColor(hoverButton: Int){
      let defaultColor = UIColor(red: 0/255, green: 62/255, blue: 132/255, alpha: 1)
      let selectedColor = UIColor(red: 251/255, green: 186/255, blue: 8/255, alpha: 1)
  
      homeBtn.backgroundColor = defaultColor
      productsBtn.backgroundColor = defaultColor
      calculatorBtn.backgroundColor = defaultColor
      conceptBtn.backgroundColor = defaultColor
      tipBtn.backgroundColor = defaultColor
  
      if hoverButton == 1 {
          homeBtn.backgroundColor = selectedColor
          homeBtn.layer.borderColor = defaultColor.cgColor
      }
      if hoverButton == 2 {
          productsBtn.backgroundColor = selectedColor
          homeBtn.layer.borderColor = defaultColor.cgColor
      }
      if hoverButton == 3 {
          calculatorBtn.backgroundColor = selectedColor
          homeBtn.layer.borderColor = defaultColor.cgColor
      }
      if hoverButton == 4 {
          conceptBtn.backgroundColor = selectedColor
          homeBtn.layer.borderColor = defaultColor.cgColor
      }
      if hoverButton == 5 {
          tipBtn.backgroundColor = selectedColor
          homeBtn.layer.borderColor = defaultColor.cgColor
      }
  }
  </code></pre>
  
  <p>This function is designed to:
  a) reset the color to default,
  b) set the background color for the selected button + add a border.</p>
  
  <p>The colors change correctly, however the borders do not display.
  The borders would be on 5px</p>