How to customise UISlider height

后端 未结 9 1674
Happy的楠姐
Happy的楠姐 2020-12-06 05:42

I have project in which have to customise UISlider element. I wondering if someone knows how to change, or is it possible to change height of UISlide

9条回答
  •  醉话见心
    2020-12-06 05:56

    U can easily get it done by subclassing UISlider. see following code

    class CustomUISlider : UISlider
    {        
        override func trackRectForBounds(bounds: CGRect) -> CGRect {
        //set your bounds here
        return bounds
    
       }
    }
    

提交回复
热议问题