瀏覽代碼

Redant Mobile

修复 commoneditor webcell 加载刷新异常
修复 commoneditor section hide 刷新异常
Ray Zhang 8 年之前
父節點
當前提交
4758cc1f32

+ 124 - 38
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -1414,37 +1414,45 @@
 }
 -(NSMutableArray*) translate_json: (NSDictionary*) injson changed:(NSDictionary*) changed_value
 {
-    if(injson == nil)
-        return nil;
     
-    NSMutableArray * retarray= [[NSMutableArray alloc]init];
-    
-    int section_count=[[injson valueForKey:@"section_count"] intValue];
-    
-    for(int i=0;i<section_count;i++)
+    @synchronized(self)
     {
-        NSMutableArray * sectionarr= [[NSMutableArray alloc]init];
+        if(injson == nil)
+            return nil;
         
-        NSMutableDictionary * sectionjson = [[injson objectForKey:[NSString stringWithFormat:@"section_%d",i ]] mutableCopy];
-        int item_count = [[sectionjson valueForKey:@"count"] intValue];
-        for(int j=0;j<item_count;j++)
+        NSMutableArray * retarray= [[NSMutableArray alloc]init];
+        
+        int section_count=[[injson valueForKey:@"section_count"] intValue];
+        
+        for(int i=0;i<section_count;i++)
         {
-            NSMutableDictionary * itemjson=[[sectionjson objectForKey:[NSString stringWithFormat:@"item_%d",j ]] mutableCopy];
-            [sectionarr addObject:itemjson];
-            [self add_subitem:itemjson addto:sectionarr parent:[NSString stringWithFormat:@"%d_%d",i,j ]];
-            //                [itemjson setObject:cadedatejson forKey:@"cadedate"];
-            //                NSMutableDictionary * cadedatejson=[[itemjson objectForKey:@"cadedate"] mutableCopy];
-            
-            //            [sectionjson setObject:itemjson forKey:[NSString stringWithFormat:@"item_%d",j ]];
+            NSMutableArray * sectionarr= [[NSMutableArray alloc]init];
             
+            NSMutableDictionary * sectionjson = [[injson objectForKey:[NSString stringWithFormat:@"section_%d",i ]] mutableCopy];
+            int item_count = [[sectionjson valueForKey:@"count"] intValue];
+            for(int j=0;j<item_count;j++)
+            {
+                NSMutableDictionary * itemjson=[[sectionjson objectForKey:[NSString stringWithFormat:@"item_%d",j ]] mutableCopy];
+                [sectionarr addObject:itemjson];
+                [self add_subitem:itemjson addto:sectionarr parent:[NSString stringWithFormat:@"%d_%d",i,j ]];
+                //                [itemjson setObject:cadedatejson forKey:@"cadedate"];
+                //                NSMutableDictionary * cadedatejson=[[itemjson objectForKey:@"cadedate"] mutableCopy];
+                
+                //            [sectionjson setObject:itemjson forKey:[NSString stringWithFormat:@"item_%d",j ]];
+                
+            }
+            //        [sectionjson setValue:[NSString stringWithFormat:@"%d",item_count ] forKey:@"count"];
+            //        [retjson setObject:sectionjson forKey:[NSString stringWithFormat:@"section_%d",i ]];
+            [retarray addObject:sectionarr];
         }
-        //        [sectionjson setValue:[NSString stringWithFormat:@"%d",item_count ] forKey:@"count"];
-        //        [retjson setObject:sectionjson forKey:[NSString stringWithFormat:@"section_%d",i ]];
-        [retarray addObject:sectionarr];
+        
+        NSLog(@"content control count = %d",retarray.count);
+        return retarray;
+        //    retjson setObject:sec forKey:<#(id<NSCopying>)#>
+        //    return nil;
     }
-    return retarray;
-    //    retjson setObject:sec forKey:<#(id<NSCopying>)#>
-    //    return nil;
+
+    
 }
 
 /*
@@ -2384,8 +2392,8 @@
     self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
     NSRange range = NSMakeRange(sender.tag, 1);
     NSIndexSet *sectionToReload = [NSIndexSet indexSetWithIndexesInRange:range];
-    [self.editorTable reloadSections:sectionToReload withRowAnimation:UITableViewRowAnimationAutomatic];
-    
+//    [self.editorTable reloadSections:sectionToReload withRowAnimation:UITableViewRowAnimationAutomatic];
+    [self.editorTable reloadData];
     
     
 }
@@ -2590,6 +2598,8 @@
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
 {
     
+    NSLog(@"numberOfSectionsInTableView  = %d",self.content_data_control.count);
+    
     //    if(self.content_data_control.count>0)
     //        return 1;
     return self.content_data_control.count;
@@ -2705,6 +2715,9 @@
         else if ([control isEqualToString:@"webview"]) {
             id h_obj = [item_json objectForKey:@"height"];
             CGFloat height = [h_obj floatValue];
+            
+            if(height<44)
+                height=44;
             return height;
         }
         
@@ -3994,9 +4007,22 @@
         }
         else if ([control isEqualToString:@"webview"]) {
             
-            CommonEditorWebCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CommonEditorWebCell" forIndexPath:indexPath];
+//            CommonEditorWebCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CommonEditorWebCell" forIndexPath:indexPath];
+            
+            CommonEditorWebCell * cell = [[NSBundle mainBundle] loadNibNamed:@"Phone_Web_Cell" owner:nil options:nil].firstObject;
+
+            
+
             cell.webDelegate = self;
             NSString *html_str = [item_json objectForKey:@"value"];
+            
+
+            
+//            NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[html_str dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
+//
+//            cell.htmlLabel.attributedText = attrStr;
+            
+        //    [cell.webview stopLoading];
             [cell.webview loadHTMLString:html_str baseURL:nil];
 //            [cell.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.baidu.com/"]]];
             
@@ -5953,35 +5979,95 @@
 #pragma mark - WebCell Delegate
 
 - (void)commonEditorWebCell:(CommonEditorWebCell *)cell didChangeContentHeight:(CGFloat)contentHeight {
+    
+//    return;
+    
     NSIndexPath *indexPath = [self.editorTable indexPathForCell:cell];
     if (indexPath == nil) {
         return;
     }
     
     
+    NSMutableDictionary* section_json=nil;
+    
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
+    
+    NSString* subid=[item_json valueForKey:@"subid"];
+    
     NSString* control = [item_json valueForKey:@"control"];
     id height_obj = [item_json objectForKey:@"height"];
     
-    NSLog(@"indexPath: %@ origin height: %@ currentHeight: %f",indexPath,height_obj,contentHeight);
+//    NSLog(@"indexPath: %@ origin height: %@ currentHeight: %f",indexPath,height_obj,contentHeight);
     
-    if ([control isEqualToString:@"webview"] && [height_obj floatValue] != contentHeight) {
-        // 更新数据
-        [item_json setObject:@(contentHeight) forKey:@"height"];
-        
-        NSMutableDictionary *section_json = [[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]] mutableCopy];
-        [section_json setObject:item_json  forKey:[NSString stringWithFormat:@"item_%ld",indexPath.row]];
-        [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
-        self.content_data_control = [self translate_json:self.content_data_download changed: self.changed_data];
+    if ([control isEqualToString:@"webview"] && [height_obj floatValue] != contentHeight)
+    {
+         [item_json setValue:@(contentHeight) forKey:@"height"];
+        if(subid==nil)
+        {
+            section_json = [[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]] mutableCopy];
+            int count=0;
+            
+            count=[[section_json valueForKey:@"count"] intValue];
+            
+            for(int i=0;i<count;i++)
+            {
+                NSDictionary * olditem=[section_json objectForKey:[NSString stringWithFormat:@"item_%d",i ]];
+                if([[olditem valueForKey:@"name"] isEqualToString:[item_json valueForKey:@"name" ]])
+                    [section_json setObject:item_json  forKey:[NSString stringWithFormat:@"item_%d",i ]];
+                
+                
+            }
+            
+            
+            [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
+            self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
+        }
+//        else
+//        {
+//            NSArray* idarr=[subid componentsSeparatedByString:@"_"];
+//            int section = [(NSString*)idarr[0] intValue];
+//            int item=[(NSString*)idarr[1] intValue];
+//
+//
+//            section_json = [[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%d", section]] mutableCopy];
+//            NSDictionary * olditem=[section_json objectForKey:[NSString stringWithFormat:@"item_%d",item ]];
+//
+//            NSString* control_type= [olditem valueForKey:@"control"];
+//            NSMutableDictionary* new_item=nil;
+////            [item_json setValue:@"true" forKey:@"dirty"];
+//            if([control_type isEqualToString:@"enum"])
+//                new_item= [self enum_subitem_changed:[olditem mutableCopy] subid:idarr value:item_json step:2];
+//            else if([control_type isEqualToString:@"switch"])
+//                new_item= [self switch_subitem_changed:[olditem mutableCopy] subid:idarr value:item_json step:2];
+//
+//            [section_json setObject:new_item  forKey:[NSString stringWithFormat:@"item_%d",item ]];
+//
+//
+//            [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
+//            self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
+//        }
         
+//        // 更新数据
+//        [item_json setObject:@(contentHeight) forKey:@"height"];
+//
+//        NSMutableDictionary *section_json = [[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]] mutableCopy];
+//        [section_json setObject:item_json  forKey:[NSString stringWithFormat:@"item_%ld",indexPath.row]];
+//        [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
+//        self.content_data_control = [self translate_json:self.content_data_download changed: self.changed_data];
+//
 //        // 调用 tableView 的 beginUpdates 和 endUpdates,更新 cell 的高度
 //        [self.editorTable beginUpdates];
 //        [self.editorTable endUpdates];
         
+      dispatch_async(dispatch_get_main_queue(), ^{
+            // UI更新代码
+
+          [self.editorTable reloadData];
+            //[self.editorTable reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
+           });
         
-        [self.editorTable reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
     }
-    
+ 
 }
 
 @end

+ 1 - 0
RedAnt ERP Mobile/common/CommonEditor/CommonEditorWebCell.h

@@ -19,5 +19,6 @@
 
 @property (nonatomic,weak) id<CommonEditorWebCellDelegate> webDelegate;
 @property (strong, nonatomic) IBOutlet UIWebView *webview;
+@property (weak, nonatomic) IBOutlet UILabel *htmlLabel;
 
 @end

+ 5 - 3
RedAnt ERP Mobile/common/CommonEditor/CommonEditorWebCell.m

@@ -41,14 +41,14 @@
 }
 
 - (void)dealloc {
-    [self removeObserver:self forKeyPath:@"self.webview.scrollView.frame"];
+//    [self removeObserver:self forKeyPath:@"self.webview.scrollView.frame"];
 }
 
 - (void)setup {
     self.webview.scrollView.bounces=NO;
     self.webview.scrollView.directionalLockEnabled = true;
     
-    [self addObserver:self forKeyPath:@"self.webview.scrollView.frame" options:NSKeyValueObservingOptionNew context:nil];
+//    [self addObserver:self forKeyPath:@"self.webview.scrollView.frame" options:NSKeyValueObservingOptionNew context:nil];
 }
 
 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {
@@ -61,6 +61,8 @@
 
 - (void)updateContentHeight {
     
+    
+//    return;
     NSString *h_str = [self.webview stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight;"];
     float h = [h_str floatValue];
     
@@ -75,7 +77,7 @@
 }
 
 - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
-    [self updateContentHeight];
+//    [self updateContentHeight];
 }
 
 @end

+ 2 - 2
RedAnt ERP Mobile/common/CommonEditor/Phone_Web_Cell.xib

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

+ 364 - 0
RedAnt Mobile/DefaultAppearance.m

@@ -7,14 +7,378 @@
 //
 
 #import "DefaultAppearance.h"
+#import "LoginViewController.h"
+//#import "CategoryCellNPD.h"
+//#import "CategoryHeaderView.h"
+#import "DefaultTableHeaderView.h"
+//#import "CategoryCellSmall.H"
+//#import "ModelItemCell.h"
+//#import "PDFListTableViewCell.h"
+//#import "ContactListTableViewCell.h"
+//#import "CategoryCellNPD.h"
+#import "CommonEditorCellMAction.h"
+//#import "DefaultImageButton.h"
+//#import "OrderListTableViewCell.h"
+#import "CommonEditorCellModel.h"
+//#import "BundleDetailButton.h"
 
 @implementation DefaultAppearance
 +(void)init_appearance
 {
     
+    [self load_appearance];
+    //gloable
+    //    [[UIButton appearance] setTitleColor:UIColorFromRGB(0x007aff) forState:UIControlStateNormal];
+    //
+    //    [[UIActivityIndicatorView appearance] setColor:UIColorFromRGB(0x007aff) ];
+    //
+    //    //category
+    //    [[CategoryCellNPD appearance].layer setBorderColor:[UIColor redColor].CGColor];
+    //    [[CategoryCellNPD appearance].layer setBorderWidth:0.5];
+    //
+    //
+    //
+    //    //cell.layer.borderWidth = 0.5;
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[CategoryHeaderView class]]] setTextColor:[UIColor darkGrayColor]];
+    //
+    //
+    //   // model detail
+    //
+    //    [[DefaultTableHeaderView appearance] setBackgroundColor:[UIColor lightGrayColor]];
+    ////
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[DefaultTableHeaderView class]]] setTextColor:[UIColor redColor]];
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[DefaultTableHeaderView class]]] setFont:[UIFont boldSystemFontOfSize:40]];
+    ////
+    //
+    //    [[CategoryCellSmall appearance] setBackgroundColor:[UIColor lightGrayColor]];
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[DefaultTableHeaderView class]]] setTextColor:[UIColor darkGrayColor]];
+    //    DefaultTableHeaderView* myView = [[DefaultTableHeaderView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 0.0001)];
+    // myView.backgroundColor =  UIColorFromRGB(0x996633);
+    
+    
+    // [[CategoryCellNPD.layer appearance]..borderColor = UIColorFromRGB(0x996633).CGColor];
+    //    [[LoginViewController appearance] setTitle:@"HMLG"];
+    
 }
 +(NSString*)get_noneappearance_value:(NSString*) control valuename:(NSString*)valuename
 {
+    NSData* json =[NSData dataWithContentsOfFile:[[NSBundle mainBundle]  pathForResource:@"default_appearance" ofType:@"json" ]];
+    if(json==nil)
+        return nil;
+    NSError *error=nil;
+    NSDictionary* appearance_json = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error][@"none_appearance"] ;
+    NSDictionary* setting_json = appearance_json[control];
+    NSString* value = setting_json[valuename];
+    return value;
+}
++(void)load_appearance
+{
+    NSData* json =[NSData dataWithContentsOfFile:[[NSBundle mainBundle]  pathForResource:@"default_appearance" ofType:@"json" ]];
+    NSError *error=nil;
+    if(json==nil)
+        return;
+    NSDictionary* appearance_json = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error][@"appearance"] ;
+    int count = [appearance_json[@"count"] intValue];
+    for(int i=0;i<count;i++)
+    {
+        NSString * group = [NSString stringWithFormat:@"group_%d",i];
+        NSDictionary* group_json = appearance_json[group];
+        int item_count = [group_json[@"count"] intValue];
+        for(int j=0;j<item_count;j++)
+        {
+            NSString * item = [NSString stringWithFormat:@"item_%d",j];
+            NSDictionary* item_json = group_json[item];
+            
+            
+            [self set_appearance_item:item_json];
+        }
+    }
+    
+}
++(id) get_appearance:(NSString*) control container:(NSDictionary*)container_json
+{
+    // json 中添加 control 类型必须在此函数中添加对应代码
+    if([control isEqualToString:@"UIButton"])
+    {
+        if(container_json==nil)
+            return [UIButton appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            
+            return [UIButton appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+    if([control isEqualToString:@"UISegmentedControl"])
+    {
+        if(container_json==nil)
+            return [UISegmentedControl appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [UISegmentedControl appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+    
+//    else if([control isEqualToString:@"BundleDetailButton"])
+//    {
+//        if(container_json==nil)
+//            return [BundleDetailButton appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [BundleDetailButton appearanceWhenContainedIn: arr_container.firstObject, nil];
+//        }
+//    }
+    
+    else if([control isEqualToString:@"UISearchBar"])
+    {
+        if(container_json==nil)
+            return [UISearchBar appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [UISearchBar appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+//    else if([control isEqualToString:@"DefaultImageButton"])
+//    {
+//        if(container_json==nil)
+//            return [DefaultImageButton appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [DefaultImageButton appearanceWhenContainedIn: arr_container.firstObject, nil];
+//        }
+//    }
+    
+    else if([control isEqualToString:@"UIActivityIndicatorView"])
+    {
+        if(container_json==nil)
+            return [UIActivityIndicatorView appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [UIActivityIndicatorView appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+//    else if([control isEqualToString:@"CategoryCellNPD"])
+//    {
+//        if(container_json==nil)
+//            return [CategoryCellNPD appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [CategoryCellNPD appearanceWhenContainedIn: arr_container.firstObject, nil];
+//        }
+//    }
+    else if([control isEqualToString:@"UILabel"])
+    {
+        if(container_json==nil)
+            return [UILabel appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [UILabel appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+    else if([control isEqualToString:@"DefaultTableHeaderView"])
+    {
+        if(container_json==nil)
+            return [DefaultTableHeaderView appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [DefaultTableHeaderView appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+//    else if([control isEqualToString:@"CategoryCellSmall"])
+//    {
+//        if(container_json==nil)
+//            return [CategoryCellSmall appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [CategoryCellSmall appearanceWhenContainedIn: arr_container.firstObject, nil];
+//        }
+//    }
+    else if([control isEqualToString:@"UIBarButtonItem"])
+    {
+        if(container_json==nil)
+            return [UIBarButtonItem appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [UIBarButtonItem appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
+    else if([control isEqualToString:@"UINavigationBar"])
+    {
+        if(container_json==nil)
+            return [UINavigationBar appearance];
+        else
+        {
+            NSArray* arr_container = [self appearance_container:container_json];
+            return [UINavigationBar appearanceWhenContainedIn: arr_container.firstObject, nil];
+        }
+    }
     return nil;
 }
++(void) set_appearance_item:(NSDictionary*) item_json
+{
+    NSDictionary* container_json= item_json[@"container"];
+    NSString* control = item_json[@"control"];
+    NSString* function = item_json[@"function"];
+    NSString* value = item_json[@"value"];
+    id appearance=[self get_appearance:control container:container_json];
+    [self appearance_function:appearance function:function value:value];
+}
++(void) appearance_function:(id)appearance function:(NSString*)function value:(NSString*)value
+{
+    // json 中添加 function 类型必须在此函数中添加对应代码
+    if([function isEqualToString:@"setTitleColor.Normal"])
+    {
+        if([value isEqualToString:@"#clearColor"])
+        {
+            [appearance setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
+        }
+        else
+        {
+            unsigned long color = strtoul([value UTF8String],0,16);
+            [appearance setTitleColor:UIColorFromRGB(color) forState:UIControlStateNormal];
+        }
+    }
+    if([function isEqualToString:@"autocapitalizationType"])
+    {
+        if([value isEqualToString:@"UITextAutocapitalizationTypeNone"])
+        {
+            [appearance setAutocapitalizationType:UITextAutocapitalizationTypeNone];
+        }
+        if([value isEqualToString:@"UITextAutocapitalizationTypeWords"])
+        {
+            [appearance setAutocapitalizationType:UITextAutocapitalizationTypeWords];
+        }
+        if([value isEqualToString:@"UITextAutocapitalizationTypeSentences"])
+        {
+            [appearance setAutocapitalizationType:UITextAutocapitalizationTypeSentences];
+        }
+        if([value isEqualToString:@"UITextAutocapitalizationTypeAllCharacters"])
+        {
+            [appearance setAutocapitalizationType:UITextAutocapitalizationTypeAllCharacters];
+        }
+        
+    }
+    else if([function isEqualToString:@"setColor"])
+    {
+        unsigned long color = strtoul([value UTF8String],0,16);
+        [appearance setColor:UIColorFromRGB(color) ];
+    }
+    //    else if([function isEqualToString:@"layer.BorderColor"])
+    //    {
+    //        unsigned long color = strtoul([value UTF8String],0,16);
+    //
+    //        [[appearance layer] setBorderColor:UIColorFromRGB(color).CGColor];
+    ////        [[appearance layer] setBorderColor:[UIColor redColor].CGColor];
+    //      //  [appearance.layer setBorderColor:[UIColor lightGrayColor].CGColor];
+    //       // [appearance setColor:UIColorFromRGB(color) ];
+    //    }
+    else if([function isEqualToString:@"setTextColor"])
+    {
+        unsigned long color = strtoul([value UTF8String],0,16);
+        [appearance setTextColor:UIColorFromRGB(color) ];
+    }
+    else if([function isEqualToString:@"setBackgroundColor"])
+    {
+        unsigned long color = strtoul([value UTF8String],0,16);
+        [appearance setBackgroundColor:UIColorFromRGB(color) ];
+    }
+    else if([function isEqualToString:@"TintColor"])
+    {
+        unsigned long color = strtoul([value UTF8String],0,16);
+        [appearance setTintColor:UIColorFromRGB(color) ];
+    }
+    
+    //    else if([function isEqualToString:@"setFont.Bold"])
+    //    {
+    //        long size = [value intValue];
+    //        [appearance setFont:[UIFont boldSystemFontOfSize:size] ];
+    //    }
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[DefaultTableHeaderView class]]] setTextColor:[UIColor whiteColor]];
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[DefaultTableHeaderView class]]] setFont:[UIFont boldSystemFontOfSize:20]];
+    //
+    //
+    //    [[CategoryCellSmall appearance] setBackgroundColor:[UIColor lightGrayColor]];
+    
+    //    [[UILabel appearanceWhenContainedInInstancesOfClasses:[NSArray arrayWithObject:[CategoryHeaderView class]]] setTextColor:[UIColor darkGrayColor]];
+    
+    //[[UIActivityIndicatorView appearance] setColor:UIColorFromRGB(0x007aff) ];
+}
++(NSArray*) appearance_container:(NSDictionary*) container_json
+{
+    // json 中添加 container 类型必须在此函数中添加对应代码
+    NSMutableArray* arr=[[NSMutableArray alloc]init];
+    
+    int count = [container_json[@"count"] intValue];
+    // container 只允许有一个,因为多个设置会失败,原因不明。
+    count=1;
+    for(int i=0;i<count;i++)
+    {
+        NSString * item = [NSString stringWithFormat:@"item_%d",i];
+        NSString* container = container_json[item];
+//        if([container isEqualToString:@"CategoryHeaderView"])
+//        {
+//            [arr addObject:[CategoryHeaderView class]];
+//        }
+//        else
+        if([container isEqualToString:@"CommonEditorCellModel"])
+        {
+            [arr addObject:[CommonEditorCellModel class]];
+        }
+//        else if([container isEqualToString:@"OrderListTableViewCell"])
+//        {
+//            [arr addObject:[OrderListTableViewCell class]];
+//        }
+        
+        else if([container isEqualToString:@"CommonEditorCellMAction"])
+        {
+            [arr addObject:[CommonEditorCellMAction class]];
+        }
+        
+        else if([container isEqualToString:@"DefaultTableHeaderView"])
+        {
+            [arr addObject:[DefaultTableHeaderView class]];
+        }
+        else if([container isEqualToString:@"UINavigationBar"])
+        {
+            [arr addObject:[UINavigationBar class]];
+        }
+        else if([container isEqualToString:@"UINavigationItem"])
+        {
+            [arr addObject:[UINavigationItem class]];
+        }
+//        else if([container isEqualToString:@"ModelItemCell"])
+//        {
+//            [arr addObject:[ModelItemCell class]];
+//        }
+//        else if([container isEqualToString:@"PDFListTableViewCell"])
+//        {
+//            [arr addObject:[PDFListTableViewCell class]];
+//        }
+        else if([container isEqualToString:@"UIToolbar"])
+        {
+            [arr addObject:[UIToolbar class]];
+        }
+//        else if([container isEqualToString:@"ContactListTableViewCell"])
+//        {
+//            [arr addObject:[ContactListTableViewCell class]];
+//        }
+//        else if([container isEqualToString:@"CategoryCellNPD"])
+//        {
+//            [arr addObject:[CategoryCellNPD class]];
+//        }
+        
+        
+    }
+    return arr;
+}
 @end

+ 1 - 1
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.pbxproj

@@ -569,6 +569,7 @@
 				7197D4131FBBE1610063EFBB /* OrderDetailViewController.h */,
 				7197D4141FBBE1610063EFBB /* OrderDetailViewController.m */,
 				7197D4191FBC1BE80063EFBB /* Detail.storyboard */,
