DACircularProgress icon indicating copy to clipboard operation
DACircularProgress copied to clipboard

thicknessRatio under default value

Open santiacho opened this issue 9 years ago • 3 comments

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 avatar May 08 '15 11:05 santiacho

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

santiacho avatar May 08 '15 12:05 santiacho

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

cuongtv51 avatar May 15 '15 16:05 cuongtv51

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!

santiacho avatar May 18 '15 08:05 santiacho