相关疑难解决方法(0)

iOS 7.1中的UISlider setMaximumTrackTintColor

[slider setMaximumTrackTintColor: color]
Run Code Online (Sandbox Code Playgroud)

在iOS 7.1中有意想不到的结果(滑块栏改变其位置显示在顶部而不是垂直中心或完全消失),同时与以前的版本一起工作正常.

[slider setMinimumTrackTintColor: color]
Run Code Online (Sandbox Code Playgroud)

确实呈现预期的结果.

这个问题可能是相关的:UISlider setMaximumTrackTintColor,但到目前为止还没有答案.

更新:

我明白了: 错误 代替: 在此输入图像描述

更新#2:

使用setMaximumTrackImage可能有效,但我正在寻找的解决方案是一种设置任何随机颜色而不是预先存在的图像的方法.

更新#3:

此问题仍存在于iOS 7.1.1中.

uislider ios

14
推荐指数
1
解决办法
4347
查看次数

UISlider setMaximumTrackTintColor

我正在尝试在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)

objective-c uislider ios ios7

13
推荐指数
2
解决办法
1万
查看次数

标签 统计

ios ×2

uislider ×2

ios7 ×1

objective-c ×1