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

thicknessRatio under default value #52

Open
santiacho opened this issue May 8, 2015 · 3 comments
Open

thicknessRatio under default value #52

santiacho opened this issue May 8, 2015 · 3 comments

Comments

@santiacho
Copy link

if you set de thicknessRatio under 0.3, as set in initialize method:

  • (void) initialize
    {
    if (self == [DACircularProgressView class]) {
    DACircularProgressView *circularProgressViewAppearance = [DACircularProgressView appearance];
    [circularProgressViewAppearance setTrackTintColor:[[UIColor whiteColor] colorWithAlphaComponent:0.3f]];
    [circularProgressViewAppearance setProgressTintColor:[UIColor whiteColor]];
    [circularProgressViewAppearance setInnerTintColor:nil];
    [circularProgressViewAppearance setBackgroundColor:[UIColor clearColor]];
    [circularProgressViewAppearance setThicknessRatio:0.3f];
    [circularProgressViewAppearance setRoundedCorners:NO];
    [circularProgressViewAppearance setClockwiseProgress:YES];

    [circularProgressViewAppearance setIndeterminateDuration:2.0f];
    [circularProgressViewAppearance setIndeterminate:NO];
    

    }
    }

The thicknessRatio never changes its value.

¿Does anybody know why?

Thanks.

@santiacho
Copy link
Author

If at least you could remove background... the bug will fix to, because what doesn't set the thicknessRatio is the background, the progress and tracker does.
Here you have the example:

self.ringView = [[DACircularProgressView alloc] initWithFrame:self.ringView.frame];
[self.ringView setProgressTintColor:[UIColor ftb_colorWithHexString:@"#5BC894"]];
[self.ringView setTrackTintColor:[UIColor clearColor]];
[self.ringView setInnerTintColor:[UIColor clearColor]];
[self.ringView setThicknessRatio:0.22];
[self.viewBarProgress addSubview:self.ringView];

captura de pantalla 2015-05-08 a las 14 42 30

@cuongtv51
Copy link
Contributor

Hi @santiacho ,
I have test but not reproduce this bug, if can, you can give some detail sample code ?
Thanks.

@santiacho
Copy link
Author

Hi @cuongtv51,

The sample code I provide is all I have, but I think that I solved my problema creating the View programmatically. I used to create DACircularProgressView as IBOutlet and I think that was the problem...
I f you try to create the view with IBOutlet and link the view with it in InterfaceBuilder, you'll see how the background still has the default color and default radio.
Downloading the example code from the repository help me to see how creating the view programmatically works like a charm.

Thanks!

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