Explorar o código

1.修改iOS Apex Mobile Detail增加Location参数。

Pen Li %!s(int64=8) %!d(string=hai) anos
pai
achega
4eb6715767

+ 12 - 3
Apex Mobile/Apex Mobile/DetailPageViewController.m

@@ -209,6 +209,14 @@
         
         
         [self.view layoutIfNeeded];
+    } else {
+        self.shipMap.showCurrent = YES;
+        self.shipMap.showPoe = YES;
+        self.shipMap.showPol = YES;
+        self.shipMap.showPod = YES;
+        self.shipMap.showPor = YES;
+        self.shipMap.showOrigin = YES;
+        self.shipMap.showDestination = YES;
     }
     
 }
@@ -265,7 +273,9 @@
     
     [UIView commitAnimations];
     
-    
+    if (self.showMap) {
+        [self.params setObject:@(YES) forKey:@"request_location"];
+    }
     
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         
@@ -1190,8 +1200,7 @@
     NSString* type =[segment valueForKey:@"_type"];
     
     if([type isEqualToString:@"tracking"]) {
-        NSDictionary* item = [self.content get_item_seg:indexPath.section row:indexPath.row];
-        NSDictionary *location = [item objectForKey:@"location"];
+        NSDictionary *location = [segment objectForKey:@"location"];
         [self.shipMap showShipAnnotaion:location];
     }
     

+ 1 - 1
Apex Mobile/Apex Mobile/Main.storyboard

@@ -1722,7 +1722,7 @@
                                 <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" allowsSelection="NO" rowHeight="-1" sectionHeaderHeight="-1" sectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="mia-XC-A8d">
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" rowHeight="-1" sectionHeaderHeight="-1" sectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="mia-XC-A8d">
                                 <rect key="frame" x="0.0" y="237" width="375" height="430"/>
                                 <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                                 <inset key="insetFor6xAndEarlier" minX="0.0" minY="64" maxX="0.0" maxY="44"/>