Преглед изворни кода

1.修改RedAnt ERP Upload Image按钮对齐。

Pen Li пре 7 година
родитељ
комит
7cdc232158

+ 54 - 54
RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m

@@ -77,32 +77,32 @@
     //    }
     //    [CATransaction commit];
     
-    
-    NSTimeInterval animationDuration = 0.30f;
-    [UIView beginAnimations:nil context:nil];
-    [UIView setAnimationDuration:animationDuration];
-    
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    if (UIInterfaceOrientationIsLandscape(orientation))
-    {
-        
-        
-        self.buttonAlbum.frame = CGRectMake(942,120,48,48);
-        self.buttonCamera.frame = CGRectMake(942,200,48,48);
-        self.buttonUpload.frame = CGRectMake(942,363,48,48);
-        //        @property (strong, nonatomic) IBOutlet UIButton *buttonAlbum;
-        //        @property (strong, nonatomic) IBOutlet UIButton *buttonCamera;
-        //        @property (strong, nonatomic) IBOutlet UIButton *buttonUpload;
-    }
-    else
-    {
-        self.buttonAlbum.frame = CGRectMake(82,918,48,48);
-        self.buttonCamera.frame = CGRectMake(173,918,48,48);
-        self.buttonUpload.frame = CGRectMake(635,918,48,48);
-        
-    }
-    
-    [UIView commitAnimations];
+    // 2018.12.28 iPad Pro 11-inch位置不正确
+//    NSTimeInterval animationDuration = 0.30f;
+//    [UIView beginAnimations:nil context:nil];
+//    [UIView setAnimationDuration:animationDuration];
+//
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    if (UIInterfaceOrientationIsLandscape(orientation))
+//    {
+//
+//
+//        self.buttonAlbum.frame = CGRectMake(942,120,48,48);
+//        self.buttonCamera.frame = CGRectMake(942,200,48,48);
+//        self.buttonUpload.frame = CGRectMake(942,363,48,48);
+//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonAlbum;
+//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonCamera;
+//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonUpload;
+//    }
+//    else
+//    {
+//        self.buttonAlbum.frame = CGRectMake(82,918,48,48);
+//        self.buttonCamera.frame = CGRectMake(173,918,48,48);
+//        self.buttonUpload.frame = CGRectMake(635,918,48,48);
+//
+//    }
+//
+//    [UIView commitAnimations];
     
     
     
@@ -126,37 +126,37 @@
     self.imgview.image = self.img;
     
     
-    UIApplication * app = [UIApplication sharedApplication];
-    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
+//    UIApplication * app = [UIApplication sharedApplication];
+//    AppDelegate *appDelegate = (AppDelegate *)[app delegate];
     //    [appDelegate didRotated];
     
     
-    
-    NSTimeInterval animationDuration = 0.30f;
-    [UIView beginAnimations:nil context:nil];
-    [UIView setAnimationDuration:animationDuration];
-    
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
-    if (UIInterfaceOrientationIsLandscape(orientation))
-    {
-        
-        
-        self.buttonAlbum.frame = CGRectMake(942,120,48,48);
-        self.buttonCamera.frame = CGRectMake(942,200,48,48);
-        self.buttonUpload.frame = CGRectMake(942,363,48,48);
-        //        @property (strong, nonatomic) IBOutlet UIButton *buttonAlbum;
-        //        @property (strong, nonatomic) IBOutlet UIButton *buttonCamera;
-        //        @property (strong, nonatomic) IBOutlet UIButton *buttonUpload;
-    }
-    else
-    {
-        self.buttonAlbum.frame = CGRectMake(82,918,48,48);
-        self.buttonCamera.frame = CGRectMake(173,918,48,48);
-        self.buttonUpload.frame = CGRectMake(635,918,48,48);
-        
-    }
-    
-    [UIView commitAnimations];
+    // 2018.12.28 iPad Pro 11-inch位置不正确
+//    NSTimeInterval animationDuration = 0.30f;
+//    [UIView beginAnimations:nil context:nil];
+//    [UIView setAnimationDuration:animationDuration];
+//
+//    UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
+//    if (UIInterfaceOrientationIsLandscape(orientation))
+//    {
+//
+//
+//        self.buttonAlbum.frame = CGRectMake(942,120,48,48);
+//        self.buttonCamera.frame = CGRectMake(942,200,48,48);
+//        self.buttonUpload.frame = CGRectMake(942,363,48,48);
+//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonAlbum;
+//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonCamera;
+//        //        @property (strong, nonatomic) IBOutlet UIButton *buttonUpload;
+//    }
+//    else
+//    {
+//        self.buttonAlbum.frame = CGRectMake(82,918,48,48);
+//        self.buttonCamera.frame = CGRectMake(173,918,48,48);
+//        self.buttonUpload.frame = CGRectMake(635,918,48,48);
+//
+//    }
+//
+//    [UIView commitAnimations];
     
     // Do any additional setup after loading the view.
 }

