|
13 | 13 | #import "MixedChartVC.h" |
14 | 14 | #import "CustomStyleForScatterChartVC.h" |
15 | 15 | #import "CustomStyleForBubbleChartVC.h" |
| 16 | +#import "CustomTableViewCell.h" |
| 17 | +#import "AAEasyTool.h" |
16 | 18 |
|
17 | 19 | @interface AAChartModelListVC () |
18 | 20 |
|
@@ -144,20 +146,53 @@ - (void)viewDidLoad { |
144 | 146 |
|
145 | 147 | /*Custom Style For Scatter Chart*/ |
146 | 148 | @[ |
147 | | - @"customScatterChartMarkerSymbolContent", |
148 | | - @"drawLineMixedScatterChartWithPointsCoordinates2", |
| 149 | + @"customScatterChartMarkerSymbolContent---自定义散点图的标志点内容", |
| 150 | + @"drawLineMixedScatterChartWithPointsCoordinates2---通过点坐标绘制折线混合散点图", |
149 | 151 | ], |
150 | 152 | /*Custom Style For Bubble Chart*/ |
151 | 153 | @[ |
152 | | - @"negativeColorMixedBubbleChart", |
153 | | - @"showAARadialGradientPositionAllEnumValuesWithBubbleChart", |
| 154 | + @"negativeColorMixedBubbleChart---基准线以下异色混合气泡图", |
| 155 | + @"showAARadialGradientPositionAllEnumValuesWithBubbleChart---气泡图径向渐变位置枚举示例", |
154 | 156 | ], |
155 | 157 | ]; |
156 | 158 |
|
157 | 159 | self.view.backgroundColor = [UIColor whiteColor]; |
158 | 160 | [self setUpMainTableView]; |
159 | 161 | } |
160 | 162 |
|
| 163 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 164 | + CustomTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CustomTableViewCell"]; |
| 165 | + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; |
| 166 | + |
| 167 | + cell.numberLabel.text = [NSString stringWithFormat:@"%ld", indexPath.row + 1]; |
| 168 | + cell.numberLabel.layer.masksToBounds = true; |
| 169 | + cell.numberLabel.layer.cornerRadius = 10; |
| 170 | + UIColor *numBgColor = [AAEasyTool colorWithHexString:@[@"#5470c6", |
| 171 | + @"#91cc75", |
| 172 | + @"#fac858", |
| 173 | + @"#ee6666", |
| 174 | + @"#73c0de", |
| 175 | + @"#3ba272", |
| 176 | + @"#fc8452", |
| 177 | + @"#9a60b4", |
| 178 | + @"#ea7ccc"][indexPath.section % 9]]; |
| 179 | + cell.numberLabel.backgroundColor = numBgColor; |
| 180 | + cell.numberLabel.textColor = UIColor.whiteColor; |
| 181 | + |
| 182 | + NSString *textStr = self.chartTypeTitleArr[(NSUInteger)indexPath.section][(NSUInteger)indexPath.row]; |
| 183 | + NSArray<NSString *> *textStrArr = [textStr componentsSeparatedByString:@"---"]; |
| 184 | + cell.titleLabel.text = textStrArr.firstObject; |
| 185 | + cell.subtitleLabel.text = textStrArr.count > 1 ? textStrArr[1] : @""; |
| 186 | + |
| 187 | + if (indexPath.row % 2 == 0) { |
| 188 | + cell.backgroundColor = [AAEasyTool colorWithHexString:@"#FFF0F5"]; |
| 189 | + } else { |
| 190 | + cell.backgroundColor = UIColor.whiteColor; |
| 191 | + } |
| 192 | + |
| 193 | + return cell; |
| 194 | +} |
| 195 | + |
161 | 196 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
162 | 197 | NSUInteger row = (NSUInteger) indexPath.row; |
163 | 198 | NSUInteger section = (NSUInteger) indexPath.section; |
|
0 commit comments