Kaynağa Gözat

Apex Mobile

优化 search result 显示
修复 search result pop 位置不对的bug
Ray Zhang 8 yıl önce
ebeveyn
işleme
3ba9449f93

BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


BIN
Apex Mobile/Apex Mobile.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 71 - 7
Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -10,7 +10,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "540118094.887267"
+            timestampString = "540180996.846316"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "849"
@@ -26,7 +26,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
-            timestampString = "540118094.888236"
+            timestampString = "540180996.846754"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "419"
@@ -42,7 +42,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "540118094.888483"
+            timestampString = "540180996.847142"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "502"
@@ -58,7 +58,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "540118094.888791"
+            timestampString = "540180996.847268"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "519"
@@ -74,7 +74,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "540118094.889083"
+            timestampString = "540180996.847374"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "525"
@@ -90,7 +90,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "540118094.889333"
+            timestampString = "540180996.847459"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "528"
@@ -106,7 +106,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "Apex Mobile/DetailPageViewController.m"
-            timestampString = "540118094.889578"
+            timestampString = "540180996.847572"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "853"
@@ -115,5 +115,69 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/MylistViewController.m"
+            timestampString = "540119188.901276"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "87"
+            endingLineNumber = "87"
+            landmarkName = "-PerformAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/customUI/ResultViewController.m"
+            timestampString = "540180996.847736"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "379"
+            endingLineNumber = "379"
+            landmarkName = "-labelTapAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/customUI/ResultViewController.m"
+            timestampString = "540180996.8480999"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "385"
+            endingLineNumber = "385"
+            landmarkName = "-labelTapAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/customUI/ResultViewController.m"
+            timestampString = "540180996.8482029"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "378"
+            endingLineNumber = "378"
+            landmarkName = "-labelTapAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 3 - 0
Apex Mobile/Apex Mobile/AMResultViewController.m

@@ -79,6 +79,9 @@
     // 参数设置放在Super前
     
     [super viewDidLoad];
+    
+    self.default_line_color = 0xaa9ccb;
+    
     // Do any additional setup after loading the view.
     
 //    NSString* title=@"";

+ 2 - 0
RedAnt ERP Mobile/common/RAUtils.h

@@ -72,4 +72,6 @@
 + (NSString *)htmlForVideo:(NSString*) iframeCode template:(NSString*) path;
 + (NSString *)htmlForImage:(UIImage *)image template:(NSString*) path;
 
+
++ (CGRect)relativeFrame:(CGRect) frame FromView:(UIView *)v toView:(UIView*)tv;
 @end

+ 4 - 0
RedAnt ERP Mobile/common/RAUtils.m

@@ -734,6 +734,10 @@
     int val;
     return[scan scanInt:&val] && [scan isAtEnd];
 }
++ (CGRect)relativeFrame:(CGRect) frame FromView:(UIView *)v toView:(UIView*)tv
+{
+    return [v convertRect: frame toView:tv];
+}
 + (CGRect)relativeFrameForScreenWithView:(UIView *)v
 {
     UIWindow * window=[[[UIApplication sharedApplication] delegate] window];

+ 2 - 2
common/customUI/Result.storyboard

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>

+ 4 - 0
common/customUI/ResultViewController.h

@@ -40,6 +40,10 @@ UIKIT_EXTERN const int delta;
 @property (nonatomic,strong) NSDictionary *params;
 @property (nonatomic,strong) QLPreviewController *quickLook;
 
+@property (assign) unsigned long default_line_color;
+@property (assign) unsigned long default_title_text_size;
+@property (assign) unsigned long default_row_text_size;
+
 - (void)setQueryParams:(NSDictionary *)params;
 
 //@property (strong, nonatomic)UITapGestureRecognizer* labelTap;

+ 24 - 1
common/customUI/ResultViewController.m

@@ -18,6 +18,7 @@
 #import <QuickLook/QuickLook.h>
 #import "config.h"
 #import "RAConvertor.h"
+#import "RAUtils.h"
 //#import "RTLabel.h"
 
 
@@ -41,6 +42,10 @@ const int delta = 25;
 - (void)viewDidLoad {
     
         [super viewDidLoad];
+    
+    self.default_row_text_size=13;
+    self.default_row_text_size=15;
+    self.default_line_color = 0x000000;
     self.titleLabel.text = nil;
 
 //    self.labelTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(labelTapAction:)];
@@ -67,6 +72,7 @@ const int delta = 25;
 //    singleFingerTwo.delegate = self;
     
     self.label = [MDHTMLLabel new];
+    self.label.font = [UIFont systemFontOfSize:self.default_row_text_size];
 //    NSString* Path = [[NSBundle mainBundle] pathForResource:@"layout.json" ofType:nil];
 //
 //    NSData *data = [NSData dataWithContentsOfFile:Path];
@@ -371,7 +377,20 @@ const int delta = 25;
         
         UIPopoverPresentationController* popPc = fullVC.popoverPresentationController;
         popPc.permittedArrowDirections = UIPopoverArrowDirectionAny;
+        
+        
+        CGRect rectl = [RAUtils relativeFrameForScreenWithView:label];
+        CGRect rectv =[RAUtils relativeFrameForScreenWithView:self.view];
+        
+        CGRect intersection_rect=CGRectIntersection(rectl, rectv);
+        UIWindow * window=[[[UIApplication sharedApplication] delegate] window];
+        CGRect source_rect=[RAUtils relativeFrame:intersection_rect FromView:window toView:label];
+//          CGRect rect=[v convertRect: v.bounds toView:window];
+        
+        popPc.sourceRect = source_rect;
         popPc.sourceView = label;
+        
+//        popPc.barButtonItem = label;
         popPc.delegate = self;
         
         
@@ -459,6 +478,7 @@ const int delta = 25;
         
         int width = [arr_col[i][@"width"] intValue];
         UILabel *headerlabel = [[UILabel alloc] initWithFrame:CGRectMake(x, y, width, height)];
+        headerlabel.font = [UIFont boldSystemFontOfSize:self.default_title_text_size];
         headerlabel.textColor=UIColorFromRGB(fcolor);//UIColor.blackColor;
         headerlabel.backgroundColor = [UIColor clearColor];
         headerlabel.text=arr_col[i][@"name"];
@@ -467,7 +487,8 @@ const int delta = 25;
         headerlabel.font = [UIFont boldSystemFontOfSize:20];
         //        [headerlabel sizeToFit];
         
-        headerlabel.layer.borderWidth=0.3;
+        headerlabel.layer.borderWidth=0.5;
+        headerlabel.layer.borderColor = UIColorFromRGB(self.default_line_color).CGColor;
         [myView addSubview:headerlabel];
         x+=width;
     }
@@ -600,6 +621,7 @@ const int delta = 25;
             
             int width = [arr_col[i][@"width"] intValue];;
             MDHTMLLabel *vallabel = [[MDHTMLLabel alloc] initWithFrame:CGRectMake(x, y, width, height)];
+            vallabel.font = [UIFont systemFontOfSize:self.default_row_text_size];
             vallabel.textColor=UIColorFromRGB(fcolor);//UIColor.blackColor;
             vallabel.backgroundColor = [UIColor clearColor];
             
@@ -623,6 +645,7 @@ const int delta = 25;
             vallabel.textAlignment= [self get_TextHAlign:arr_col[i][@"h_align"] ];
             
             vallabel.layer.borderWidth=0.3;
+            vallabel.layer.borderColor = UIColorFromRGB(self.default_line_color).CGColor;
             
            // UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(labelTapAction:)];