+				71CB70B11FA1BA5E009FDCB7 /* layout.json */,
 			);
 			path = detail;
 			sourceTree = "<group>";
@@ -659,7 +660,6 @@
 				71F3A9B71F5F8E73001036C8 /* ResultViewController.h */,
 				71F3A9B81F5F8E73001036C8 /* ResultViewController.m */,
 				71CB70B01FA1BA5E009FDCB7 /* data.json */,
-				71CB70B11FA1BA5E009FDCB7 /* layout.json */,
 				71F3A9BB1F5F8EAE001036C8 /* FullyShowViewController.h */,
 				71F3A9BC1F5F8EAE001036C8 /* FullyShowViewController.m */,
 				4221EFB71FA879470026E1EC /* Result.storyboard */,

+ 2 - 1
RedAnt Mobile/RedAnt Mobile/AppDelegate.m

@@ -9,6 +9,7 @@
 #import "AppDelegate.h"
 #import "RARootNavigationController.h"
 #import "RARootViewController.h"
+#import "DefaultAppearance.h"
 
 @interface AppDelegate ()
 
@@ -22,7 +23,7 @@
     
     self.bEnable_Cache = true;
     
-    
+        [DefaultAppearance init_appearance];
     NSDictionary* jsonserver=[[NSUserDefaults standardUserDefaults] valueForKey:@"ServerSetting"];
     
     self.server = jsonserver[@"serverAddress"];

