开发者

How to mimic iPod time remaining and time played scrubbing labels

开发者 https://www.devze.com 2023-03-14 03:51 出处:网络
I have an audio scrubber consisting of a UISlider and开发者_开发知识库 two UILabels on each side to mimic the iPod\'s time played and time remaining labels.I can update the labels with the slider\'s p

I have an audio scrubber consisting of a UISlider and开发者_开发知识库 two UILabels on each side to mimic the iPod's time played and time remaining labels. I can update the labels with the slider's position, but the labels only jump to each new seek time.

How can I make the labels increment by seconds--so the labels go through every second and minute quickly between the old time and the new seek time as you slide the slider? My slider is currently set to [0.0, 1.0] and it is continuous.

Is there a way to override touchesMoved: for the slider maybe?


Solved it. The issue wasn't my code being incorrect. It was I was pulling the currentPlaybackTime value from a MPMoviePlayerController, and that was lagging the labels. I removed that and used the new slider value and it worked great.

0

精彩评论

暂无评论...
验证码 换一张
取 消