我正在使用此代码from自定义UISlider的thumbImage。它可以在情节提要中正确构建,但是当我构建并运行时,它不会显示我的图像吗?可能是因为我也将其连接为插座吗? (这是必需的,因为我需要在代码中设置滑块的值)
@IBDesignable
class DesignableSlider: UISlider {
@IBInspectable var thumbImage: UIImage? {
didSet{
setThumbImage(thumbImage, for: .normal)
}
}
}