+ 250 - 129
RedAnt Mobile/RedAnt Mobile/RA Mobile.txt

@@ -43,135 +43,256 @@ criteria:[
 down:result, data, layout
 sample:
 {
-  "result": 2,
-  "data": {
-    "count": 4,
-    "item_0": [
-      "1",
-      "8533-UPK",
-      "$ 123.45",
-      "43",
-      "metal table with 4 chairs"
-    ],
-    "item_1": [
-      "2",
-      "315318",
-      "$ 99.49",
-      "13",
-      "WOOD table with 4 chairs"
-    ],
-    "item_2": [
-      "3",
-      "7033566",
-      "$ 13.45",
-      "57",
-      "bed"
-    ],
-    "item_3": [
-      "4",
-      "8533-UVR",
-      "$ 1123.45",
-      "143",
-      "Desk & chair UILongPressGestureRecognizer *longPress"
-    ]
-  },
-  "layout": {
-    "header": {
-      "width": 810,
-      "height": 44,
-      "margin_r": 10,
-      "margin_l": 10,
-      "margin_t": 10,
-      "margin_b": 10,
-      "bg_color": "0x123456",
-      "f_color": "0x987654",
-      "col": [
-        {
-          "width": 100,
-          "name": "id",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-          "width": 160,
-          "name": "model",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-          "width": 180,
-          "name": "price",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-          "width": 120,
-          "name": "stock",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-          "width": 250,
-          "name": "description",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        }
-      ]
-    },
-    "row": {
-      "height": 44,
-      "f_color": "0x654321",
-      "color_0": "0xffffff",
-      "color_1": "0x666666",
-      "val": [
-        {
-       	  "type":"image",		 	
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-        "type":"text",	
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-        "type":"text",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-        "type":"text",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        },
-        {
-        "type":"text",
-          "h_align": "center",
-          "v_center": "center",
-          "bg_color": "0x123456",
-          "f_color": "0x654321"
-        }
-      ]
-    }
-  }
+"result": 2,
+"menu": [
+{
+"title": "Export 1",
+"action": "download",
+"params": {
+"download#": 1
+}
+},
+{
+"title": "Export 2",
+"action": "download",
+"params": {
+"download#": 2
+}
+},
+{
+"title": "Save",
+"action": "save"
+}
+],
+"row_action": {
+"title": "demo title",
+"module0":"quick_look",
+"module1": "kv_detail",
+"module": "order_detail",
+"url": "http://1.1.1.1",
+"params": {
+"order#": 0
+}
+},
+"data": {
+"count": 17,
+"item_0": [
+"1",
+"8533-UPK",
+"$ 123.45",
+"43",
+"metal table with 4 chairs"
+],
+"item_1": [
+"2",
+"315318",
+"$ 99.49",
+"13",
+"WOOD table with 4 chairs"
+],
+"item_2": [
+"3",
+"7033566",
+"$ 13.45",
+"57",
+"bed"
+],
+"item_3": [
+"4",
+"8533-UVR",
+"$ 1123.45",
+"143",
+"Desk & chair UILongPressGestureRecognizer *longPress"
+],
+"item_4": [
+"1",
+"8533-UPK",
+"$ 123.45",
+"43",
+"metal table with 4 chairs"
+],
+"item_5": [
+"2",
+"315318",
+"$ 99.49",
+"13",
+"WOOD table with 4 chairs"
+],
+"item_6": [
+"3",
+"7033566",
+"$ 13.45",
+"57",
+"bed"
+],
+"item_7": [
+"4",
+"8533-UVR",
+"$ 1123.45",
+"143",
+"Desk & chair UILongPressGestureRecognizer *longPress"
+],
+"item_8": [
+"1",
+"8533-UPK",
+"$ 123.45",
+"43",
+"metal table with 4 chairs"
+],
+"item_9": [
+"2",
+"315318",
+"$ 99.49",
+"13",
+"WOOD table with 4 chairs"
+],
+"item_10": [
+"3",
+"7033566",
+"$ 13.45",
+"57",
+"bed"
+],
+"item_11": [
+"1",
+"8533-UPK",
+"$ 123.45",
+"43",
+"metal table with 4 chairs"
+],
+"item_12": [
+"2",
+"315318",
+"$ 99.49",
+"13",
+"WOOD table with 4 chairs"
+],
+"item_13": [
+"3",
+"7033566",
+"$ 13.45",
+"57",
+"bed"
+],
+"item_14": [
+"1",
+"8533-UPK",
+"$ 123.45",
+"43",
+"metal table with 4 chairs"
+],
+"item_15": [
+"2",
+"315318",
+"$ 99.49",
+"13",
+"WOOD table with 4 chairs"
+],
+"item_16": [
+"3",
+"7033566",
+"$ 13.45",
+"57",
+"bed"
+]
+},
+"layout": {
+"header": {
+"width": 810,
+"height": 44,
+"margin_r": 10,
+"margin_l": 10,
+"margin_t": 10,
+"margin_b": 10,
+"bg_color": "0x123456",
+"f_color": "0x987654",
+"col": [
+{
+"width": 100,
+"name": "id",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"width": 160,
+"name": "model",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"width": 180,
+"name": "price",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"width": 120,
+"name": "stock",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"width": 250,
+"name": "description",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+}
+]
+},
+"row": {
+"height": 44,
+"f_color": "0x654321",
+"color_0": "0xffffff",
+"color_1": "0x666666",
+"val": [
+{
+"type": "image",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"type": "text",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"type": "text",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"type": "text",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+},
+{
+"type": "text",
+"h_align": "center",
+"v_center": "center",
+"bg_color": "0x123456",
+"f_color": "0x654321"
+}
+]
+}
+}
 }
 
 

+ 1 - 0
RedAnt Mobile/RedAnt Mobile/RANetwork.h

@@ -19,4 +19,5 @@
 +(NSString*)download_file : (NSMutableDictionary*) params url:(NSString*) url;
 +(NSDictionary*)require_query_ui:(NSString*) request_url params:(NSMutableDictionary*)params;
 +(NSString*)kv_detail : (NSMutableDictionary*) params;
++(NSDictionary*)require_orderdetail:(NSString*) request_url params:(NSMutableDictionary*)params;
 @end

+ 14 - 0
RedAnt Mobile/RedAnt Mobile/RANetwork.m

@@ -266,6 +266,20 @@
     
     
     
+    [self request_Editor:request_url params:params];
+}
+
++(NSDictionary*)require_orderdetail:(NSString*) request_url params:(NSMutableDictionary*)params
+{
+    
+    
+    NSString *Path = [[NSBundle mainBundle] pathForResource:@"orderdetail.json" ofType:nil];
+    
+    NSData* data1 = [NSData dataWithContentsOfFile:Path];
+    return [[NSJSONSerialization JSONObjectWithData:data1 options:NSJSONReadingMutableContainers error:nil] mutableCopy];
+    
+    
+    
     [self request_Editor:request_url params:params];
 }
 +(NSDictionary*)request_Editor:(NSString*) request_url params:(NSMutableDictionary*)params

