Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix progresscolor#13

Open
hons82 wants to merge 1 commit into
alskipp:master from
hons82:master
Open

Fix progresscolor #13
hons82 wants to merge 1 commit into
alskipp:master from
hons82:master

Conversation

@hons82

@hons82 hons82 commented Nov 22, 2016

Copy link
Copy Markdown

gradient and solid

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

Copy link
Copy Markdown
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?)

@hons82 hons82 Nov 22, 2016
edited
Loading

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
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

Reviewers

@alskipp alskipp alskipp left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /