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

Fix progresscolor #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix progresscolor #13

wants to merge 1 commit into from

Conversation

hons82
Copy link

@hons82 hons82 commented Nov 22, 2016

gradient and solid

gradient and solid
for (NSInteger i = 0; i < [colors count]; i++) {
[positions addObject:@(i * spacer)];
}
[positions addObject:@(1.0)];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not had time to check, but I don't think it's necessary to manually calculate the gradient positions. If nil is passed as the arg to positions in the gradient layer, the color positions along the gradient are automatically calculated. (unless things have changed recently?)

Copy link
Author

@hons82 hons82 Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I had something else wrong here... however I got just a black background

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm… that's weird, sorry about that.

In the example project the gradient animation works without having to manually calculate the gradient stop positions. Are you doing something slightly different to the example project, which could potentially result in the black background instead of a gradient? Perhaps there's something unclear in the API that could be the cause?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll give it another try with a fresh checkout... I'll let u know tomorrow

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

Successfully merging this pull request may close these issues.

2 participants