Эх сурвалжийг харах

添加当前定位点按钮

liuzhenxing1118 9 сар өмнө
parent
commit
4900bddbe5

+ 11 - 0
artimenring-iOS/Artimenring/Base.lproj/Main.storyboard

@@ -29,6 +29,14 @@
                                 <rect key="frame" x="0.0" y="-10" width="375" height="788"/>
                                 <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
                             </view>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6cb-MZ-2sT">
+                                <rect key="frame" x="162.66666666666666" y="582" width="50" height="26"/>
+                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                <state key="normal" backgroundImage="icon_location_cur"/>
+                                <connections>
+                                    <action selector="moveChildToCenter:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="5tE-G5-N2M"/>
+                                </connections>
+                            </button>
                             <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="HiH-Sa-EpJ">
                                 <rect key="frame" x="305" y="488" width="70" height="170"/>
                                 <subviews>
@@ -453,12 +461,14 @@
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                             <constraint firstItem="9oE-2Y-Zjp" firstAttribute="top" secondItem="oGO-U0-ITi" secondAttribute="top" constant="60" id="1g1-sD-Nxp"/>
+                            <constraint firstItem="6cb-MZ-2sT" firstAttribute="centerX" secondItem="9oE-2Y-Zjp" secondAttribute="centerX" id="4mV-Bj-wCM"/>
                             <constraint firstItem="SRW-Qp-2Ju" firstAttribute="leading" secondItem="9oE-2Y-Zjp" secondAttribute="leading" id="4pg-NL-FKG"/>
                             <constraint firstItem="9oE-2Y-Zjp" firstAttribute="bottom" secondItem="oGO-U0-ITi" secondAttribute="bottom" id="4sg-0B-8hL"/>
                             <constraint firstItem="9oE-2Y-Zjp" firstAttribute="bottom" secondItem="HiH-Sa-EpJ" secondAttribute="bottom" constant="120" id="8T8-T2-yyM"/>
                             <constraint firstItem="v19-dx-mpH" firstAttribute="top" secondItem="9oE-2Y-Zjp" secondAttribute="top" constant="-11" id="E67-wI-P61"/>
                             <constraint firstItem="GF7-H3-tD1" firstAttribute="leading" secondItem="9oE-2Y-Zjp" secondAttribute="leading" constant="10" id="EG7-5A-2k4"/>
                             <constraint firstItem="9oE-2Y-Zjp" firstAttribute="trailing" secondItem="3M5-Qw-9Er" secondAttribute="trailing" id="GgG-SA-cik"/>
+                            <constraint firstItem="3M5-Qw-9Er" firstAttribute="top" secondItem="6cb-MZ-2sT" secondAttribute="bottom" constant="10" id="IXi-LU-oqH"/>
                             <constraint firstItem="9oE-2Y-Zjp" firstAttribute="trailing" secondItem="oGO-U0-ITi" secondAttribute="trailing" id="J3u-lt-DIF"/>
                             <constraint firstItem="uLg-AT-jcT" firstAttribute="top" secondItem="9oE-2Y-Zjp" secondAttribute="top" id="LS2-KL-XoH"/>
                             <constraint firstItem="ltI-lH-4P6" firstAttribute="leading" secondItem="9oE-2Y-Zjp" secondAttribute="leading" id="OoU-9V-Xb7"/>
@@ -9839,6 +9849,7 @@ If you still can't scan the code properly after inserting it correctly, please s
         <image name="icon_alarmclock" width="24" height="24"/>
         <image name="icon_email" width="18" height="14"/>
         <image name="icon_key" width="20" height="20"/>
+        <image name="icon_location_cur" width="50" height="26"/>
         <image name="icon_network_no" width="20" height="15.666666984558105"/>
         <image name="icon_nopermissions" width="270" height="190"/>
         <image name="icon_phone" width="22" height="22"/>

+ 0 - 1
artimenring-iOS/Artimenring/Classes/ViewController/Location/SKMainViewController+map.h

@@ -14,7 +14,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)initMap;
 - (void)showLastLoaction;
-- (void)moveChildToCenter;
 - (void)refreshChildAnnotations;
 - (void)refreshAccuracyCircle;
 - (void)refreshCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated accuracy:(NSInteger)accuracy;

+ 1 - 1
artimenring-iOS/Artimenring/Classes/ViewController/Location/SKMainViewController+map.m

@@ -82,7 +82,7 @@
     }
 }
 
-- (void)moveChildToCenter {
+- (IBAction)moveChildToCenter:(id)sender {
     NSArray *annotationArray = [self.mMapView.annotations copy];
     for (MKPointAnnotation *annotation in annotationArray) {
         if(![annotation isMemberOfClass:[ChildPointAnnotation class]])

+ 22 - 0
artimenring-iOS/Artimenring/Images.xcassets/icon_location_cur.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "icon_location_cur@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "icon_location_cur@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
artimenring-iOS/Artimenring/Images.xcassets/icon_location_cur.imageset/icon_location_cur@2x.png


BIN
artimenring-iOS/Artimenring/Images.xcassets/icon_location_cur.imageset/icon_location_cur@3x.png