Gabe Heafitz

Remove some superfluous comments.

Also, remove a few lines of crufty code.
... ... @@ -16,7 +16,6 @@
self = [super initWithFrame:frame];
if (self) {
// Initialization code
_chartLine = [CAShapeLayer layer];
_chartLine.lineCap = kCALineCapButt;
_chartLine.fillColor = [[UIColor whiteColor] CGColor];
... ... @@ -72,7 +71,6 @@
CAShapeLayer *gradientMask = [CAShapeLayer layer];
gradientMask.fillColor = [[UIColor clearColor] CGColor];
gradientMask.strokeColor = [[UIColor blackColor] CGColor];
//gradientMask.lineWidth = 4;
gradientMask.lineWidth = self.frame.size.width;
gradientMask.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
gradientMask.path = progressline.CGPath;
... ... @@ -123,7 +121,6 @@
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
//Draw BG
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, self.backgroundColor.CGColor);
... ...
... ... @@ -26,7 +26,6 @@
self = [super initWithFrame:frame];
if (self) {
// Initialization code
self.backgroundColor = [UIColor whiteColor];
self.clipsToBounds = YES;
_showLabel = YES;
... ...
... ... @@ -16,9 +16,7 @@
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context,
[color CGColor]);
// [[UIColor colorWithRed:222./255 green:227./255 blue: 229./255 alpha:1] CGColor]) ;
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
... ...
... ... @@ -12,9 +12,6 @@
#import "PNLineChartData.h"
#import "PNLineChartDataItem.h"
// ------------------------------------------------------------------------------------------------
// private interface declaration
// ------------------------------------------------------------------------------------------------
@interface PNLineChart ()
@property (nonatomic) NSMutableArray *chartLineArray; // Array[CAShapeLayer]
... ... @@ -27,9 +24,6 @@
@end
// ------------------------------------------------------------------------------------------------
// public interface implementation
// ------------------------------------------------------------------------------------------------
@implementation PNLineChart
#pragma mark initialization
... ... @@ -379,9 +373,6 @@
[pointLayer addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
}
[CATransaction setCompletionBlock:^{
// pointLayer.strokeEnd = 1.0f; // stroken point when animation end
}];
[CATransaction commit];
UIGraphicsEndImageContext();
... ...
... ... @@ -5,21 +5,14 @@
#import "PNLineChartDataItem.h"
//------------------------------------------------------------------------------------------------
// private interface declaration
//------------------------------------------------------------------------------------------------
@interface PNLineChartDataItem ()
- (id)initWithY:(CGFloat)y;
@property (readwrite) CGFloat y; // should be within the y range
@end
@end
//------------------------------------------------------------------------------------------------
// public interface implementation
//------------------------------------------------------------------------------------------------
@implementation PNLineChartDataItem
+ (PNLineChartDataItem *)dataItemWithY:(CGFloat)y
... ... @@ -27,7 +20,6 @@
return [[PNLineChartDataItem alloc] initWithY:y];
}
- (id)initWithY:(CGFloat)y
{
if ((self = [super init])) {
... ... @@ -37,5 +29,4 @@
return self;
}
@end
... ...