+ 19 - 0
RedAnt Mobile/RedAnt Mobile/ResultViewController.m

@@ -13,8 +13,10 @@
 #import "RAUtils.h"
 #import "JLRefreshHeader.h"
 #import "JLRefreshFooter.h"
+#import "OrderDetailViewController.h"
 #import "KVViewController.h"
 #import <QuickLook/QuickLook.h>
+#import "config.h"
 
 static const int delta = 25;
 
@@ -169,6 +171,23 @@ static const int delta = 25;
                 });
             });
         }
+        else if([module isEqualToString:@"order_detail"])
+        {
+            
+                OrderDetailViewController *vc = [[UIStoryboard storyboardWithName:@"Detail" bundle:nil] instantiateViewControllerWithIdentifier:@"OrderDetailViewController"];
+            
+                
+                vc.url_type = URL_REMOTE;
+                vc.request_url=URL_ORDER_DETAIL;
+            
+            
+                vc.params = [NSMutableDictionary dictionary];
+//                NSString *path = [[NSBundle mainBundle] pathForResource:@"search_ui.json" ofType:nil];
+//                NSData *data = [NSData dataWithContentsOfFile:path];
+//                vc.content_data_download = [[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil] mutableCopy];
+                [self.navigationController pushViewController:vc animated:NO];
+                return;
+        }
     }
     
   

