Sfoglia il codice sorgente

1.修改iOS CommonEditor Range Cell,增加Reset。

Pen Li 8 anni fa
parent
commit
87568c907b

+ 8 - 0
RedAnt ERP Mobile/common/CommonEditor/CommonEditorRangeCell.m

@@ -188,5 +188,13 @@
     
     [[self viewController].navigationController pushViewController:dpvc animated:true];
 }
+- (IBAction)resetBtnClick:(UIButton *)sender {
+    
+    [self setMinValue:@"" maxValue:@""];
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(commonEditorRangeCell:didChangeMinValue:maxValue:atIndexPath:)]) {
+        [self.delegate commonEditorRangeCell:self didChangeMinValue:@"" maxValue:@"" atIndexPath:self.indexPath];
+    }
+}
 
 @end

+ 13 - 0
RedAnt ERP Mobile/common/CommonEditor/Phone_Range_Cell.xib

@@ -83,12 +83,25 @@
                             <constraint firstItem="KbR-4N-5h0" firstAttribute="leading" secondItem="rOL-53-jIq" secondAttribute="leading" constant="5" id="lmQ-hA-BiX"/>
                         </constraints>
                     </view>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p7c-IA-NlC">
+                        <rect key="frame" x="310" y="7.5" width="37" height="29"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                        <state key="normal" title="Reset">
+                            <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                        </state>
+                        <connections>
+                            <action selector="resetBtnClick:" destination="aJD-4w-cyc" eventType="touchUpInside" id="xsH-dG-PoR"/>
+                        </connections>
+                    </button>
                 </subviews>
                 <constraints>
                     <constraint firstAttribute="trailing" secondItem="rOL-53-jIq" secondAttribute="trailing" id="0vF-B6-YXR"/>
                     <constraint firstAttribute="bottom" secondItem="N9F-9d-jEW" secondAttribute="bottom" id="2id-Sv-R7P"/>
+                    <constraint firstItem="p7c-IA-NlC" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="F7m-IY-bAy" secondAttribute="trailing" constant="5" id="3ce-57-0fo"/>
+                    <constraint firstAttribute="trailing" secondItem="p7c-IA-NlC" secondAttribute="trailing" constant="10" id="8aa-sk-MMn"/>
                     <constraint firstItem="Q11-bU-Foq" firstAttribute="height" secondItem="N9F-9d-jEW" secondAttribute="height" id="C7p-gp-g1c"/>
                     <constraint firstItem="rOL-53-jIq" firstAttribute="width" secondItem="Q11-bU-Foq" secondAttribute="width" id="HX1-uj-OmR"/>
+                    <constraint firstItem="p7c-IA-NlC" firstAttribute="centerY" secondItem="F7m-IY-bAy" secondAttribute="centerY" id="LQU-fi-DRv"/>
                     <constraint firstItem="N9F-9d-jEW" firstAttribute="leading" secondItem="9H1-uc-YO6" secondAttribute="leading" id="Ph9-ME-LZT"/>
                     <constraint firstItem="Q11-bU-Foq" firstAttribute="top" secondItem="N9F-9d-jEW" secondAttribute="top" id="ScF-do-uCY"/>
                     <constraint firstItem="Q11-bU-Foq" firstAttribute="leading" secondItem="N9F-9d-jEW" secondAttribute="trailing" id="bH9-pn-eAF"/>