Просмотр исходного кода

1.修改iOS Apex Drivers Detail和Edit,Title加粗,并且探测电话号码更加标识设置是否启用。

Pen Li 7 лет назад
Родитель
Сommit
c3adf9e17b

+ 34 - 34
Redant Drivers/Apex And Drivers/Detail/Base.lproj/Detail.storyboard

@@ -19,27 +19,27 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Xxs-Bp-xwk">
-                                <rect key="frame" x="0.0" y="20" width="600" height="580"/>
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailSingleLineCell" rowHeight="70" id="PRr-DR-Xqo" customClass="RADetailSingleLineCell">
-                                        <rect key="frame" x="0.0" y="28" width="600" height="70"/>
+                                        <rect key="frame" x="0.0" y="28" width="375" height="70"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PRr-DR-Xqo" id="HGR-qE-k8g">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="69.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="69.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IcX-EB-asg">
-                                                    <rect key="frame" x="5" y="5" width="590" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="yUK-tS-gzP"/>
                                                     </constraints>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="AFS1234568978964" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="339-2d-d83">
-                                                    <rect key="frame" x="5" y="31" width="590" height="33.5"/>
+                                                    <rect key="frame" x="5" y="31" width="365" height="33.5"/>
                                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                     <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
@@ -62,10 +62,10 @@
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailMultLineCell" rowHeight="90" id="hLY-jO-rx0" customClass="RADetailMultLineCell">
-                                        <rect key="frame" x="0.0" y="98" width="600" height="90"/>
+                                        <rect key="frame" x="0.0" y="98" width="375" height="90"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hLY-jO-rx0" id="xPv-W6-2E0">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="89.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="89.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="j9q-8m-bG1">
@@ -92,14 +92,14 @@ PICKUP ON</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailLocationCell" rowHeight="100" id="2RY-c8-4kR" customClass="RADetailLocationCell">
-                                        <rect key="frame" x="0.0" y="188" width="600" height="100"/>
+                                        <rect key="frame" x="0.0" y="188" width="375" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2RY-c8-4kR" id="8uQ-ij-SSa">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E85-g7-fwi">
-                                                    <rect key="frame" x="550" y="43" width="40" height="40"/>
+                                                    <rect key="frame" x="325" y="43" width="40" height="40"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="40" id="Bt5-LJ-HeT"/>
                                                         <constraint firstAttribute="width" constant="40" id="vza-Ko-Kz7"/>
@@ -110,16 +110,16 @@ PICKUP ON</string>
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pick Up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="off-5x-hpV">
-                                                    <rect key="frame" x="5" y="5" width="590" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="Pn5-ru-O79"/>
                                                     </constraints>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="LUn-5q-wvP">
-                                                    <rect key="frame" x="5" y="31" width="540" height="63.5"/>
+                                                    <rect key="frame" x="5" y="31" width="315" height="63.5"/>
                                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <string key="text">TRANS PACIFIC CONTAINER SERVICE
 BERTH 30 2800 7TH ST
@@ -148,14 +148,14 @@ OAKLAND,CA</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailActionsCell" rowHeight="100" id="22c-X4-T1m" customClass="RADetailActionsCell">
-                                        <rect key="frame" x="0.0" y="288" width="600" height="100"/>
+                                        <rect key="frame" x="0.0" y="288" width="375" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="22c-X4-T1m" id="f99-Y7-BOd">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="iKo-LB-QEE">
-                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
                                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="p8G-wr-zEn">
                                                         <size key="itemSize" width="224" height="50"/>
@@ -165,7 +165,7 @@ OAKLAND,CA</string>
                                                     </collectionViewFlowLayout>
                                                     <cells>
                                                         <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="RADetailActionSubCell" id="NRo-Hn-zDX" customClass="RADetailActionSubCell">
-                                                            <rect key="frame" x="75.5" y="0.0" width="224" height="50"/>
+                                                            <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
                                                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
                                                                 <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
