My iPhone app plays streamed audio from the Internet and I have an UISlider to scrub back and forth the already downloaded file.
This UISlider has transparent tracks, and is on top of an UIProgressView.
The UIProgressView shows the user the streamed audio download progress.
Everything works fine, but I can’t figure out how to limit the scrubbing capability not beyond the already downloaded audio file, represented by this UIProgressView.
Any suggestions are welcome.
You can check if the value changed is greater than the progress then set it to the progress. Say you’re handling
UISlider‘sUIControlEventValueChangedevent in this method,or change the frame based on the progress.