SegmentedProgressBar icon indicating copy to clipboard operation
SegmentedProgressBar copied to clipboard

How to update a custom duration for segmentedprogress and to update progress as well?

Open pradweep opened this issue 5 years ago • 4 comments

pradweep avatar Dec 08 '20 10:12 pradweep

I am also getting same issue

i have a multiple story and each story have a video. each video have a different time duration.

ubrainrepo avatar Jan 06 '21 07:01 ubrainrepo

https://github.com/sashabaranov/SegmentedProgressBar/commit/6542b5feeea916a35af760e350114acaecc70545

shrykg avatar Jan 28 '21 12:01 shrykg

@shrykg can we update time ruration run time for example, when user come to the second story at that time update that index time duration

ubrainrepo avatar Feb 03 '21 10:02 ubrainrepo

@ubrainrepo yes you can. For that in next() function in SegmentedProgressBar move line : self.delegate?.segmentedProgressBarChangedIndex(index: newIndex)above self.animate(animationIndex: newIndex). Then in your delegate method : func segmentedProgressBarChangedIndex(index: Int) change the desired index in durations array. Like : segmentBar?.durations[index] = videoDuration

shrykg avatar Feb 16 '21 00:02 shrykg