Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/121.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios swift 3滑块拇指图像位置错位_Ios_Swift3_Uislider - Fatal编程技术网

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

Ios swift 3滑块拇指图像位置错位,ios,swift3,uislider,Ios,Swift3,Uislider,我使用下面的代码更新了滑块拇指图像,并且仍然显示有一些间隙滑块.setThumbImage(UIImage(名为:“Seekbar”),用于:。正常) 这是我的完整代码 self.playButton.setImage(UIImage(named: "PauseBig"), for: .normal) let duration : CMTime = mediaPlayer.currentItem!.asset.duration let seconds : Float64 = CMTimeGetS

我使用下面的代码更新了滑块拇指图像,并且仍然显示有一些间隙<代码>滑块.setThumbImage(UIImage(名为:“Seekbar”),用于:。正常)

这是我的完整代码

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)

您的幻灯片的最小轨迹I已更新,请检查我的问题添加滑块。value=0i已在故事板中设置值0,但按进度添加一次,然后检查一次