Răsfoiți Sursa

Apex Mobile

新的kv cell
Ray Zhang 8 ani în urmă
părinte
comite
bcb50fc302

+ 6 - 0
Apex Mobile/Apex Mobile.xcodeproj/project.pbxproj

@@ -27,6 +27,7 @@
 		427CF5E6202454750041472A /* GoogleMapsBase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 427CF5E3202454750041472A /* GoogleMapsBase.framework */; };
 		427CF5E7202454750041472A /* GoogleMapsCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 427CF5E4202454750041472A /* GoogleMapsCore.framework */; };
 		427CF5E9202454860041472A /* GoogleMaps.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 427CF5E8202454860041472A /* GoogleMaps.bundle */; };
+		7101BEC82031389A00CC6E3A /* DetailCellKVNew.m in Sources */ = {isa = PBXBuildFile; fileRef = 7101BEC72031389A00CC6E3A /* DetailCellKVNew.m */; };
 		711BA6C1191E0525002EDE6F /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 711BA6C0191E0525002EDE6F /* MessageViewController.m */; };
 		711BA6C4191E0553002EDE6F /* MessageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 711BA6C3191E0553002EDE6F /* MessageItem.m */; };
 		711DC6B218C30A4800FB1749 /* TableCellEdit.m in Sources */ = {isa = PBXBuildFile; fileRef = 711DC6B118C30A4800FB1749 /* TableCellEdit.m */; };
@@ -197,6 +198,8 @@
 		427CF5E3202454750041472A /* GoogleMapsBase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMapsBase.framework; sourceTree = "<group>"; };
 		427CF5E4202454750041472A /* GoogleMapsCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMapsCore.framework; sourceTree = "<group>"; };
 		427CF5E8202454860041472A /* GoogleMaps.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = GoogleMaps.bundle; path = GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle; sourceTree = "<group>"; };
+		7101BEC62031389A00CC6E3A /* DetailCellKVNew.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetailCellKVNew.h; sourceTree = "<group>"; };
+		7101BEC72031389A00CC6E3A /* DetailCellKVNew.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DetailCellKVNew.m; sourceTree = "<group>"; };
 		711BA6BF191E0525002EDE6F /* MessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageViewController.h; sourceTree = "<group>"; };
 		711BA6C0191E0525002EDE6F /* MessageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageViewController.m; sourceTree = "<group>"; };
 		711BA6C2191E0553002EDE6F /* MessageItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageItem.h; sourceTree = "<group>"; };
@@ -686,6 +689,8 @@
 			children = (
 				71807B9A2021979A00E1F1DD /* DetailCellTracking.h */,
 				71807B9B2021979A00E1F1DD /* DetailCellTracking.m */,
+				7101BEC62031389A00CC6E3A /* DetailCellKVNew.h */,
+				7101BEC72031389A00CC6E3A /* DetailCellKVNew.m */,
 			);
 			name = detail;
 			sourceTree = "<group>";
@@ -1215,6 +1220,7 @@
 				425CF096201EB2B500750E32 /* JLRefreshFooter.m in Sources */,
 				715643C12019B27500B04267 /* HomeViewController.m in Sources */,
 				715643C72019BB6700B04267 /* StaticModelistViewController.m in Sources */,
+				7101BEC82031389A00CC6E3A /* DetailCellKVNew.m in Sources */,
 				71E0D1D82022AB7E009A08EB /* ResultViewController.m in Sources */,
 				7157098E2021572600EFE5C5 /* NetworkUtils.m in Sources */,
 				719EF8F118BB839F00EFFF5F /* AppDelegate.m in Sources */,

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


+ 50 - 0
Apex Mobile/Apex Mobile.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,4 +2,54 @@
 <Bucket
    type = "1"
    version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/DetailPageViewController.m"
+            timestampString = "540101584.705524"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "787"
+            endingLineNumber = "787"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Apex Mobile/DetailPageViewController.m"
+            timestampString = "540101584.70588"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "786"
+            endingLineNumber = "786"
+            landmarkName = "-tableView:cellForRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m"
+            timestampString = "540101584.7059799"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "419"
+            endingLineNumber = "419"
+            landmarkName = "-setHtmlText:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
 </Bucket>