@@ -217,23 +217,23 @@ OAKLAND,CA</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailMapCell" rowHeight="100" id="sLQ-ry-Yxv" customClass="RADetailMapCell">
-                                        <rect key="frame" x="0.0" y="388" width="600" height="100"/>
+                                        <rect key="frame" x="0.0" y="388" width="375" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="sLQ-ry-Yxv" id="3xH-7S-3HD">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pick Up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xB6-BK-ueh">
-                                                    <rect key="frame" x="5" y="5" width="590" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="fu8-8j-kB0"/>
                                                     </constraints>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ev3-or-KB1">
-                                                    <rect key="frame" x="550" y="43" width="40" height="40"/>
+                                                    <rect key="frame" x="325" y="43" width="40" height="40"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="40" id="7wS-i9-I5v"/>
                                                         <constraint firstAttribute="width" constant="40" id="SOy-eZ-AVi"/>
@@ -244,7 +244,7 @@ OAKLAND,CA</string>
                                                     </connections>
                                                 </button>
                                                 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="5BM-ek-pkN">
-                                                    <rect key="frame" x="5" y="31" width="540" height="63.5"/>
+                                                    <rect key="frame" x="5" y="31" width="315" height="63.5"/>
                                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <string key="text">TRANS PACIFIC CONTAINER SERVICE
 BERTH 30 2800 7TH ST
@@ -273,10 +273,10 @@ OAKLAND,CA</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailPhotoCell" rowHeight="100" id="44Q-BL-fjP" customClass="RADetailPhotoCell">
-                                        <rect key="frame" x="0.0" y="488" width="600" height="100"/>
+                                        <rect key="frame" x="0.0" y="488" width="375" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="44Q-BL-fjP" id="k4f-vX-hlb">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M6V-ez-t4d">
@@ -286,7 +286,7 @@ OAKLAND,CA</string>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="x23-Ma-VwQ">
-                                                    <rect key="frame" x="280.5" y="5" width="89.5" height="89.5"/>
+                                                    <rect key="frame" x="505.5" y="5" width="89.5" height="89.5"/>
                                                     <gestureRecognizers/>
                                                     <constraints>
                                                         <constraint firstAttribute="width" secondItem="x23-Ma-VwQ" secondAttribute="height" multiplier="89:89" id="Gi9-rt-ewa"/>
@@ -309,10 +309,10 @@ OAKLAND,CA</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailSignatureCell" rowHeight="150" id="KBG-tu-iKo" customClass="RADetailSignatureCell">
-                                        <rect key="frame" x="0.0" y="588" width="600" height="150"/>
+                                        <rect key="frame" x="0.0" y="588" width="375" height="150"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KBG-tu-iKo" id="EcS-EV-o0B">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="149.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="149.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ErT-qT-9u6">
@@ -320,7 +320,7 @@ OAKLAND,CA</string>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="E3n-pS-av8"/>
                                                     </constraints>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
@@ -376,18 +376,18 @@ OAKLAND,CA</string>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="dkO-Ta-IQf">
-                                <rect key="frame" x="0.0" y="20" width="600" height="580"/>
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailActionSelectionCell" id="8M5-Ka-QBN" customClass="RADetailActionSelectionCell">
-                                        <rect key="frame" x="0.0" y="28" width="600" height="44"/>
+                                        <rect key="frame" x="0.0" y="28" width="375" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8M5-Ka-QBN" id="CTw-dI-j8V">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DSZ-Hp-4ld">
-                                                    <rect key="frame" x="5" y="0.0" width="370" height="43.5"/>
+                                                    <rect key="frame" x="5" y="0.0" width="595" height="43.5"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>

+ 6 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m

@@ -52,6 +52,12 @@
     } else{
         self.valueLabel.textColor = [UIColor blackColor];
     }
