Leii

Add a superclass method invocation

@@ -29,7 +29,8 @@ @@ -29,7 +29,8 @@
29 self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 29 self.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
30 30
31 //Public iVar 31 //Public iVar
32 - if ([items count]< 3) { 32 + if ([items count]< 3)//At least three corners of A polygon ,If the count of items is less than 3 will add 3 default values
  33 + {
33 NSLog( @"At least three items!"); 34 NSLog( @"At least three items!");
34 NSArray *defaultArray = @[[PNRadarChartDataItem dataItemWithValue:0 description:@"Default"], 35 NSArray *defaultArray = @[[PNRadarChartDataItem dataItemWithValue:0 description:@"Default"],
35 [PNRadarChartDataItem dataItemWithValue:0 description:@"Default"], 36 [PNRadarChartDataItem dataItemWithValue:0 description:@"Default"],
@@ -62,6 +63,8 @@ @@ -62,6 +63,8 @@
62 _chartPlot.fillColor = _plotColor.CGColor; 63 _chartPlot.fillColor = _plotColor.CGColor;
63 _chartPlot.lineWidth = 1.0; 64 _chartPlot.lineWidth = 1.0;
64 [self.layer addSublayer:_chartPlot]; 65 [self.layer addSublayer:_chartPlot];
  66 +
  67 + [super setupDefaultValues];
65 //init detailLabel 68 //init detailLabel
66 _detailLabel = [[UILabel alloc] init]; 69 _detailLabel = [[UILabel alloc] init];
67 _detailLabel.backgroundColor = [UIColor colorWithRed:.9 green:.9 blue:.1 alpha:.9]; 70 _detailLabel.backgroundColor = [UIColor colorWithRed:.9 green:.9 blue:.1 alpha:.9];
@@ -140,7 +143,7 @@ @@ -140,7 +143,7 @@
140 #pragma mark - Draw 143 #pragma mark - Draw
141 144
142 - (void)drawRect:(CGRect)rect { 145 - (void)drawRect:(CGRect)rect {
143 - // Drawing code 146 + // Drawing backgound
144 CGContextRef context = UIGraphicsGetCurrentContext(); 147 CGContextRef context = UIGraphicsGetCurrentContext();
145 CGContextClearRect(context, rect); 148 CGContextClearRect(context, rect);
146 int section = 0; 149 int section = 0;