Просмотр исходного кода

添加文件UIColor + JK_HEX,修改progessHUD背景颜色

Pen Li 9 лет назад
Родитель
Сommit
d07b219149

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


+ 4 - 1
RedAnt ERP Mobile/common/Functions/portfolio/PDFListViewController.m

@@ -14,6 +14,7 @@
 #import "DefaultAppearance.h"
 #import "DefaultTableHeaderView.h"
 #import "SortItemViewController.h"
+#import "UIColor+JK_HEX.h"
 
 @interface PDFListViewController ()
 
@@ -55,7 +56,9 @@
     CGPoint center = self.mum.center;
     self.mum.frame = CGRectMake(0, 0, 100, 100);
     self.mum.center = center;
-    self.mum.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.5];
+    self.mum.backgroundColor = [UIColor colorWithHEX:0x5C77A1];
+    self.mum.layer.cornerRadius = 5.0f;
+    self.mum.layer.masksToBounds = YES;
     
     
     UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(refresh_btn_click:)];

+ 6 - 2
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m

@@ -17,6 +17,8 @@
 
 #import "MainViewController.h"
 #import "DefaultAppearance.h"
+#import "UIColor+JK_HEX.h"
+
 
 #define  DEF_CELL_HEIGHT 44
 #define  DEF_TABLE_HEIGHT 44
@@ -204,8 +206,10 @@
     CGPoint center = self.mum.center;
     self.mum.frame = CGRectMake(0, 0, 100, 100);
     self.mum.center = center;
-    self.mum.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.5];
-    
+    self.mum.backgroundColor = [UIColor colorWithHEX:0x5C77A1];
+    self.mum.layer.cornerRadius = 5.0f;
+    self.mum.layer.masksToBounds = YES;
+
     
     UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(refresh_btn_click:)];
     //            tap.minimumPressDuration = 0.8; //定义按的时间

+ 6 - 1
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m

@@ -15,6 +15,8 @@
 
 #import "MainViewController.h"
 #import "DefaultAppearance.h"
+#import "UIColor+JK_HEX.h"
+
 
 #define  DEF_CELL_HEIGHT 44
 #define  DEF_TABLE_HEIGHT 44
@@ -142,7 +144,10 @@
     CGPoint center = self.mum.center;
     self.mum.frame = CGRectMake(0, 0, 100, 100);
     self.mum.center = center;
-    self.mum.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.5];
+    self.mum.backgroundColor = [UIColor colorWithHEX:0x5C77A1];
+    self.mum.layer.cornerRadius = 5.0f;
+    self.mum.layer.masksToBounds = YES;
+
     
     
     self.selectallBtn.possibleTitles = [NSSet setWithObjects:@"Selece all", @"Deselect all", nil];

+ 5 - 1
RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m

@@ -20,6 +20,7 @@
 #import "DefaultAppearance.h"
 #import "SortItemViewController.h"
 #import "SortButton.h"
+#import "UIColor+JK_HEX.h"
 
 #define ALERT_DEL 1025
 //#import "PDFViewController.h"
@@ -415,7 +416,10 @@
     CGPoint center = self.mum.center;
     self.mum.frame = CGRectMake(0, 0, 100, 100);
     self.mum.center = center;
-    self.mum.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.5];
+    self.mum.backgroundColor = [UIColor colorWithHEX:0xF2E5F2];
+    self.mum.layer.cornerRadius = 5.0f;
+    self.mum.layer.masksToBounds = YES;
+    
     self.sortIndex = 0;
     
     UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(refresh_btn_click:)];

+ 14 - 0
RedAnt ERP Mobile/iSales-NPD.xcodeproj/project.pbxproj

@@ -18,6 +18,7 @@
 		42C9FB151D5B28FA001DCA8B /* contactAdvanceSearch.json in Resources */ = {isa = PBXBuildFile; fileRef = 42C9FB141D5B28FA001DCA8B /* contactAdvanceSearch.json */; };
 		42DC31131D546FBE00BCD1C6 /* category.json in Resources */ = {isa = PBXBuildFile; fileRef = 42DC31121D546FBE00BCD1C6 /* category.json */; };
 		42E58BFB1D7E5EF50092810A /* SortButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 42E58BFA1D7E5EF50092810A /* SortButton.m */; };
+		42E58C021D7E735A0092810A /* UIColor+JK_HEX.m in Sources */ = {isa = PBXBuildFile; fileRef = 42E58C011D7E735A0092810A /* UIColor+JK_HEX.m */; };
 		710274251CC606C4009FD219 /* UserListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 710274241CC606C4009FD219 /* UserListViewController.m */; };
 		7111E5721C76C557004763B3 /* customer_info_template_edit.json in Resources */ = {isa = PBXBuildFile; fileRef = 7111E5711C76C557004763B3 /* customer_info_template_edit.json */; };
 		71131F921CA1372300DBF6E2 /* SimplifiedBuyingProgramViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71131F911CA1372300DBF6E2 /* SimplifiedBuyingProgramViewController.m */; };