+    
+    if (model.detectTel) {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
+    } else {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone;
+    }
 }
 
 #pragma mark - User Action

+ 6 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMapCell.m

@@ -82,6 +82,12 @@
         self.navigationBtn.enabled = NO;
         [self.navigationBtn setImage:[UIImage imageNamed:@"btn_map_no"] forState:UIControlStateNormal];
     }
+    
+    if (model.detectTel) {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
+    } else {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone;
+    }
 }
 
 - (IBAction)navigationBtnClick:(UIButton *)sender {

+ 6 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.m

@@ -45,6 +45,12 @@
     } else{
         self.valueLabel.textColor = [UIColor blackColor];
     }
+    
+    if (model.detectTel) {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
+    } else {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone;
+    }
 }
 
 @end

+ 6 - 0
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.m

@@ -47,6 +47,12 @@
     } else{
         self.valueLabel.textColor = [UIColor blackColor];
     }
+    
+    if (model.detectTel) {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
+    } else {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone;
+    }
 }
 
 @end

+ 1 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.h

@@ -26,6 +26,7 @@ typedef enum {
 @property (nonatomic,assign) CGFloat width; ///< tableView Width, if smaller than 0 then use screen width
 @property (nonatomic,readonly,assign) CGFloat height;
 @property (nonatomic,assign) BOOL highlight;
+@property (nonatomic,assign) BOOL detectTel;///<检测电话号码
 
 
 @end

+ 22 - 22
Redant Drivers/Apex And Drivers/Update/Base.lproj/Edit.storyboard

@@ -30,8 +30,8 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7mL-uV-Ec4">
-                                                    <rect key="frame" x="5" y="5" width="42" height="21"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <rect key="frame" x="5" y="5" width="44.5" height="21"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
@@ -45,7 +45,7 @@
                                                     </connections>
                                                 </textField>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oNJ-t7-BbU">
-                                                    <rect key="frame" x="52" y="2" width="8" height="21"/>
+                                                    <rect key="frame" x="54.5" y="2" width="8" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="1" green="0.1047433005" blue="0.075207091899999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
@@ -122,8 +122,8 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kSq-7N-B38">
-                                                    <rect key="frame" x="5" y="5" width="42" height="21"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <rect key="frame" x="5" y="5" width="44.5" height="21"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
@@ -138,7 +138,7 @@
                                                     </connections>
                                                 </textView>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PXh-An-liI">
-                                                    <rect key="frame" x="52" y="2" width="8" height="21"/>
+                                                    <rect key="frame" x="54.5" y="2" width="8" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="1" green="0.1047433005" blue="0.075207091899999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
@@ -174,30 +174,30 @@
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="b5q-NH-cdy"/>
                                                     </constraints>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rwu-ro-0dr">
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" editable="NO" text="value" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="5KB-7n-y2I">
                                                     <rect key="frame" x="5" y="31" width="365" height="18"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                </textView>
                                             </subviews>
                                             <constraints>
+                                                <constraint firstItem="5KB-7n-y2I" firstAttribute="top" secondItem="fYw-WK-y6k" secondAttribute="bottom" constant="5" id="8zy-ve-1VJ"/>
                                                 <constraint firstAttribute="trailing" secondItem="fYw-WK-y6k" secondAttribute="trailing" constant="5" id="Dq0-IT-Kxt"/>
-                                                <constraint firstItem="Rwu-ro-0dr" firstAttribute="trailing" secondItem="fYw-WK-y6k" secondAttribute="trailing" id="Jee-w6-MqO"/>
+                                                <constraint firstItem="5KB-7n-y2I" firstAttribute="trailing" secondItem="fYw-WK-y6k" secondAttribute="trailing" id="Ey0-7d-UAJ"/>
+                                                <constraint firstItem="5KB-7n-y2I" firstAttribute="leading" secondItem="fYw-WK-y6k" secondAttribute="leading" id="GHv-fF-0k5"/>
                                                 <constraint firstItem="fYw-WK-y6k" firstAttribute="leading" secondItem="xbL-DH-R1m" secondAttribute="leading" constant="5" id="c7g-IP-6Na"/>
-                                                <constraint firstItem="Rwu-ro-0dr" firstAttribute="leading" secondItem="fYw-WK-y6k" secondAttribute="leading" id="dQ3-jn-rwg"/>
-                                                <constraint firstAttribute="bottom" secondItem="Rwu-ro-0dr" secondAttribute="bottom" constant="5.5" id="lZ5-VB-mTJ"/>
+                                                <constraint firstAttribute="bottom" secondItem="5KB-7n-y2I" secondAttribute="bottom" constant="5.5" id="mJs-6j-OHp"/>
                                                 <constraint firstItem="fYw-WK-y6k" firstAttribute="top" secondItem="xbL-DH-R1m" secondAttribute="top" constant="5" id="s7q-jb-oYh"/>
-                                                <constraint firstItem="Rwu-ro-0dr" firstAttribute="top" secondItem="fYw-WK-y6k" secondAttribute="bottom" constant="5" id="wre-UV-MJ6"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>
                                             <outlet property="titleLaebl" destination="fYw-WK-y6k" id="dc5-Qr-LbD"/>
-                                            <outlet property="valueLabel" destination="Rwu-ro-0dr" id="irJ-pb-krL"/>
+                                            <outlet property="valueLabel" destination="5KB-7n-y2I" id="o7g-zo-VXM"/>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAEditSignatureCell" rowHeight="150" id="33D-yI-fjG" customClass="RAEditSignatureCell">
@@ -208,8 +208,8 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3pu-Ya-6af">
-                                                    <rect key="frame" x="5" y="5" width="42" height="21"/>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <rect key="frame" x="5" y="5" width="44.5" height="21"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
@@ -217,7 +217,7 @@
                                                     <rect key="frame" x="5" y="31" width="365" height="113.5"/>
                                                 </imageView>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Top-J1-yJf">
-                                                    <rect key="frame" x="52" y="2" width="8" height="21"/>
+                                                    <rect key="frame" x="54.5" y="2" width="8" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="1" green="0.1047433005" blue="0.075207091899999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
@@ -249,11 +249,11 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="877-kV-pfE">
-                                                    <rect key="frame" x="5" y="5" width="42" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="44.5" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="Boo-cS-pY0"/>
                                                     </constraints>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
@@ -264,7 +264,7 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OjZ-5U-5uD">
-                                                    <rect key="frame" x="52" y="2" width="8" height="21"/>
+                                                    <rect key="frame" x="54.5" y="2" width="8" height="21"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="1" green="0.1047433005" blue="0.075207091899999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>

+ 9 - 1
Redant Drivers/Apex And Drivers/Update/Cell/RAEditLabelCell.m

@@ -12,7 +12,7 @@
 @interface RAEditLabelCell ()
 
 @property (strong, nonatomic) IBOutlet UILabel *titleLaebl;
-@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+@property (strong, nonatomic) IBOutlet UITextView *valueLabel;
 
 
 @end
@@ -23,6 +23,8 @@
     [super awakeFromNib];
     // Initialization code
     
+    self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5);
+    
     self.model = nil;
 }
 
@@ -43,6 +45,12 @@
     
     self.titleLaebl.text = _model.title;
     self.valueLabel.text = _model.value;
+    
+    if (model.detectTel) {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
+    } else {
+        self.valueLabel.dataDetectorTypes = UIDataDetectorTypeNone;
+    }
 }
 
 @end

+ 1 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditLabelModel.h

@@ -11,5 +11,6 @@
 @interface RAEditLabelModel : RAEditBaseModel
 
 @property (nonatomic,copy) NSString *value;
+@property (nonatomic,assign) BOOL detectTel;///<检测电话号码
 
 @end