张航

fix typo

... ... @@ -15,11 +15,11 @@
@property (nonatomic, readonly) NSArray *items;
@property (nonatomic) UIFont *descriptionTextFont; //defualt is [UIFont fontWithName:@"Avenir-Medium" size:18.0];
@property (nonatomic) UIColor *descriptionTextColor; //defualt is [UIColor whiteColor]
@property (nonatomic) UIColor *descriptionTextShadowColor; //defualt is [[UIColor blackColor] colorWithAlphaComponent:0.4]
@property (nonatomic) CGSize descriptionTextShadowOffset; //defualt is CGSizeMake(0, 1)
@property (nonatomic) NSTimeInterval duration;//defualt is 1.0
@property (nonatomic) UIFont *descriptionTextFont; //default is [UIFont fontWithName:@"Avenir-Medium" size:18.0];
@property (nonatomic) UIColor *descriptionTextColor; //default is [UIColor whiteColor]
@property (nonatomic) UIColor *descriptionTextShadowColor; //default is [[UIColor blackColor] colorWithAlphaComponent:0.4]
@property (nonatomic) CGSize descriptionTextShadowOffset; //default is CGSizeMake(0, 1)
@property (nonatomic) NSTimeInterval duration;//default is 1.0
- (void)strokeChart;
... ...
... ... @@ -21,6 +21,8 @@
@property (nonatomic) CAShapeLayer *pieLayer;
@property (nonatomic) NSMutableArray *descriptionLabels;
- (void)loadDefault;
- (UILabel *)descriptionLabelForItemAtIndex:(NSUInteger)index;
- (PNPieChartDataItem *)dataItemForIndex:(NSUInteger)index;
... ... @@ -31,6 +33,7 @@
startPercentage:(CGFloat)startPercentage
endPercentage:(CGFloat)endPercentage;
@end
... ... @@ -49,14 +52,14 @@
_descriptionTextShadowOffset = CGSizeMake(0, 1);
_duration = 1.0;
[self loadDefualt];
[self loadDefault];
}
return self;
}
- (void)loadDefualt{
- (void)loadDefault{
_currentTotal = 0;
_total = 0;
... ... @@ -73,7 +76,7 @@
#pragma mark -
- (void)strokeChart{
[self loadDefualt];
[self loadDefault];
[self.items enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
_total +=((PNPieChartDataItem *)obj).value;
... ...