+ 17 - 17
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -5504,38 +5504,38 @@ Email: redantsupport@united-us.net</string>
                         <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="5ri-5V-GiE">
+                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" insetsLayoutMarginsFromSafeArea="NO" id="5ri-5V-GiE">
                                 <rect key="frame" x="84" y="120" width="600" height="745"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <color key="backgroundColor" red="0.79277843236923218" green="0.79277843236923218" blue="0.79277843236923218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </imageView>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Na7-Cn-iPo">
-                                <rect key="frame" x="82" y="918" width="48" height="48"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <button opaque="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Na7-Cn-iPo">
+                                <rect key="frame" x="82" y="900" width="48" height="48"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 <state key="normal" image="album"/>
                                 <connections>
                                     <action selector="onClickAlbum:" destination="yoP-dB-tvg" eventType="touchUpInside" id="r6T-zf-AOR"/>
                                 </connections>
                             </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="t9M-g5-jQa">
-                                <rect key="frame" x="173" y="918" width="48" height="48"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <button opaque="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="t9M-g5-jQa">
+                                <rect key="frame" x="173" y="900" width="48" height="48"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 <state key="normal" image="camera"/>
                                 <connections>
                                     <action selector="onClickCamera:" destination="yoP-dB-tvg" eventType="touchUpInside" id="I9k-Sb-ExD"/>
                                 </connections>
                             </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="8fL-NB-sPV">
-                                <rect key="frame" x="635" y="918" width="48" height="48"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <button opaque="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="8fL-NB-sPV">
+                                <rect key="frame" x="635" y="900" width="48" height="48"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                                 <state key="normal" image="upload"/>
                                 <connections>
                                     <action selector="onClickUpload:" destination="yoP-dB-tvg" eventType="touchUpInside" id="gwB-hs-npR"/>
                                 </connections>
                             </button>
-                            <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progressViewStyle="bar" id="N7c-8k-EE4">
-                                <rect key="frame" x="84" y="908" width="600" height="3"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" insetsLayoutMarginsFromSafeArea="NO" progressViewStyle="bar" id="N7c-8k-EE4">
+                                <rect key="frame" x="84" y="880" width="600" height="3"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
                                 <color key="backgroundColor" red="0.081770886230000006" green="0.40781933069999998" blue="0.094417002809999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             </progressView>
                         </subviews>
@@ -6581,7 +6581,7 @@ Email: redantsupport@united-us.net</string>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="KVd-zF-Tl0"/>
                                     <barButtonItem style="plain" id="joL-Py-zMr">
                                         <searchBar key="customView" contentMode="redraw" searchBarStyle="minimal" placeholder="Name, Address, Phone etc" id="37s-Zo-qJG">
-                                            <rect key="frame" x="273" y="0.0" width="364" height="44"/>
+                                            <rect key="frame" x="257" y="0.0" width="364" height="44"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                             <textInputTraits key="textInputTraits"/>
                                             <connections>
@@ -9808,7 +9808,7 @@ Email: redantsupport@united-us.net</string>
         <image name="btn_search" width="204" height="60"/>
         <image name="btn_signin" width="100" height="30"/>
         <image name="camera" width="96" height="96"/>
-        <image name="cart_empty" width="144" height="144"/>
+        <image name="cart_empty" width="192" height="192"/>
         <image name="category" width="192" height="192"/>
         <image name="check_0_24" width="24" height="24"/>
         <image name="check_1_24" width="48" height="48"/>
@@ -9827,7 +9827,7 @@ Email: redantsupport@united-us.net</string>
         <image name="mark_wish_32" width="64" height="64"/>
         <image name="menu_open" width="36" height="36"/>
         <image name="more_color_larger" width="15.359999656677246" height="15.359999656677246"/>
-        <image name="newcustomer" width="64" height="64"/>
+        <image name="newcustomer" width="80" height="80"/>
         <image name="neworder" width="80" height="80"/>
         <image name="notifyMe" width="124" height="39"/>
         <image name="npd_logo" width="220" height="25.297296524047852"/>