Subclassing UISlider to customize thumb image using IBDesignable/IBInspectable?

183 Views Asked by At

I'm using this code from to customize my UISlider's thumbImage. It builds correctly in the storyboard but when I build and run it does not show my image? Could it be because I have it hooked up as an outlet as well? (necessary because I need to set the slider's value in code)

@IBDesignable
class DesignableSlider: UISlider {



    @IBInspectable var thumbImage: UIImage? {
        didSet{
              setThumbImage(thumbImage, for: .normal)
        }
    }


}
0

There are 0 best solutions below