Explorar el Código

2.修改iOS Apex Mobile Recent地图调整间距、显示比例尺。

Pen Li hace 8 años
padre
commit
de1bffbf3f

+ 5 - 0
Apex Mobile/Apex Mobile/HomeViewController.m

@@ -76,6 +76,9 @@ typedef enum {
     [self registNotification];
     [self configureTableView];
     self.shipSearchBar.delegate =self;
+    
+    self.mapView.showsScale = YES;
+    self.mapView.rotateEnabled = NO;
     self.mapView.delegate = self;
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logout) name:APLogoutNotification object:nil];
@@ -581,6 +584,7 @@ typedef enum {
     if (self.shipTableView != tableView) {
         return;
     }
+    [self setSelectedIndexPath:indexPath shipCell:nil];
     
     NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
 
@@ -819,6 +823,7 @@ typedef enum {
     if (cell == nil) { // 滑动过程中,dequeue方法中设置选中
         cell = shipCell;
     }
+    [self.shipTableView selectRowAtIndexPath:self.iconSelectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
     [cell setIconSelect:YES];
     
     [self.mapView removeAnnotations:self.mapView.annotations];

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

@@ -344,10 +344,10 @@
                                 <rect key="frame" x="0.0" y="104" width="375" height="514"/>
                                 <subviews>
                                     <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="NXU-e4-wFa">
-                                        <rect key="frame" x="0.0" y="0.0" width="375" height="171.5"/>
+                                        <rect key="frame" x="5" y="2" width="365" height="170.5"/>
                                     </mapView>
                                     <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="iIl-j9-7oa">
-                                        <rect key="frame" x="0.0" y="171.5" width="375" height="342.5"/>
+                                        <rect key="frame" x="0.0" y="174.5" width="375" height="339.5"/>
                                         <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                                         <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                         <connections>
@@ -390,14 +390,14 @@
                                     <constraint firstItem="iIl-j9-7oa" firstAttribute="width" secondItem="TYb-wc-Nwg" secondAttribute="width" id="3bU-Ll-nT0"/>
                                     <constraint firstAttribute="bottom" secondItem="iIl-j9-7oa" secondAttribute="bottom" id="4yV-a1-feP"/>
                                     <constraint firstItem="0Al-V9-YKc" firstAttribute="centerX" secondItem="TYb-wc-Nwg" secondAttribute="centerX" id="8a8-fw-f0B"/>
-                                    <constraint firstItem="NXU-e4-wFa" firstAttribute="top" secondItem="TYb-wc-Nwg" secondAttribute="top" id="DQD-M7-57a"/>
+                                    <constraint firstItem="NXU-e4-wFa" firstAttribute="top" secondItem="TYb-wc-Nwg" secondAttribute="top" constant="2" id="DQD-M7-57a"/>
                                     <constraint firstItem="iIl-j9-7oa" firstAttribute="centerX" secondItem="TYb-wc-Nwg" secondAttribute="centerX" id="Jd3-gv-peg"/>
-                                    <constraint firstItem="NXU-e4-wFa" firstAttribute="leading" secondItem="TYb-wc-Nwg" secondAttribute="leading" id="MUJ-8S-eA6"/>
+                                    <constraint firstItem="NXU-e4-wFa" firstAttribute="leading" secondItem="TYb-wc-Nwg" secondAttribute="leading" constant="5" id="MUJ-8S-eA6"/>
                                     <constraint firstItem="NXU-e4-wFa" firstAttribute="height" secondItem="iIl-j9-7oa" secondAttribute="height" multiplier="1:2" id="Ont-ff-Yo7"/>
                                     <constraint firstItem="IFp-NK-v1o" firstAttribute="centerY" secondItem="TYb-wc-Nwg" secondAttribute="centerY" id="Q19-iJ-g2O"/>
-                                    <constraint firstAttribute="trailing" secondItem="NXU-e4-wFa" secondAttribute="trailing" id="XQd-lR-G3j"/>
+                                    <constraint firstAttribute="trailing" secondItem="NXU-e4-wFa" secondAttribute="trailing" constant="5" id="XQd-lR-G3j"/>
                                     <constraint firstItem="0Al-V9-YKc" firstAttribute="centerY" secondItem="TYb-wc-Nwg" secondAttribute="centerY" id="fYu-3V-T4O"/>
-                                    <constraint firstItem="iIl-j9-7oa" firstAttribute="top" secondItem="NXU-e4-wFa" secondAttribute="bottom" id="kfT-Li-zDm"/>
+                                    <constraint firstItem="iIl-j9-7oa" firstAttribute="top" secondItem="NXU-e4-wFa" secondAttribute="bottom" constant="2" id="kfT-Li-zDm"/>
                                     <constraint firstItem="IFp-NK-v1o" firstAttribute="centerX" secondItem="TYb-wc-Nwg" secondAttribute="centerX" id="lcn-AL-YXN"/>
                                 </constraints>
                             </view>