@@ -217,6 +218,8 @@
 		42DC31121D546FBE00BCD1C6 /* category.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = category.json; sourceTree = "<group>"; };
 		42E58BF91D7E5EF50092810A /* SortButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SortButton.h; sourceTree = "<group>"; };
 		42E58BFA1D7E5EF50092810A /* SortButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SortButton.m; sourceTree = "<group>"; };
+		42E58C001D7E735A0092810A /* UIColor+JK_HEX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+JK_HEX.h"; sourceTree = "<group>"; };
+		42E58C011D7E735A0092810A /* UIColor+JK_HEX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+JK_HEX.m"; sourceTree = "<group>"; };
 		56528CA8B8A71F67C2EE5366 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
 		6C826876B24EFB83AC94A464 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
 		710274231CC606C4009FD219 /* UserListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserListViewController.h; path = common/Functions/sidemenu/UserListViewController.h; sourceTree = SOURCE_ROOT; };
@@ -585,6 +588,15 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		42E58BFF1D7E735A0092810A /* UIColor+HEX */ = {
+			isa = PBXGroup;
+			children = (
+				42E58C001D7E735A0092810A /* UIColor+JK_HEX.h */,
+				42E58C011D7E735A0092810A /* UIColor+JK_HEX.m */,
+			);
+			path = "UIColor+HEX";
+			sourceTree = "<group>";
+		};
 		710212821B8D59DE00E1788B /* watchlist */ = {
 			isa = PBXGroup;
 			children = (
@@ -817,6 +829,7 @@
 		716387C71953CDB4006E65E6 /* utils */ = {
 			isa = PBXGroup;
 			children = (
+				42E58BFF1D7E735A0092810A /* UIColor+HEX */,
 				71BBA2171CEAC10200C91DED /* zip */,
 				71B1250B1C55BD4600118904 /* QRCODE */,
 				71BE066E1BA1607400FA6544 /* AES */,
@@ -1512,6 +1525,7 @@
 				7162A5451C58719D00AB630E /* RATreeView.m in Sources */,
 				7162A4FE1C585FFB00AB630E /* PDFViewController.m in Sources */,
 				71DF74841C57608F00F2789C /* ImageScrollerViewController.m in Sources */,
+				42E58C021D7E735A0092810A /* UIColor+JK_HEX.m in Sources */,
 				71DF74861C57608F00F2789C /* ImageViewController.m in Sources */,
 				7162A5821C5872EF00AB630E /* HomeTableViewCellButtonBanner.m in Sources */,
 				713F76B61929F4A7006A7305 /* main.m in Sources */,

+ 17 - 0
RedAnt ERP Mobile/iSales-NPD/UIColor+HEX/UIColor+JK_HEX.h

@@ -0,0 +1,17 @@
+//
+//  UIColor+JK_HEX.h
+//  chemistry2048
+//
+//  Created by emerys on 16/4/19.
+//  Copyright © 2016年 Emerys. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIColor (JK_HEX)
+
++ (instancetype)colorWithHEX:(NSInteger)hex;
+
++ (instancetype)colorWithHEXString:(NSString *)hexString;
+
+@end

+ 30 - 0
RedAnt ERP Mobile/iSales-NPD/UIColor+HEX/UIColor+JK_HEX.m

@@ -0,0 +1,30 @@
+//
+//  UIColor+JK_HEX.m
+//  chemistry2048
+//
+//  Created by emerys on 16/4/19.
+//  Copyright © 2016年 Emerys. All rights reserved.
+//
+
+#import "UIColor+JK_HEX.h"
+
+@implementation UIColor (JK_HEX)
+
++ (instancetype)colorWithHEX:(NSInteger)hex{
+    return [UIColor colorWithRed:((hex & 0xff0000) >> 16) / 255.0 green:((hex & 0xff00) >> 8) / 255.0 blue:(hex & 0xff) / 255.0 alpha:1];
+}
+
++ (instancetype)colorWithHEXString:(NSString *)hexString{
+    if ([hexString hasPrefix:@"#"]) {
+        hexString = [hexString stringByReplacingOccurrencesOfString:@"#" withString:@"0x"];
+    }
+    
+    if (![hexString hasPrefix:@"0x"]) {
+        return nil;
+    }
+    
+    NSInteger hex = strtoul([hexString UTF8String],0,16);
+    return [self colorWithHEX:hex];
+}
+
+@end