Przeglądaj źródła

1.修改iOS Apex Mobile Home地图重复选中。

Pen Li 8 lat temu
rodzic
commit
9debe5f3ed
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      Apex Mobile/Apex Mobile/HomeViewController.m

+ 6 - 1
Apex Mobile/Apex Mobile/HomeViewController.m

@@ -343,6 +343,7 @@ typedef enum {
                 [self.shipArray removeAllObjects];
                 [self.shipArray addObjectsFromArray:[json objectForKey:@"container_list"]];
                 self.iconSelectedIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
+                [self showMapAnnotaionWithIndexPath:self.iconSelectedIndexPath];
                 [self.shipTableView reloadData];
                 
             } else {
@@ -596,6 +597,7 @@ typedef enum {
         return;
     }
     [self setSelectedIndexPath:indexPath shipCell:nil];
+    [self showMapAnnotaionWithIndexPath:indexPath];
     
     NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
 
@@ -836,10 +838,12 @@ typedef enum {
     }
     [self.shipTableView selectRowAtIndexPath:self.iconSelectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
     [cell setIconSelect:YES];
+}
+
+- (void)showMapAnnotaionWithIndexPath:(NSIndexPath *)indexPath {
     
     NSDictionary *item = [self.shipArray objectAtIndex:indexPath.section];
     NSDictionary *locationInfo = [item objectForKey:@"locations"];
-//    locationInfo = [self fakeLoaction];
     
     [self.mapView showShipAnnotaion:locationInfo];
     
@@ -850,6 +854,7 @@ typedef enum {
 - (void)shipCellDidTapIcon:(ShipingStatusCell *)cell {
     NSIndexPath *indexPath = [self.shipTableView indexPathForCell:cell];
     [self setSelectedIndexPath:indexPath shipCell:cell];
+    [self showMapAnnotaionWithIndexPath:indexPath];
 }
 
 #pragma mark - ShipMap Delegate