+ 2 - 1
RedAnt Mobile/RedAnt Mobile/config.h

@@ -31,7 +31,7 @@
 #define PDF_DEBUG false
 
 
-#define FAKE_DATA
+//#define FAKE_DATA
 
 #ifdef test_server
 #define URL_CUSTOMER_ADV_SEARCH @""
@@ -39,6 +39,7 @@
 #define URL_QUERY @""
 #define  URL_REQUIRE_SERVER  @"http://192.168.0.155/wm_postgresql/ant_mobile_company_valid.php"
 #define URL_KV_DETAIL @""
+#define URL_ORDER_DETAIL @""
 #define URL_UPLOAD_IMG @""
 
 #define  URL_ERR_LOG  @""

+ 25 - 0
RedAnt Mobile/RedAnt Mobile/detail/Detail.storyboard

@@ -67,5 +67,30 @@
             </objects>
             <point key="canvasLocation" x="-42.399999999999999" y="202.84857571214394"/>
         </scene>
+        <!--Order Detail View Controller-->
+        <scene sceneID="lws-ek-D0K">
+            <objects>
+                <viewController storyboardIdentifier="OrderDetailViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="cEg-xY-TM0" customClass="OrderDetailViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="g3I-mm-C6y">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uQh-4n-ZIR">
+                                <rect key="frame" x="1" y="0.0" width="375" height="667"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            </view>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <viewLayoutGuide key="safeArea" id="p5K-lb-grg"/>
+                    </view>
+                    <connections>
+                        <outlet property="tableContainer" destination="uQh-4n-ZIR" id="QCh-qp-9cd"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="mbY-hT-Nih" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="816.79999999999995" y="197.45127436281859"/>
+        </scene>
     </scenes>
 </document>

