Kevin

Merge pull request #14 from thefotes/master

Minor formatting changes, and fixed dead store
@@ -51,7 +51,6 @@ @@ -51,7 +51,6 @@
51 pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 51 pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
52 pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f]; 52 pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
53 pathAnimation.toValue = [NSNumber numberWithFloat:1.0f]; 53 pathAnimation.toValue = [NSNumber numberWithFloat:1.0f];
54 - pathAnimation.autoreverses = NO;  
55 [_chartLine addAnimation:pathAnimation forKey:@"strokeEndAnimation"]; 54 [_chartLine addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
56 55
57 _chartLine.strokeEnd = 1.0; 56 _chartLine.strokeEnd = 1.0;
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 float value = [valueString floatValue]; 88 float value = [valueString floatValue];
89 89
90 float grade = (float)value / (float)_yValueMax; 90 float grade = (float)value / (float)_yValueMax;
91 - PNBar * bar = [[PNBar alloc] init]; 91 + PNBar * bar;
92 if (_showLabel) { 92 if (_showLabel) {
93 bar = [[PNBar alloc] initWithFrame:CGRectMake((index * _xLabelWidth + chartMargin + _xLabelWidth * 0.25), self.frame.size.height - chartCavanHeight - 30.0, _xLabelWidth * 0.5, chartCavanHeight)]; 93 bar = [[PNBar alloc] initWithFrame:CGRectMake((index * _xLabelWidth + chartMargin + _xLabelWidth * 0.25), self.frame.size.height - chartCavanHeight - 30.0, _xLabelWidth * 0.5, chartCavanHeight)];
94 }else{ 94 }else{
@@ -99,12 +99,8 @@ @@ -99,12 +99,8 @@
99 bar.grade = grade; 99 bar.grade = grade;
100 [self addSubview:bar]; 100 [self addSubview:bar];
101 101
102 -  
103 index += 1; 102 index += 1;
104 } 103 }
105 -  
106 -  
107 -  
108 } 104 }
109 105
110 @end 106 @end
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 { 51 {
52 //Add count label 52 //Add count label
53 53
54 - UICountingLabel* gradeLabel = [[UICountingLabel alloc] initWithFrame:CGRectMake(0, 0, 50.0, 50.0)]; 54 + UICountingLabel *gradeLabel = [[UICountingLabel alloc] initWithFrame:CGRectMake(0, 0, 50.0, 50.0)];
55 [gradeLabel setTextAlignment:NSTextAlignmentCenter]; 55 [gradeLabel setTextAlignment:NSTextAlignmentCenter];
56 [gradeLabel setFont:[UIFont boldSystemFontOfSize:13.0f]]; 56 [gradeLabel setFont:[UIFont boldSystemFontOfSize:13.0f]];
57 [gradeLabel setTextColor: PNDeepGrey]; 57 [gradeLabel setTextColor: PNDeepGrey];
@@ -75,7 +75,6 @@ @@ -75,7 +75,6 @@
75 pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 75 pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
76 pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f]; 76 pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
77 pathAnimation.toValue = [NSNumber numberWithFloat:[_current floatValue]/[_total floatValue]]; 77 pathAnimation.toValue = [NSNumber numberWithFloat:[_current floatValue]/[_total floatValue]];
78 - pathAnimation.autoreverses = NO;  
79 [_circle addAnimation:pathAnimation forKey:@"strokeEndAnimation"]; 78 [_circle addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
80 _circle.strokeEnd = [_current floatValue]/[_total floatValue]; 79 _circle.strokeEnd = [_current floatValue]/[_total floatValue];
81 80
@@ -83,13 +82,4 @@ @@ -83,13 +82,4 @@
83 82
84 } 83 }
85 84
86 -/*  
87 -// Only override drawRect: if you perform custom drawing.  
88 -// An empty implementation adversely affects performance during animation.  
89 -- (void)drawRect:(CGRect)rect  
90 -{  
91 - // Drawing code  
92 -}  
93 -*/  
94 -  
95 @end 85 @end
@@ -157,7 +157,6 @@ @@ -157,7 +157,6 @@
157 pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 157 pathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
158 pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f]; 158 pathAnimation.fromValue = [NSNumber numberWithFloat:0.0f];
159 pathAnimation.toValue = [NSNumber numberWithFloat:1.0f]; 159 pathAnimation.toValue = [NSNumber numberWithFloat:1.0f];
160 - pathAnimation.autoreverses = NO;  
161 [_chartLine addAnimation:pathAnimation forKey:@"strokeEndAnimation"]; 160 [_chartLine addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
162 161
163 _chartLine.strokeEnd = 1.0; 162 _chartLine.strokeEnd = 1.0;