Peter Foti

Minor formatting changes, and fixed dead store

... ... @@ -51,7 +51,6 @@
pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
pathAnimation.toValue = [NSNumber numberWithFloat:1.0f];
pathAnimation.autoreverses = NO;
[_chartLine addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
_chartLine.strokeEnd = 1.0;
... ...
... ... @@ -88,7 +88,7 @@
float value = [valueString floatValue];
float grade = (float)value / (float)_yValueMax;
PNBar * bar = [[PNBar alloc] init];
PNBar * bar;
if (_showLabel) {
bar = [[PNBar alloc] initWithFrame:CGRectMake((index * _xLabelWidth + chartMargin + _xLabelWidth * 0.25), self.frame.size.height - chartCavanHeight - 30.0, _xLabelWidth * 0.5, chartCavanHeight)];
}else{
... ... @@ -99,12 +99,8 @@
bar.grade = grade;
[self addSubview:bar];
index += 1;
}
}
@end
... ...
... ... @@ -51,7 +51,7 @@
{
//Add count label
UICountingLabel* gradeLabel = [[UICountingLabel alloc] initWithFrame:CGRectMake(0, 0, 50.0, 50.0)];
UICountingLabel *gradeLabel = [[UICountingLabel alloc] initWithFrame:CGRectMake(0, 0, 50.0, 50.0)];
[gradeLabel setTextAlignment:NSTextAlignmentCenter];
[gradeLabel setFont:[UIFont boldSystemFontOfSize:13.0f]];
[gradeLabel setTextColor: PNDeepGrey];
... ... @@ -75,7 +75,6 @@
pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
pathAnimation.toValue = [NSNumber numberWithFloat:[_current floatValue]/[_total floatValue]];
pathAnimation.autoreverses = NO;
[_circle addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
_circle.strokeEnd = [_current floatValue]/[_total floatValue];
... ... @@ -83,13 +82,4 @@
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
// Drawing code
}
*/
@end
... ...
... ... @@ -157,7 +157,6 @@
pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
pathAnimation.toValue = [NSNumber numberWithFloat:1.0f];
pathAnimation.autoreverses = NO;
[_chartLine addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
_chartLine.strokeEnd = 1.0;
... ...