+ 2 - 2
RedAnt Mobile/RedAnt Mobile/detail/OrderDetailViewController.h

@@ -7,7 +7,7 @@
 //
 
 #import <UIKit/UIKit.h>
-
-@interface OrderDetailViewController : UIViewController
+#import "CommonEditorViewController.h"
+@interface OrderDetailViewController : CommonEditorViewController
 
 @end

+ 6 - 1
RedAnt Mobile/RedAnt Mobile/detail/OrderDetailViewController.m

@@ -7,6 +7,7 @@
 //
 
 #import "OrderDetailViewController.h"
+#import "RANetwork.h"
 
 @interface OrderDetailViewController ()
 
@@ -33,5 +34,9 @@
     // Pass the selected object to the new view controller.
 }
 */
-
+#pragma mark Request Editor
+-(NSDictionary*)request_Editor:(NSString*) request_url params:(NSMutableDictionary*)params
+{
+    return [RANetwork require_orderdetail:request_url params:params];
+}
 @end

+ 92 - 0
RedAnt Mobile/RedAnt Mobile/detail/layout.json

@@ -0,0 +1,92 @@
+{
+    "header": {
+        "width": 810,
+        "height": 44,
+        "margin_r":10,
+        "margin_l":10,
+        "margin_t":10,
+        "margin_b":10,
+        "bg_color": "0x123456",
+        "f_color": "0x987654",
+        "col": [
+                {
+                "width": 100,
+                "name": "id",
+                "h_align": "center",
+                "v_center": "center",
+                
+                },
+                {
+                "width": 160,
+                "name": "model",
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "width": 180,
+                "name": "price",
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "width": 120,
+                "name": "stock",
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "width": 250,
+                "name": "description",
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                }
+                ]
+    },
+    "row": {
+        "height": 44,
+        "f_color": "0x654321",
+        "color_0": "0xffffff",
+        "color_1": "0x666666",
+        "val": [
+                {
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                },
+                {
+                "h_align": "center",
+                "v_center": "center",
+                "bg_color": "0x123456",
+                "f_color": "0x654321"
+                }
+                ]
+    }
+}
+

