Pārlūkot izejas kodu

1.修改NPD Model Description视图,增加Close按钮以及调整边距。

Pen Li 8 gadi atpakaļ
vecāks
revīzija
a05b300bb2

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 14 - 4
RedAnt ERP Mobile/iSales-NPD/Base.lproj/OLM.storyboard

@@ -158,13 +158,23 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" textAlignment="justified" id="VRj-M1-sDm">
-                                <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <rect key="frame" x="5" y="0.0" width="758" height="984"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                             </textView>
+                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="yLy-4Y-3J0">
+                                <rect key="frame" x="0.0" y="989" width="768" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                <state key="normal" title="Close">
+                                    <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                </state>
+                                <connections>
+                                    <action selector="closeBtnClick:" destination="cfs-SS-G2Z" eventType="touchUpInside" id="QpA-7N-5g5"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                     </view>
@@ -272,7 +282,7 @@
                                                     <rect key="frame" x="10" y="32" width="21" height="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" image="button:hrK-DY-RbO:image"/>
-                                                    <state key="selected" image="E6E706A5-3F5B-437B-B7F7-5553CBFC6502"/>
+                                                    <state key="selected" image="2A54B7B2-8666-4DFF-864E-0E0A50C5B6C7"/>
                                                     <connections>
                                                         <action selector="checkButtonClick:" destination="XXr-fU-67o" eventType="touchUpInside" id="KeU-ld-H4J"/>
                                                     </connections>
@@ -452,7 +462,7 @@
         </scene>
     </scenes>
     <resources>
-        <image name="E6E706A5-3F5B-437B-B7F7-5553CBFC6502" width="24" height="24">
+        <image name="2A54B7B2-8666-4DFF-864E-0E0A50C5B6C7" width="24" height="24">
             <mutableData key="keyedArchiveRepresentation">
 YnBsaXN0MDDUAQIDBAUGPT5YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK4HCBMU
 GR4fIyQrLjE3OlUkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5TUmVw

+ 10 - 1
RedAnt ERP Mobile/iSales-NPD/ModelDescriptionController.m

@@ -19,13 +19,19 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
-    
+    self.automaticallyAdjustsScrollViewInsets = NO;
     self.desc_tv.text = self.model_desc;
     
     UIBarButtonItem *exitBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"close"] style:UIBarButtonItemStylePlain target:self action:@selector(exitVC)];
     self.navigationItem.rightBarButtonItem = exitBtn;
     
     self.desc_tv.editable = NO;
+    self.navigationController.navigationBar.translucent = NO;
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self.desc_tv scrollRangeToVisible:NSMakeRange(0, 1)];
 }
 
 - (void)didReceiveMemoryWarning {
@@ -37,5 +43,8 @@
     [self dismissViewControllerAnimated:YES completion:nil];
 }
 
+- (IBAction)closeBtnClick:(UIButton *)sender {
+    [self exitVC];
+}
 
 @end

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -11,7 +11,7 @@
 #define BUILD_NPD
 
 # ifdef DEBUG
-//#define test_server
+#define test_server
 # endif
 
 #define exception_switch 1