Add Custom UISlider to ViewController

时间:2018-05-13 22:01:49

标签: ios swift uislider addsubview

I have made a custom UISlider class (CustomSlider) that I would simply like to add as a subview to my UIView. So, I do this:

var slider = CustomSlider()
self.view.addSubview(slider)

The UISlider is being added to the UIView, but it is the default slider, not my custom one. Why is this happening? I've looked all over the internet and cannot find a solution.

0 个答案:

没有答案