+ 2 - 1
RedAnt Mobile/RedAnt Mobile/predef_query.json

@@ -22,8 +22,9 @@
              ],
     "row_action": {
         "title": "demo title",
-        "module":"quick_look",
+        "module0":"quick_look",
         "module1": "kv_detail",
+        "module": "order_detail",
         "url": "http://1.1.1.1",
         "params": {
             "order#": 0

+ 168 - 1
RedAnt Mobile/default_appearance.json

@@ -1,3 +1,170 @@
 {
-    
+    "appearance": {
+        "count": 4,
+        "group_0": {
+            "name": "global",
+            "count": 10,
+            "item_0": {
+                "note": "全局按钮",
+                "control": "UIButton",
+                "function": "setTitleColor.Normal",
+                "value": "0x007aff",
+                "info": "blueColor"
+            },
+            "item_1": {
+                "note": "全局菊花标记",
+                "control": "UIActivityIndicatorView",
+                "function": "setColor",
+                "value": "0x007aff",
+                "info": "blueColor"
+            },
+            "item_2": {
+                "note": "全局navigation barButton",
+                "control": "UIBarButtonItem",
+                "function": "TintColor",
+                "value": "0x555555",
+                "info": "darkGrayColor",
+                "container1": {
+                    "count": 1,
+                    "item_0": "UINavigationBar"
+                }
+            },
+
+            "item_5": {
+                "note": "全局toolbar barButton",
+                "control": "UIBarButtonItem",
+                "function": "TintColor",
+                "value": "0x555555",
+                "info": "darkGrayColor",
+                "container": {
+                    "count": 1,
+                    "item_0": "UIToolbar"
+                }
+            },
+            "item_6": {
+                "note": "全局UINavigationBar ",
+                "control": "UINavigationBar",
+                "function": "TintColor",
+                "value": "0x555555",
+                "info": "darkGrayColor"
+            },
+            "item_7": {
+                "note": "common editor multi action 按钮背景",
+                "control": "UIButton",
+                "function": "setBackgroundColor",
+                "value": "0x555555",
+                "info": "darkGrayColor",
+                "container": {
+                    "count": 1,
+                    "item_0": "CommonEditorCellMAction"
+                }
+            },
+            "item_8": {
+                "note": "common editor multi action 按钮文字",
+                "control": "UIButton",
+                "function": "setTitleColor.Normal",
+                "value": "0xffffff",
+                "info": "whiteColor",
+                "container": {
+                    "count": 1,
+                    "item_0": "CommonEditorCellMAction"
+                }
+            },
+            "item_9": {
+                "note": "图片按钮文字颜色",
+                "control": "DefaultImageButton",
+                "function": "setTitleColor.Normal",
+                "value": "0x007aff",
+                "info": "blueColor"
+            }
+            
+            
+            
+        },
+        "group_1": {
+            "name": "category",
+            "count": 2,
+            "item_0": {
+                "control": "UILabel",
+                "function": "setTextColor",
+                "value": "0x555555",
+                "info": "darkGrayColor",
+                "container": {
+                    "count": 1,
+                    "item_0": "CategoryHeaderView"
+                }
+            },
+            "item_1": {
+                "control": "UILabel",
+                "function": "setTextColor",
+                "value": "0x000000",
+                "info": "blackColor",
+                "container": {
+                    "count": 1,
+                    "item_0": "CategoryCellNPD"
+                }
+                
+            }
+        },
+        "group_2": {
+            "name": "model detail",
+            "count": 2,
+            "item_0": {
+                "control": "DefaultTableHeaderView",
+                "function": "setBackgroundColor",
+                "value": "0xaaaaaa",
+                "info": "lightGrayColor"
+            },
+            "item_1": {
+                "control": "CategoryCellSmall",
+                "function": "setBackgroundColor",
+                "value": "0xaaaaaa",
+                "info": "lightGrayColor"
+            }
+        },
+        "group_3": {
+            "name": "contact",
+            "count": 0,
+            "item_0": {
+                "control": "UIButton",
+                "function": "TintColor",
+                "value": "0x555555",
+                "info": "darkGrayColor",
+                "container": {
+                    "count": 1,
+                    "item_0": "ContactListTableViewCell"
+                }
+            }
+        }
+    },
+    "none_appearance": {
+        "count": 3,
+        "CategoryViewController": {
+            "cell_border_color": "0xaaaaaa"
+        },
+        "DefaultTableHeaderView": {
+            "title_text_color": "0xffffff"
+        },
+        "DetailTableHeaderView": {
+            "title_text_color": "0xffffff"
+        }
+        ,
+        "DefaultColor": {
+            "frontcolor": "0x555555",
+            "labelcolor": "0x000000"
+        },
+        "MainLogo": {
+            "x": 49.0,
+            "y": 28.0,
+            "width": 110.0,
+            "height": 13.0
+        },
+        "ModePos": {
+            "x": 126.0,
+            "y": 35.0,
+            "width": 32.0,
+            "height": 30.0
+        }
+    },
+    "name": "HMLG DEFAULT"
 }