Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the individual segments be of different durations? #1

Open
dannysood opened this issue Mar 10, 2017 · 3 comments
Open

Can the individual segments be of different durations? #1

dannysood opened this issue Mar 10, 2017 · 3 comments

Comments

@dannysood
Copy link

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.

@D-32
Copy link
Owner

D-32 commented Mar 10, 2017

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].

@dannysood
Copy link
Author

dannysood commented Mar 10, 2017

@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 :)

@D-32
Copy link
Owner

D-32 commented Mar 10, 2017

Sure, feel free to open a PR :)

sashabaranov added a commit to sashabaranov/SegmentedProgressBar that referenced this issue Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants