我正在尝试在UISlider上动态配置轨道颜色.
这行代码非常适合设置滑块轨道的低侧.
[self.sliderBar setMinimumTrackTintColor:[UIColor redColor]];
当尝试对滑块轨道的高端做同样的事情时,这行代码会向调试日志报告3个致命错误.
[self.sliderBar setMaximumTrackTintColor:[UIColor redColor]];
<Error>: CGContextAddPath: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
<Error>: clip: invalid context 0x0. This is a serious error. This application, or a library it uses, …Run Code Online (Sandbox Code Playgroud) 我不敢相信我在网上找不到答案 - 这就是我想要实现的 - UISlider 栏的单色(无论拇指在哪里)
不要介意BG颜色
,但我所能改变的只是条形的一种尺寸(我猜是色调):\
任何想法我怎样才能一直实现单色?