title: How to add border color to UISlider track in Swift 4?
body: <p>I want to make <code>UISlider</code> with <code>minimumTrackTintColor</code> and <code>minimumTrackTintColor</code> with <strong>track</strong> <code>borderColor</code> </p>
  
  <p>I've already set a <code>trackTintColor</code> for both <code>minimum</code> and <code>maximum</code> state but instead I want to add <strong>border</strong> for <code>UISlider</code> <strong>track</strong></p>
  
  <ul>
  <li>My <code>UISlider</code> looks Like this:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/E5hPu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E5hPu.png" alt="Slider Image 1"></a>
  <a href="https://i.stack.imgur.com/gxjhW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gxjhW.png" alt="Slider Image 2"></a>  </p>
  
  <ul>
  <li>I need to track border like this:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/E9epl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E9epl.png" alt="Image with border"></a></p>
  
  <ul>
  <li>Code</li>
  </ul>
  
  <pre><code>
  class SliderWithHeart: UISlider
  {
  
      override func awakeFromNib()
      {
          super.awakeFromNib()
  
          let imageTint = UIImage(named: "SliderHeart")
          self.minimumTrackTintColor = colorWithHex(hex: COLORCODE.APP_BUTTON_COLOR)
          self.maximumTrackTintColor = colorWithHex(hex: COLORCODE.APP_ORANGE_COLOR)
          self.setThumbImage(imageTint, for: .normal)
      }
      override func layoutSubviews()
      {
          super.layoutSubviews()
          super.layer.cornerRadius = self.frame.height/2
      }
  
      override func trackRect(forBounds bounds: CGRect) -&gt; CGRect
      {
          var newBounds = super.trackRect(forBounds: bounds)
          newBounds.size.height = 10
          return newBounds
      }
  
  }
  </code></pre>
  
  <p>How do I set the border color of the slider track, not the entire slider?</p>