SegmentedProgressBar icon indicating copy to clipboard operation
SegmentedProgressBar copied to clipboard

Can the individual segments be of different durations?

Open dannysood opened this issue 8 years ago • 3 comments

Firstly great work. I have different videos of different durations and am looking for a solution where 1 segment of the bar represents 1 video. Thanks.

dannysood avatar Mar 10 '17 03:03 dannysood

I don't think I want to add this here as it's quite a unique use case. Basically you could have a property inside SegmentedProgressBarlike var durations: [TimeInterval] and on line 99, instead of using duration, use durations[animationIndex].

D-32 avatar Mar 10 '17 04:03 D-32

@D-32 Cool. Thanks. I believe this is more generic than you give it credit for. I would love to do it and submit a pull request if you are comfortable merging it in. The description says "Snapchat / Instagram Stories like progress indicator" and I believe its variable in those cases. I might be wrong though because I dont really use insta or snapchat.

I have a project that has this specific requirement and looks like a easy enough fix so I can do it and submit a pull request once I get to that feature. It can have two overloaded methods where you can either pass on as a list or a single number as duration.

By the way thanks for the help :)

dannysood avatar Mar 10 '17 06:03 dannysood

Sure, feel free to open a PR :)

D-32 avatar Mar 10 '17 06:03 D-32