|
@@ -54,6 +54,7 @@ typedef enum {
|
|
|
@property (nonatomic,assign) BOOL kpiRefresh;
|
|
@property (nonatomic,assign) BOOL kpiRefresh;
|
|
|
|
|
|
|
|
@property (nonatomic,strong) IBOutlet MKMapView *mapView;
|
|
@property (nonatomic,strong) IBOutlet MKMapView *mapView;
|
|
|
|
|
+@property (nonatomic,strong) NSIndexPath *iconSelectedIndexPath;
|
|
|
|
|
|
|
|
@end
|
|
@end
|
|
|
|
|
|
|
@@ -327,6 +328,7 @@ typedef enum {
|
|
|
|
|
|
|
|
[self.shipArray removeAllObjects];
|
|
[self.shipArray removeAllObjects];
|
|
|
[self.shipArray addObjectsFromArray:[json objectForKey:@"container_list"]];
|
|
[self.shipArray addObjectsFromArray:[json objectForKey:@"container_list"]];
|
|
|
|
|
+ self.iconSelectedIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
|
|
|
[self.shipTableView reloadData];
|
|
[self.shipTableView reloadData];
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -523,6 +525,10 @@ typedef enum {
|
|
|
|
|
|
|
|
[[[[[[[[cell setTitle:title] setDescription:desc] setDetail:detail] setPort:port] setTime:date] setIcon:icon] setTransportStage:stage] setDelegate:self];
|
|
[[[[[[[[cell setTitle:title] setDescription:desc] setDetail:detail] setPort:port] setTime:date] setIcon:icon] setTransportStage:stage] setDelegate:self];
|
|
|
|
|
|
|
|
|
|
+ if (self.iconSelectedIndexPath && self.iconSelectedIndexPath.section == indexPath.section) {
|
|
|
|
|
+ [self setSelectedIndexPath:self.iconSelectedIndexPath shipCell:cell];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return cell;
|
|
return cell;
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
@@ -800,7 +806,20 @@ typedef enum {
|
|
|
return returnDic;
|
|
return returnDic;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-- (void)setSelectedIndexPath:(NSIndexPath *)indexPath {
|
|
|
|
|
|
|
+- (void)setSelectedIndexPath:(NSIndexPath *)indexPath shipCell:(ShipingStatusCell *)shipCell {
|
|
|
|
|
+ if (indexPath == nil) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (self.iconSelectedIndexPath) {
|
|
|
|
|
+ ShipingStatusCell *cell = [self.shipTableView cellForRowAtIndexPath:self.iconSelectedIndexPath];
|
|
|
|
|
+ [cell setIconSelect:NO];
|
|
|
|
|
+ }
|
|
|
|
|
+ self.iconSelectedIndexPath = indexPath;
|
|
|
|
|
+ ShipingStatusCell *cell = [self.shipTableView cellForRowAtIndexPath:indexPath];
|
|
|
|
|
+ if (cell == nil) { // 滑动过程中,dequeue方法中设置选中
|
|
|
|
|
+ cell = shipCell;
|
|
|
|
|
+ }
|
|
|
|
|
+ [cell setIconSelect:YES];
|
|
|
|
|
|
|
|
[self.mapView removeAnnotations:self.mapView.annotations];
|
|
[self.mapView removeAnnotations:self.mapView.annotations];
|
|
|
|
|
|
|
@@ -878,7 +897,7 @@ typedef enum {
|
|
|
|
|
|
|
|
- (void)shipCellDidTapIcon:(ShipingStatusCell *)cell {
|
|
- (void)shipCellDidTapIcon:(ShipingStatusCell *)cell {
|
|
|
NSIndexPath *indexPath = [self.shipTableView indexPathForCell:cell];
|
|
NSIndexPath *indexPath = [self.shipTableView indexPathForCell:cell];
|
|
|
- [self setSelectedIndexPath:indexPath];
|
|
|
|
|
|
|
+ [self setSelectedIndexPath:indexPath shipCell:cell];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
@end
|