+ 18 - 0
Apex Mobile/Apex Mobile/DetailCellKVNew.h

@@ -0,0 +1,18 @@
+//
+//  DetailCellKVNew.h
+//  Apex Mobile
+//
+//  Created by Ray on 12/02/2018.
+//  Copyright © 2018 United Software Applications, Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "MDHTMLLabel.h"
+#import "LineView.h"
+@interface DetailCellKVNew : UITableViewCell
+
+@property (weak, nonatomic) IBOutlet MDHTMLLabel *keyLabel;
+@property (weak, nonatomic) IBOutlet MDHTMLLabel *valLabel;
+@property (weak, nonatomic) IBOutlet LineView *lineView;
+
+@end

+ 24 - 0
Apex Mobile/Apex Mobile/DetailCellKVNew.m

@@ -0,0 +1,24 @@
+//
+//  DetailCellKVNew.m
+//  Apex Mobile
+//
+//  Created by Ray on 12/02/2018.
+//  Copyright © 2018 United Software Applications, Inc. All rights reserved.
+//
+
+#import "DetailCellKVNew.h"
+
+@implementation DetailCellKVNew
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+@end

+ 127 - 106
Apex Mobile/Apex Mobile/DetailPageViewController.m

@@ -15,6 +15,7 @@
 #import "TabBarController.h"
 #import "DetailCellTracking.h"
 #import <QuickLook/QuickLook.h>
+#import "DetailCellKVNew.h"
 
 @interface DetailPageViewController () <QLPreviewControllerDataSource,QLPreviewControllerDelegate>
 
