swift 3滑块拇指图像位置错位

时间:2017-01-31 10:45:08

标签: ios swift3 uislider

我使用以下代码更新了滑块拇指图像,但仍显示有一些差距。 slider.setThumbImage(UIImage(named: "Seekbar"), for: .normal) enter image description here

这是我的完整代码

self.playButton.setImage(UIImage(named: "PauseBig"), for: .normal)
let duration : CMTime = mediaPlayer.currentItem!.asset.duration
let seconds : Float64 = CMTimeGetSeconds(duration)
slider.value = 0
slider.minimumValue = 0
slider.maximumValue = Float(seconds)
slider.setThumbImage(UIImage(named: "Seekbar"), for: .normal)

0 个答案:

没有答案