Commit 8cd606d22f9d252261d7c77c34fadc0f2f457440
1 parent
00430ebc
no message
Showing
3 changed files
with
16 additions
and
1 deletions
CNLiveMineModule/Classes/Controller/CNLiveMineController.m
| ... | ... | @@ -122,7 +122,9 @@ static const CGFloat timeValue = 1.5; |
| 122 | 122 | } |
| 123 | 123 | ]; |
| 124 | 124 | for(NSDictionary *dic in data){ |
| 125 | - [self.data addObject:[CNLiveMineModel mj_objectWithKeyValues:dic]]; | |
| 125 | + CNLiveMineModel *model = [CNLiveMineModel mj_objectWithKeyValues:dic]; | |
| 126 | + [model editModel:NO]; | |
| 127 | + [self.data addObject:model]; | |
| 126 | 128 | } |
| 127 | 129 | [self.tableView reloadData]; |
| 128 | 130 | ... | ... |
CNLiveMineModule/Classes/Model/CNLiveMineModel.h
CNLiveMineModule/Classes/Model/CNLiveMineModel.m
| ... | ... | @@ -15,6 +15,17 @@ static const NSInteger margin = 10; |
| 15 | 15 | @"buttons" : @"CNLiveMineButtonModel" |
| 16 | 16 | }; |
| 17 | 17 | } |
| 18 | + | |
| 19 | +- (void)editModel:(BOOL)showMapTool{ | |
| 20 | + if ([self.style isEqualToString:@"2"]) { | |
| 21 | + NSMutableArray *array = [NSMutableArray arrayWithArray:self.buttons]; | |
| 22 | + if (!showMapTool) { | |
| 23 | + [array removeLastObject]; | |
| 24 | + self.buttons = [NSArray arrayWithArray:array]; | |
| 25 | + } | |
| 26 | + } | |
| 27 | +} | |
| 28 | + | |
| 18 | 29 | - (CNLiveMineCellType)type{ |
| 19 | 30 | if([self.style isEqualToString:@"1"]){ |
| 20 | 31 | return CNLiveMineCellTypeOrder; | ... | ... |