@@ -773,118 +774,138 @@
     }
     else if([type isEqualToString:@"mapping"])
     {
-        float width = tableView.frame.size.width;
         
-        width-=CELL_MARGIN*2;
-        CGSize constraintkey = CGSizeMake(width*0.4-2*LABEL_MARGIN, 20000.0f);//key label width is 40% cell width;
-        CGSize constraintval = CGSizeMake(width*0.6-2*LABEL_MARGIN, 20000.0f);//val label width is 60% cell width;
+        NSString *CellIdentifier = @"detail_item_kvnew";
+        DetailCellKVNew *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
         NSDictionary* item = [self.content get_item_seg:indexPath.section row:indexPath.row];
-        NSString* key =[item allKeys][0];
-        //   [cell.keyLabel sizeToFit];
-        NSString* val=[item valueForKey:key];
-        if([val isEqual:[NSNull null]])
-            val=@"";
-        if(val==nil)
-            val=@"";
-        if([val isEqualToString:@"null"])
-            val=@"";
+                NSString* key =[item allKeys][0];
+                //   [cell.keyLabel sizeToFit];
+                NSString* val=[item valueForKey:key];
         
+
+        cell.keyLabel.text = key;
+        cell.valLabel.htmlText = val;
         
+        NSLog(@"key %@ val %@",key,val);
         
-        
-        CGRect frame;
-        frame.size = constraintval;
-        frame.origin.x=0;
-        frame.origin.y=0;
-        RTLabel* rtlabel = [[RTLabel alloc] initWithFrame:frame];
-        [rtlabel setLineBreakMode: RTTextLineBreakModeWordWrapping];
-        //        rtlabel.lineSpacing = 20.0;
-        [rtlabel setText: val];
-        CGSize sizeval=rtlabel.optimumSize;
-        CGSize sizekey = [key sizeWithFont:[UIFont systemFontOfSize:17.0] constrainedToSize:constraintkey lineBreakMode:NSLineBreakByWordWrapping];
-        //        CGSize sizeval = [val sizeWithFont:[UIFont systemFontOfSize:17.0] constrainedToSize:constraintval lineBreakMode:NSLineBreakByWordWrapping];
-//          DebugLog(@"tableView width:%f",width);
-//        
-//          DebugLog(@"key width= %f val width = %f",constraintkey.width,constraintval.width);
-//          DebugLog(@"key = %@ val = %@",key,val);
-        float height = MAX(sizekey.height,sizeval.height);
-        height = MAX(height, DEF_CELL_HEIGHT-LINE_WIDTH);
-        sizekey.height = height;
-        sizekey.width = constraintkey.width;
-       // sizeval.height = height;
-        sizeval.width =constraintval.width;
-        
-        NSString *CellIdentifier = @"detail_item_kv";
-        DetailCellKV *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
-        if(cell==nil)
-              DebugLog(@"cell is nil.........................");
-        
-        
-        //        CGRect framekey ;
-        //        framekey.origin.x=CELL_MARGIN;
-        //        framekey.origin.y=LINE_WIDTH;
-        //        framekey.size = sizekey;
-        //        UILabel* keyLabel = [[UILabel alloc]initWithFrame:framekey];
-        //        keyLabel.lineBreakMode = NSLineBreakByWordWrapping;
-        //        keyLabel.backgroundColor = [UIColor grayColor];
-        //        keyLabel.text = key;
-        //
-        //        CGRect frameval;
-        //        frameval.origin.x=constraintkey.width+CELL_MARGIN;
-        //        frameval.origin.y=LINE_WIDTH;
-        //        frameval.size = sizeval;
-        //
-        //        UILabel* valLabel = [[UILabel alloc]initWithFrame:frameval];
-        //         valLabel.lineBreakMode = NSLineBreakByWordWrapping;
-        //        valLabel.text = val;
-        //
-        //        for(UIView* v in cell.contentView.subviews)
-        //        {
-        //            [v removeFromSuperview];
-        //
-        //        }
-        //
-        //        [cell.contentView addSubview:keyLabel];
-        //        [cell.contentView addSubview:valLabel];
-        
-        
-        CGRect framekey = cell.keyLabel.frame;
-        framekey.origin.x=CELL_MARGIN+LABEL_MARGIN;
-        framekey.origin.y=LINE_WIDTH;
-        framekey.size = sizekey;
-        cell.keyLabel.frame = framekey;
-        cell.keyLabel.text=key;
-        CGRect frameval = cell.valLabel.frame;
-        frameval.origin.x=constraintkey.width+CELL_MARGIN+3*LABEL_MARGIN; //2 margin for key 1 margin for value self
-        frameval.origin.y=LINE_WIDTH;
-        frameval.size = sizeval;
-        cell.valLabel.frame = frameval;
-        //        [cell.valLabel setTextAlignment:RTTextAlignmentCenter];
-        cell.valLabel.text= val;
-        CGPoint rcenter;
-        rcenter.x = width * 0.4+width * 0.6/2;
-        rcenter.y = height /2;
-        cell.valLabel.center=rcenter;
-//        cell.valLabel.backgroundColor =[UIColor redColor];
-        
-//        cell.contentView.superview.backgroundColor = [UIColor clearColor];
-//        cell.backgroundColor = [UIColor whiteColor];
-        UIView * lineview = [[LineView alloc] initWithFrame:cell.contentView.frame];
-        lineview.userInteractionEnabled = NO;// 不设为NO会屏蔽cell的点击事件
-        lineview.backgroundColor = [UIColor clearColor];// 设为透明从而使得cell.backgroundColor有效.
-        lineview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-        [cell.contentView addSubview:lineview];// cell.contentView是个readonly属性,所以别想着替换contentView了.
-
-        
-        
-        //   [cell.valLabel sizeToFit];
-        //        cell.anameLabel.text = [field valueForKey:@"aname"];
-        //        [cell.anameLabel sizeToFit];
-        //          DebugLog(@"cellForRowAtIndexPath%@",[field valueForKey:@"aname"]);
-        // Configure the cell...
-        //        CGRect rect = cell.frame;
-        //        [self.content set_itemheight:100 AtIndexPath:indexPath];
+//                UIView * lineview = [[LineView alloc] initWithFrame:cell.contentView.frame];
+//                lineview.userInteractionEnabled = NO;// 不设为NO会屏蔽cell的点击事件
+//                lineview.backgroundColor = [UIColor clearColor];// 设为透明从而使得cell.backgroundColor有效.
+//                lineview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+//                [cell.contentView addSubview:lineview];// cell.contentView是个readonly属性,所以别想着替换contentView了.
         return cell;
+//        float width = tableView.frame.size.width;
+//
+//        width-=CELL_MARGIN*2;
+//        CGSize constraintkey = CGSizeMake(width*0.4-2*LABEL_MARGIN, 20000.0f);//key label width is 40% cell width;
+//        CGSize constraintval = CGSizeMake(width*0.6-2*LABEL_MARGIN, 20000.0f);//val label width is 60% cell width;
+//        NSDictionary* item = [self.content get_item_seg:indexPath.section row:indexPath.row];
+//        NSString* key =[item allKeys][0];
+//        //   [cell.keyLabel sizeToFit];
+//        NSString* val=[item valueForKey:key];
+//        if([val isEqual:[NSNull null]])
+//            val=@"";
+//        if(val==nil)
+//            val=@"";
+//        if([val isEqualToString:@"null"])
+//            val=@"";
+//
+//
+//
+//
+//        CGRect frame;
+//        frame.size = constraintval;
+//        frame.origin.x=0;
+//        frame.origin.y=0;
+//        RTLabel* rtlabel = [[RTLabel alloc] initWithFrame:frame];
+//        [rtlabel setLineBreakMode: RTTextLineBreakModeWordWrapping];
+//        //        rtlabel.lineSpacing = 20.0;
+//        [rtlabel setText: val];
+//        CGSize sizeval=rtlabel.optimumSize;
+//        CGSize sizekey = [key sizeWithFont:[UIFont systemFontOfSize:17.0] constrainedToSize:constraintkey lineBreakMode:NSLineBreakByWordWrapping];
+//        //        CGSize sizeval = [val sizeWithFont:[UIFont systemFontOfSize:17.0] constrainedToSize:constraintval lineBreakMode:NSLineBreakByWordWrapping];
+////          DebugLog(@"tableView width:%f",width);
+////
+////          DebugLog(@"key width= %f val width = %f",constraintkey.width,constraintval.width);
+////          DebugLog(@"key = %@ val = %@",key,val);
+//        float height = MAX(sizekey.height,sizeval.height);
+//        height = MAX(height, DEF_CELL_HEIGHT-LINE_WIDTH);
+//        sizekey.height = height;
+//        sizekey.width = constraintkey.width;
+//       // sizeval.height = height;
+//        sizeval.width =constraintval.width;
+//
+//        NSString *CellIdentifier = @"detail_item_kv";
+//        DetailCellKV *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
+//        if(cell==nil)
+//              DebugLog(@"cell is nil.........................");
+//
+//
+//        //        CGRect framekey ;
+//        //        framekey.origin.x=CELL_MARGIN;
+//        //        framekey.origin.y=LINE_WIDTH;
+//        //        framekey.size = sizekey;
+//        //        UILabel* keyLabel = [[UILabel alloc]initWithFrame:framekey];
+//        //        keyLabel.lineBreakMode = NSLineBreakByWordWrapping;
+//        //        keyLabel.backgroundColor = [UIColor grayColor];
+//        //        keyLabel.text = key;
+//        //
+//        //        CGRect frameval;
+//        //        frameval.origin.x=constraintkey.width+CELL_MARGIN;
+//        //        frameval.origin.y=LINE_WIDTH;
+//        //        frameval.size = sizeval;
+//        //
+//        //        UILabel* valLabel = [[UILabel alloc]initWithFrame:frameval];
+//        //         valLabel.lineBreakMode = NSLineBreakByWordWrapping;
+//        //        valLabel.text = val;
+//        //
+//        //        for(UIView* v in cell.contentView.subviews)
+//        //        {
+//        //            [v removeFromSuperview];
+//        //
+//        //        }
+//        //
+//        //        [cell.contentView addSubview:keyLabel];
+//        //        [cell.contentView addSubview:valLabel];
+//
+//
+//        CGRect framekey = cell.keyLabel.frame;
+//        framekey.origin.x=CELL_MARGIN+LABEL_MARGIN;
+//        framekey.origin.y=LINE_WIDTH;
+//        framekey.size = sizekey;
+//        cell.keyLabel.frame = framekey;
+//        cell.keyLabel.text=key;
+//        CGRect frameval = cell.valLabel.frame;
+//        frameval.origin.x=constraintkey.width+CELL_MARGIN+3*LABEL_MARGIN; //2 margin for key 1 margin for value self
+//        frameval.origin.y=LINE_WIDTH;
+//        frameval.size = sizeval;
+//        cell.valLabel.frame = frameval;
+//        //        [cell.valLabel setTextAlignment:RTTextAlignmentCenter];
+//        cell.valLabel.text= val;
+//        CGPoint rcenter;
+//        rcenter.x = width * 0.4+width * 0.6/2;
+//        rcenter.y = height /2;
+//        cell.valLabel.center=rcenter;
+////        cell.valLabel.backgroundColor =[UIColor redColor];
+//
+////        cell.contentView.superview.backgroundColor = [UIColor clearColor];
+////        cell.backgroundColor = [UIColor whiteColor];
+//        UIView * lineview = [[LineView alloc] initWithFrame:cell.contentView.frame];
+//        lineview.userInteractionEnabled = NO;// 不设为NO会屏蔽cell的点击事件
+//        lineview.backgroundColor = [UIColor clearColor];// 设为透明从而使得cell.backgroundColor有效.
+//        lineview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+//        [cell.contentView addSubview:lineview];// cell.contentView是个readonly属性,所以别想着替换contentView了.
+//
+//
+//
+//        //   [cell.valLabel sizeToFit];
+//        //        cell.anameLabel.text = [field valueForKey:@"aname"];
+//        //        [cell.anameLabel sizeToFit];
+//        //          DebugLog(@"cellForRowAtIndexPath%@",[field valueForKey:@"aname"]);
+//        // Configure the cell...
+//        //        CGRect rect = cell.frame;
+//        //        [self.content set_itemheight:100 AtIndexPath:indexPath];
+//        return cell;
     }
     else
     {

+ 51 - 7
Apex Mobile/Apex Mobile/Main.storyboard

@@ -180,7 +180,7 @@
                                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                         <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/>
                                     </textField>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vvk-xp-NJf">
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vvk-xp-NJf">
                                         <rect key="frame" x="317" y="104" width="38" height="30"/>
                                         <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
                                         <state key="normal" title="Login">
@@ -230,7 +230,7 @@
                                 <inset key="insetFor6xAndEarlier" minX="0.0" minY="40" maxX="0.0" maxY="-40"/>
                             </imageView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hzc-kg-csR">
-                                <rect key="frame" x="187" y="426.5" width="172" height="30"/>
+                                <rect key="frame" x="183" y="426.5" width="172" height="30"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="172" id="1Td-rT-95c"/>
                                 </constraints>
@@ -242,9 +242,9 @@
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstAttribute="trailing" secondItem="Hzc-kg-csR" secondAttribute="trailing" constant="16" id="1Ug-M1-2wb"/>
                             <constraint firstItem="Hzc-kg-csR" firstAttribute="top" secondItem="vvk-xp-NJf" secondAttribute="bottom" constant="24" id="Fha-yZ-KoM"/>
                             <constraint firstItem="zKh-Ur-Gus" firstAttribute="top" secondItem="Fgn-Jb-we3" secondAttribute="bottom" constant="29" id="NCe-W2-EeK"/>
+                            <constraint firstItem="Hzc-kg-csR" firstAttribute="trailing" secondItem="O5q-tH-vch" secondAttribute="trailing" id="QQT-w5-bCg"/>
                             <constraint firstItem="zKh-Ur-Gus" firstAttribute="centerX" secondItem="lHV-oi-ARt" secondAttribute="centerX" id="de4-gF-h5y"/>
                             <constraint firstItem="OnO-n9-f7N" firstAttribute="width" secondItem="lHV-oi-ARt" secondAttribute="width" id="jGj-UK-dEj"/>
                             <constraint firstItem="OnO-n9-f7N" firstAttribute="centerY" secondItem="lHV-oi-ARt" secondAttribute="centerY" id="raF-GG-xW9"/>
@@ -1630,15 +1630,23 @@
                                             <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
-                                                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fv6-ui-cri">
-                                                    <rect key="frame" x="20" y="11" width="280" height="21"/>
-                                                    <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                                                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fv6-ui-cri">
+                                                    <rect key="frame" x="15" y="11" width="345" height="20.5"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="345" id="fXi-qE-V7M"/>
+                                                    </constraints>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                             </subviews>
+                                            <constraints>
+                                                <constraint firstItem="Fv6-ui-cri" firstAttribute="top" secondItem="q9z-Ac-77Z" secondAttribute="top" constant="11" id="5tm-gs-Z7s"/>
+                                                <constraint firstAttribute="trailing" secondItem="Fv6-ui-cri" secondAttribute="trailing" constant="15" id="OGl-aF-J0a"/>
+                                                <constraint firstAttribute="bottom" secondItem="Fv6-ui-cri" secondAttribute="bottom" constant="12" id="dG3-li-ZuZ"/>
+                                                <constraint firstItem="Fv6-ui-cri" firstAttribute="leading" secondItem="q9z-Ac-77Z" secondAttribute="leading" constant="15" id="rTY-Cx-nhs"/>
+                                            </constraints>
                                         </tableViewCellContentView>
-                                        <color key="backgroundColor" red="0.9452269673" green="0.9452269673" blue="0.9452269673" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="backgroundColor" cocoaTouchSystemColor="tableCellGroupedBackgroundColor"/>
                                         <connections>
                                             <outlet property="listLabel" destination="Fv6-ui-cri" id="ee6-GK-EOJ"/>
                                         </connections>
@@ -1691,6 +1699,42 @@
                                             <outlet property="webView" destination="a2k-TN-pCa" id="lN3-e4-97T"/>
                                         </connections>
                                     </tableViewCell>
+                                    <tableViewCell tag="1" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="detail_item_kvnew" rowHeight="44" id="QcB-cx-iPf" customClass="DetailCellKVNew">
+                                        <rect key="frame" x="0.0" y="371.5" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QcB-cx-iPf" id="kRE-Nt-r6F">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FbJ-O5-B1Q" customClass="LineView">
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                    <subviews>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Vu-9P-I7w" customClass="MDHTMLLabel">
+                                                            <rect key="frame" x="160" y="8" width="200" height="28"/>
+                                                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vER-xh-qBc" customClass="MDHTMLLabel">
+                                                            <rect key="frame" x="15" y="8" width="108" height="28"/>
+                                                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES"/>
+                                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                    </subviews>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                </view>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="keyLabel" destination="vER-xh-qBc" id="EZn-Qk-E8R"/>
+                                            <outlet property="lineView" destination="FbJ-O5-B1Q" id="EdL-U7-MiU"/>
+                                            <outlet property="valLabel" destination="0Vu-9P-I7w" id="n6H-N3-hy1"/>
+                                        </connections>
+                                    </tableViewCell>
                                 </prototypes>
                                 <connections>
                                     <outlet property="dataSource" destination="Soi-pH-xW6" id="fR8-eB-8kp"/>

+ 1 - 1
Apex Mobile/Apex Mobile/config.h

@@ -12,7 +12,7 @@
 
 # ifdef DEBUG
 
-#define test_server
+//#define test_server
 
 # endif
 

+ 3 - 0
RedAnt ERP Mobile/common/customUI/MDHTMLLabel.m

@@ -413,6 +413,9 @@ static inline CGSize CTFramesetterSuggestFrameSizeForAttributedStringWithConstra
 
 - (void)setHtmlText:(NSString *)htmlText
 {
+    
+//    if(![[htmlText class] isKindOfClass:[NSString class]])
+//        htmlText=nil;
     if ([_htmlText isEqualToString:htmlText])
     {
         return;

+ 1 - 1
common/NetworkUtils.m

@@ -142,7 +142,7 @@ repeat:
         NSHTTPURLResponse* urlResponse = nil;
         
         NSError *error = nil;
-        NSLog(@"begin request");
+        NSLog(@"begin request %@",url);
 
         NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&error];