Browse Source

1.控件的快捷点击事件,工作页

time 6 years ago
parent
commit
beccccd3c1
40 changed files with 938 additions and 27 deletions
  1. 62 0
      UU_Ent/UU_Ent.xcodeproj/project.pbxproj
  2. 111 0
      UU_Ent/UU_Ent.xcodeproj/xcshareddata/xcschemes/UU_Ent.xcscheme
  3. 9 2
      UU_Ent/UU_Ent/Modules/App/AppDelegate.m
  4. 1 1
      UU_Ent/UU_Ent/Modules/Base/YRBaseVC.m
  5. 10 3
      UU_Ent/UU_Ent/Modules/Login/Main/Controllers/YRLoginVC.m
  6. 4 3
      UU_Ent/UU_Ent/Modules/Message/Main/Controllers/YRMsgVC.m
  7. 2 2
      UU_Ent/UU_Ent/Modules/Message/Main/Others/msg_route.json
  8. 14 1
      UU_Ent/UU_Ent/Modules/Mine/Main/Others/YRUserInfo.h
  9. 180 3
      UU_Ent/UU_Ent/Modules/Work/Main/Controllers/YRWorkVC.m
  10. 6 8
      UU_Ent/UU_Ent/Modules/Work/Main/Views/YRWorkCollCell.m
  11. 6 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/Contents.json
  12. 23 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/Contents.json
  13. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/工作台首页_下拉.png
  14. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/工作台首页_下拉@2x.png
  15. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/工作台首页_下拉@3x.png
  16. 23 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/Contents.json
  17. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/工作台首页_工作模块编辑.png
  18. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/工作台首页_工作模块编辑@2x.png
  19. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/工作台首页_工作模块编辑@3x.png
  20. 23 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/Contents.json
  21. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/工作台首页_工作模块设置.png
  22. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/工作台首页_工作模块设置@2x.png
  23. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/工作台首页_工作模块设置@3x.png
  24. 6 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/Contents.json
  25. 23 0
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/Contents.json
  26. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/UU_newNavbg3@1x.png
  27. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/UU_newNavbg3@2x.png
  28. BIN
      UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/UU_newNavbg3@3x.png
  29. 9 2
      UU_Ent/UU_Ent/Supporting Files/defines/import.h
  30. 7 2
      UU_Ent/UU_Ent/Supporting Files/defines/macro.h
  31. 19 0
      UU_Ent/UU_Ent/Utils/NSString/NSString+regular.h
  32. 24 0
      UU_Ent/UU_Ent/Utils/NSString/NSString+regular.m
  33. 21 0
      UU_Ent/UU_Ent/Utils/UIImageView/UIImageView+userId.h
  34. 37 0
      UU_Ent/UU_Ent/Utils/UIImageView/UIImageView+userId.m
  35. 29 0
      UU_Ent/UU_Ent/Utils/UILabel/UILabel+vertical.h
  36. 83 0
      UU_Ent/UU_Ent/Utils/UILabel/UILabel+vertical.m
  37. 22 0
      UU_Ent/UU_Ent/Utils/UIView/UIView+frame.h
  38. 123 0
      UU_Ent/UU_Ent/Utils/UIView/UIView+frame.m
  39. 21 0
      UU_Ent/UU_Ent/Utils/UIView/UIView+selector.h
  40. 40 0
      UU_Ent/UU_Ent/Utils/UIView/UIView+selector.m

+ 62 - 0
UU_Ent/UU_Ent.xcodeproj/project.pbxproj

@@ -15,6 +15,11 @@
 		9948171422783494007C7CEA /* msg_route.json in Resources */ = {isa = PBXBuildFile; fileRef = 9948171322783494007C7CEA /* msg_route.json */; };
 		9948171722785013007C7CEA /* YRWorkTabCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9948171622785013007C7CEA /* YRWorkTabCell.m */; };
 		9948171A22785044007C7CEA /* YRWorkCollCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9948171922785044007C7CEA /* YRWorkCollCell.m */; };
+		999F6510227E658E00329012 /* UIView+frame.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F650F227E658E00329012 /* UIView+frame.m */; };
+		999F6513227E664C00329012 /* UIImageView+userId.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6512227E664C00329012 /* UIImageView+userId.m */; };
+		999F6516227E688600329012 /* UIView+selector.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6515227E688600329012 /* UIView+selector.m */; };
+		999F651A227E697D00329012 /* UILabel+vertical.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F6519227E697D00329012 /* UILabel+vertical.m */; };
+		999F651E227E6A6000329012 /* NSString+regular.m in Sources */ = {isa = PBXBuildFile; fileRef = 999F651D227E6A6000329012 /* NSString+regular.m */; };
 		99C6FE6122768B5C00C7070A /* UU_EntTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE6022768B5C00C7070A /* UU_EntTests.m */; };
 		99C6FE6C22768B5C00C7070A /* UU_EntUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE6B22768B5C00C7070A /* UU_EntUITests.m */; };
 		99C6FE8F22768EC000C7070A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C6FE7E22768EC000C7070A /* AppDelegate.m */; };
@@ -143,6 +148,16 @@
 		9948171622785013007C7CEA /* YRWorkTabCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRWorkTabCell.m; sourceTree = "<group>"; };
 		9948171822785044007C7CEA /* YRWorkCollCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YRWorkCollCell.h; sourceTree = "<group>"; };
 		9948171922785044007C7CEA /* YRWorkCollCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YRWorkCollCell.m; sourceTree = "<group>"; };
+		999F650E227E658E00329012 /* UIView+frame.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+frame.h"; sourceTree = "<group>"; };
+		999F650F227E658E00329012 /* UIView+frame.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+frame.m"; sourceTree = "<group>"; };
+		999F6511227E664C00329012 /* UIImageView+userId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImageView+userId.h"; sourceTree = "<group>"; };
+		999F6512227E664C00329012 /* UIImageView+userId.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+userId.m"; sourceTree = "<group>"; };
+		999F6514227E688600329012 /* UIView+selector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+selector.h"; sourceTree = "<group>"; };
+		999F6515227E688600329012 /* UIView+selector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+selector.m"; sourceTree = "<group>"; };
+		999F6518227E697D00329012 /* UILabel+vertical.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UILabel+vertical.h"; sourceTree = "<group>"; };
+		999F6519227E697D00329012 /* UILabel+vertical.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UILabel+vertical.m"; sourceTree = "<group>"; };
+		999F651C227E6A6000329012 /* NSString+regular.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+regular.h"; sourceTree = "<group>"; };
+		999F651D227E6A6000329012 /* NSString+regular.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+regular.m"; sourceTree = "<group>"; };
 		99C6FE4422768B5B00C7070A /* UU_Ent.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UU_Ent.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		99C6FE5C22768B5C00C7070A /* UU_EntTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UU_EntTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		99C6FE6022768B5C00C7070A /* UU_EntTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UU_EntTests.m; sourceTree = "<group>"; };
@@ -310,6 +325,44 @@
 			path = UIButton;
 			sourceTree = "<group>";
 		};
+		999F650C227E656B00329012 /* UIView */ = {
+			isa = PBXGroup;
+			children = (
+				999F650E227E658E00329012 /* UIView+frame.h */,
+				999F650F227E658E00329012 /* UIView+frame.m */,
+				999F6514227E688600329012 /* UIView+selector.h */,
+				999F6515227E688600329012 /* UIView+selector.m */,
+			);
+			path = UIView;
+			sourceTree = "<group>";
+		};
+		999F650D227E656B00329012 /* UIImageView */ = {
+			isa = PBXGroup;
+			children = (
+				999F6511227E664C00329012 /* UIImageView+userId.h */,
+				999F6512227E664C00329012 /* UIImageView+userId.m */,
+			);
+			path = UIImageView;
+			sourceTree = "<group>";
+		};
+		999F6517227E696900329012 /* UILabel */ = {
+			isa = PBXGroup;
+			children = (
+				999F6518227E697D00329012 /* UILabel+vertical.h */,
+				999F6519227E697D00329012 /* UILabel+vertical.m */,
+			);
+			path = UILabel;
+			sourceTree = "<group>";
+		};
+		999F651B227E6A3E00329012 /* NSString */ = {
+			isa = PBXGroup;
+			children = (
+				999F651C227E6A6000329012 /* NSString+regular.h */,
+				999F651D227E6A6000329012 /* NSString+regular.m */,
+			);
+			path = NSString;
+			sourceTree = "<group>";
+		};
 		99C6FE3B22768B5B00C7070A = {
 			isa = PBXGroup;
 			children = (
@@ -470,6 +523,10 @@
 		99C6FE8D22768EC000C7070A /* Utils */ = {
 			isa = PBXGroup;
 			children = (
+				999F651B227E6A3E00329012 /* NSString */,
+				999F6517227E696900329012 /* UILabel */,
+				999F650D227E656B00329012 /* UIImageView */,
+				999F650C227E656B00329012 /* UIView */,
 				27029BCD227709A700D53A94 /* UIButton */,
 				27029BC9227705DB00D53A94 /* UIColor */,
 				99C6FF182276DD2400C7070A /* tableView */,
@@ -1215,6 +1272,7 @@
 				99C6FE99227690F800C7070A /* YRBaseNav.m in Sources */,
 				99C6FE96227690BE00C7070A /* YRBaseVC.m in Sources */,
 				99C6FF172276D13500C7070A /* YRUserInfo.m in Sources */,
+				999F6510227E658E00329012 /* UIView+frame.m in Sources */,
 				99C6FEC32276959B00C7070A /* YRWorkVC.m in Sources */,
 				99F4A73D2277D1B8009AA6ED /* YRLoadImgCacheTool.m in Sources */,
 				99C6FECE227697DA00C7070A /* YRContactVC.m in Sources */,
@@ -1225,10 +1283,14 @@
 				27029BCC2277063F00D53A94 /* UIColor+HexColor.m in Sources */,
 				99F4A7402277D2DF009AA6ED /* YRLoadingVC.m in Sources */,
 				99C6FE8F22768EC000C7070A /* AppDelegate.m in Sources */,
+				999F6516227E688600329012 /* UIView+selector.m in Sources */,
+				999F651E227E6A6000329012 /* NSString+regular.m in Sources */,
 				99F4A7432277D332009AA6ED /* YRCountDownView.m in Sources */,
 				99C6FEBA2276950C00C7070A /* YRMainVC.m in Sources */,
 				9948171A22785044007C7CEA /* YRWorkCollCell.m in Sources */,
 				27029BC72276A23400D53A94 /* YRLoginVC.m in Sources */,
+				999F6513227E664C00329012 /* UIImageView+userId.m in Sources */,
+				999F651A227E697D00329012 /* UILabel+vertical.m in Sources */,
 				9948171722785013007C7CEA /* YRWorkTabCell.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 111 - 0
UU_Ent/UU_Ent.xcodeproj/xcshareddata/xcschemes/UU_Ent.xcscheme

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1020"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "99C6FE4322768B5B00C7070A"
+               BuildableName = "UU_Ent.app"
+               BlueprintName = "UU_Ent"
+               ReferencedContainer = "container:UU_Ent.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "99C6FE5B22768B5C00C7070A"
+               BuildableName = "UU_EntTests.xctest"
+               BlueprintName = "UU_EntTests"
+               ReferencedContainer = "container:UU_Ent.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "99C6FE6622768B5C00C7070A"
+               BuildableName = "UU_EntUITests.xctest"
+               BlueprintName = "UU_EntUITests"
+               ReferencedContainer = "container:UU_Ent.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "99C6FE4322768B5B00C7070A"
+            BuildableName = "UU_Ent.app"
+            BlueprintName = "UU_Ent"
+            ReferencedContainer = "container:UU_Ent.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "99C6FE4322768B5B00C7070A"
+            BuildableName = "UU_Ent.app"
+            BlueprintName = "UU_Ent"
+            ReferencedContainer = "container:UU_Ent.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "99C6FE4322768B5B00C7070A"
+            BuildableName = "UU_Ent.app"
+            BlueprintName = "UU_Ent"
+            ReferencedContainer = "container:UU_Ent.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 9 - 2
UU_Ent/UU_Ent/Modules/App/AppDelegate.m

@@ -28,7 +28,12 @@
       
         YRMainVC *mainVC = [[YRMainVC alloc]init];
         
-        self.window.rootViewController = mainVC;
+        [UIView animateWithDuration:0.3f animations:^{
+            
+            self.window.rootViewController = mainVC;
+            DLog(@"这里是切换到主页");
+        }];
+        
         
     };
     
@@ -36,8 +41,10 @@
     
     self.window.rootViewController = loginVC;
     
-    [self.window makeKeyAndVisible];
+    self.window.backgroundColor = [UIColor whiteColor];
     
+    [self.window makeKeyAndVisible];
+    //加载动画结束后
     [YRAdView startLoad].loadCompleted = ^{
         
         DLog(@"现在动画结束了");

+ 1 - 1
UU_Ent/UU_Ent/Modules/Base/YRBaseVC.m

@@ -17,8 +17,8 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    self.view.backgroundColor = RGB(242, 242, 242);
     [self setUpUI];
-    self.view.backgroundColor = [UIColor whiteColor];
 }
 
 

+ 10 - 3
UU_Ent/UU_Ent/Modules/Login/Main/Controllers/YRLoginVC.m

@@ -8,9 +8,8 @@
 
 #import "YRLoginVC.h"
 #import "YRUserInfo.h"
-#import <GRPCClient/GRPCCall+Tests.h>
 #import <UU_Ent/Account.pbrpc.h>
-#import <MBProgressHUD/MBProgressHUD.h>
+
 @interface YRLoginVC ()<UITextFieldDelegate>
 @property (nonatomic,strong) UIScrollView *scrollView;
 @property (nonatomic,strong) UITextField *passwordTF;
@@ -60,7 +59,11 @@
             [YRUserInfo shareManager].token = response.authedToken.token;
             [YRUserInfo shareManager].userInfo = resDic;
             
-            self.completed(YES);
+            if (self.completed) {
+                
+                self.completed(YES);
+                
+            }
             
         }else{
             
@@ -221,6 +224,10 @@
     self.loginBtn.frame = CGRectMake(20, CGRectGetMaxY(secondView.frame)+25, self_width-40, 40);
     [self.scrollView addSubview:self.loginBtn];
     [self.loginBtn addTarget:self action:@selector(loginAction) forControlEvents:UIControlEventTouchUpInside];
+    
+    
+    [self loginAction];
+    
 }
 
 #pragma mark --- lazy

+ 4 - 3
UU_Ent/UU_Ent/Modules/Message/Main/Controllers/YRMsgVC.m

@@ -66,20 +66,20 @@
             
         }else{//请求失败
             
-
+          
             
         }
         
     }];
     
-    call.requestHeaders[@"authentication"] = [YRUserInfo shareManager].token ;
+    call.requestHeaders[@"authentication"] = [YRUserInfo shareManager].token;
     
     [call start];
     
 }
 
 /**
- 匹配模型对应的下一个控制器
+ 匹配模型对应跳转的控制器
  */
 -(void)matchDestineVc{
     
@@ -181,6 +181,7 @@
     
 }
 
+
 -(YRTableView *)tableView{
     
     if (!_tableView) {

+ 2 - 2
UU_Ent/UU_Ent/Modules/Message/Main/Others/msg_route.json

@@ -2,13 +2,13 @@
     "version":"1",
     "data":[
             {"title":"通知公告",
-            "svid":"300004",
+            "id":"300004",
             "desVc": "YRBaseVC",
             "code":"uas.notice",
             "desc":"通知公告",
             },
             {"title":"邀请注册",
-             "svid":"300005",
+             "id":"300005",
              "desVc": "YRWebVC",
              "code":"uas.invitationToRegister",
              "desc":"邀请注册",

+ 14 - 1
UU_Ent/UU_Ent/Modules/Mine/Main/Others/YRUserInfo.h

@@ -19,12 +19,25 @@ NS_ASSUME_NONNULL_BEGIN
  */
 @property(copy,nonatomic)NSString *token;
 
-
 /**
  登录返回的账户所有信息
  */
 @property(strong,nonatomic)NSDictionary *userInfo;
 
+/**
+ 是否切换账套
+ */
+@property(assign,nonatomic)BOOL masChanged;
+
+/**
+ 是否在大陆以及港澳地区,在范围内加载高德地图,不在范围内加载谷歌地图
+ */
+@property(assign,atomic)BOOL inRegion;
+
+/**
+ 字体比例
+ */
+@property(assign,nonatomic)CGFloat scale;
 
 @end
 

+ 180 - 3
UU_Ent/UU_Ent/Modules/Work/Main/Controllers/YRWorkVC.m

@@ -7,13 +7,20 @@
 //
 
 #import "YRWorkVC.h"
-
+#import <UU_Ent/App.pbrpc.h>
+#import "YRWorkTabCell.h"
 @interface YRWorkVC ()<UITableViewDelegate,UITableViewDataSource>
 
 @property(strong,nonatomic)YRTableView *tableView;
 
 @property(strong,nonatomic)NSMutableArray *dataArr;
 
+@property(strong,nonatomic)UILabel *titleLabel;
+
+@property(weak,nonatomic)UIImageView *topView;
+
+@property(strong,nonatomic)UIImageView *remindView;
+
 @end
 
 @implementation YRWorkVC
@@ -26,9 +33,151 @@
 
 -(void)setUpUI{
     
+    self.navigationController.navigationBar.hidden = YES;
+   
+    UIImageView *topView = [[UIImageView alloc]initWithFrame:CGRectMake(0,0, kWidth, 94)];
+    topView.image = [UIImage imageNamed:@"UU_newNavbg3"];
+    topView.backgroundColor = RGB(48, 92, 131);
+    topView.userInteractionEnabled = YES;
+    
+    self.topView = topView;
+    
+    UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 14, kWidth , 64+10)];
+    
+    self.titleLabel = titleLabel;
+    
+    self.titleLabel.userInteractionEnabled = YES;
+    
+    titleLabel.textAlignment = NSTextAlignmentLeft;
+    titleLabel.font = FONT_SIZE(18);
+    [topView addSubview:titleLabel];
+    NSString *str = @"英唐集团";
+    titleLabel.text = str;
+    titleLabel.textColor =  [UIColor whiteColor];
+    [topView addSubview:titleLabel];
+    
+    self.remindView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"工作台首页_下拉"]];
+    [topView addSubview:self.remindView];
+    //防止在某些机型上出现白条
+    self.remindView.alpha = 0;
+    [self.remindView mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.center.equalTo(topView);
+        make.width.mas_equalTo(117);
+        make.height.mas_equalTo(0);
+        
+    }];
+    
+    UIImageView *setImageView = [[UIImageView alloc]init];
+    setImageView.userInteractionEnabled = YES;
+    setImageView.target = self;
+    setImageView.aSelector = @selector(pushToEditVC);
+    setImageView.image = [UIImage imageNamed:@"工作台首页_工作模块编辑"];
+    [topView addSubview:setImageView];
+    [setImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.centerY.equalTo(titleLabel.mas_centerY);
+        make.left.equalTo(topView.mas_right).offset(-40);
+        make.width.height.mas_equalTo(21);
+        
+    }];
+    
+    [self.view addSubview:topView];
+    
+     self.view.backgroundColor = RGB(219, 227, 232);
+    
     [self.view addSubview:self.tableView];
     self.tableView.frame = CGRectMake(10, 74, self.view.frame.size.width-20, kHeight - 108);
     
+    UIView *footerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.width, 70)];
+    
+    footerView.backgroundColor = RGB(219, 227, 232);
+    UIView *viewOne = [[UIView alloc]init];
+    viewOne.layer.cornerRadius = 15;
+    viewOne.layer.masksToBounds = YES;
+    viewOne.backgroundColor = [UIColor whiteColor];
+    UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10,5, 20, 20)];
+    imageView.image = [UIImage imageNamed:@"工作台首页_工作模块设置"];
+    [viewOne addSubview:imageView];
+    UILabel *label = [UILabel new];
+    label.textAlignment = NSTextAlignmentLeft;
+    label.frame = CGRectMake(36, 0, 94+5, 30);
+    label.font = FONT_SIZE(12);
+    label.textColor = [UIColor redColor];
+    label.text = @"工作模块设置";
+    label.textColor = HexColor(@"#87A5BF");
+    [viewOne addSubview:label];
+    viewOne.target = self;
+    viewOne.aSelector = @selector(pushToSettingVC);
+    [footerView addSubview:viewOne];
+    
+    [viewOne mas_makeConstraints:^(MASConstraintMaker *make) {
+        
+        make.centerX.equalTo(footerView);
+        make.height.mas_equalTo(30);
+        make.width.mas_equalTo(130+5);
+        make.top.equalTo(footerView).offset(15);
+        
+    }];
+    
+    self.tableView.tableFooterView = footerView;
+
+    
+}
+
+-(void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    if ([YRUserInfo shareManager]) {
+        
+        [self loadDataFromServer];
+        
+    }
+    
+}
+
+#pragma mark - 网络请求
+-(void)loadDataFromServer{
+    
+    [GRPCCall useInsecureConnectionsForHost:kHostAddress];
+    
+    AppService *client = [[AppService alloc]initWithHost:kHostAddress];
+    
+    GetAppConfigRequest *request = [GetAppConfigRequest message];
+    
+    GRPCProtoCall *call =  [client RPCTogetConfigWithRequest:request handler:^(GetAppConfigResponse * _Nullable response, NSError * _Nullable error) {
+        
+        if (!error) {//请求成功
+            
+            NSDictionary *dict = response.mj_keyValues;
+            
+            DLog(@"%@",dict);
+            
+        }else{//请求失败
+            
+            
+            
+        }
+        
+    }];
+    
+    call.requestHeaders[@"authentication"] = [YRUserInfo shareManager].token;
+    
+    [call start];
+    
+}
+
+#pragma mark - target 
+-(void)pushToSettingVC{
+    
+     DLog(@"点击了设置页面");
+    
+}
+
+-(void)pushToEditVC{
+    
+    DLog(@"点击了编辑页面");
+    
 }
 
 #pragma mark - tableView Delegate && datasource
@@ -81,17 +230,45 @@
 
 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
     
-    UITableViewCell  *cell = [tableView dequeueReusableCellWithIdentifier:@"CornerCellReid"];
+   YRWorkTabCell  *cell = [tableView dequeueReusableCellWithIdentifier:@"CornerCellReid"];
     
     if (!cell) {
         
-        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CornerCellReid"];
+        cell = [[YRWorkTabCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CornerCellReid"];
         
     }
     
     
     return cell;
     
+}
+
+#pragma mark -scrollDelegate
+
+-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
+    
+    CGFloat contentY = -self.tableView.contentOffset.y;
+    
+    if (contentY > 0) {
+        
+        self.topView.frame = CGRectMake(0, 0, self.view.width, 94 + ABS(contentY));
+        self.remindView.alpha = 1;
+        CGFloat height = ((float)(contentY/100.f) >= 1 ? 1:(float)(contentY/100.f)) * 32;
+        
+        [self.remindView mas_updateConstraints:^(MASConstraintMaker *make) {
+            
+            make.height.mas_equalTo(height);
+            
+        }];
+        
+    }else{
+        //防止在某些机型上出现白条
+        self.remindView.alpha = 0;
+        
+    }
+    
+    
+    
 }
 
 #pragma mark - lazy

+ 6 - 8
UU_Ent/UU_Ent/Modules/Work/Main/Views/YRWorkCollCell.m

@@ -135,23 +135,21 @@
 -(UILabel *)titleLabel{
     if (!_titleLabel) {
         _titleLabel = [UILabel new];
-        
         _titleLabel.textAlignment = NSTextAlignmentCenter;
+        _titleLabel.verticalAlignment = NSTextVerticalAlignmentTop;
+        _titleLabel.lineBreakMode = NSLineBreakByCharWrapping;
+        _titleLabel.numberOfLines = 2;
         
     }
-    //    _titleLabel.verticalAlignment = NSTextVerticalAlignmentTop;
-    //    _titleLabel.lineBreakMode = NSLineBreakByCharWrapping;
-    //    _titleLabel.numberOfLines = 2;
-//    _titleLabel.font = FONT_SIZE(13);
+    _titleLabel.font = FONT_SIZE(13);
     return _titleLabel;
 }
 
 -(UIImageView *)selectView{
     if (!_selectView) {
         _selectView = [UIImageView new];
-        _selectView.userInteractionEnabled = YES;
-//        _selectView.target = self;
-//        _selectView.aSelector = @selector(selectedOrNot);
+        _selectView.target = self;
+        _selectView.aSelector = @selector(selectedOrNot);
         
     }
     

+ 6 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 23 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_下拉.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_下拉@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_下拉@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/工作台首页_下拉.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/工作台首页_下拉@2x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_下拉.imageset/工作台首页_下拉@3x.png


+ 23 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_工作模块编辑.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_工作模块编辑@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_工作模块编辑@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/工作台首页_工作模块编辑.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/工作台首页_工作模块编辑@2x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块编辑.imageset/工作台首页_工作模块编辑@3x.png


+ 23 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_工作模块设置.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_工作模块设置@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "工作台首页_工作模块设置@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/工作台首页_工作模块设置.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/工作台首页_工作模块设置@2x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/Work/工作主页/工作台首页_工作模块设置.imageset/工作台首页_工作模块设置@3x.png


+ 6 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 23 - 0
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "UU_newNavbg3@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "UU_newNavbg3@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "UU_newNavbg3@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/UU_newNavbg3@1x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/UU_newNavbg3@2x.png


BIN
UU_Ent/UU_Ent/Supporting Files/Assets.xcassets/Resources/导航栏/UU_newNavbg3.imageset/UU_newNavbg3@3x.png


+ 9 - 2
UU_Ent/UU_Ent/Supporting Files/defines/import.h

@@ -10,17 +10,24 @@
 #define import_h
 
 //自定义
+
+#import "YRUserInfo.h"
+#import "YRTableView.h"
 #import "UIColor+HexColor.h"
 #import "UIButton+Layout.h"
 #import "YRButton.h"
-#import "YRUserInfo.h"
-#import "YRTableView.h"
+#import "UIView+frame.h"
+#import "UIImageView+userId.h"
+#import "UIView+selector.h"
+#import "NSString+regular.h"
+#import "UILabel+vertical.h"
 
 //第三方导入
 #import <GRPCClient/GRPCCall+Tests.h>
 #import <Masonry/Masonry.h>
 #import <MJExtension/MJExtension.h>
 #import <IQKeyboardManager/IQKeyboardManager.h>
+#import <MBProgressHUD/MBProgressHUD.h>
 
 
 #endif /* import_h */

+ 7 - 2
UU_Ent/UU_Ent/Supporting Files/defines/macro.h

@@ -22,11 +22,16 @@
 //当前控制器的宽高度
 #define self_width self.view.frame.size.width
 #define self_height self.view.frame.size.height
-//十六进制颜色
+//颜色
 #define HexColor(h) [UIColor colorWithHexString:(h)]
-
+#define RGB(r, g, b) [UIColor colorWithRed:((r) / 255.0) green:((g) / 255.0) blue:((b) / 255.0) alpha:1.0]
 //屏幕的宽高度
 #define kWidth [UIScreen mainScreen].bounds.size.width
 #define kHeight [UIScreen mainScreen].bounds.size.height
 
+//系统版本
+#define iOS11Early [[[UIDevice currentDevice] systemVersion] floatValue] < 11.0
+
+//字体
+#define FONT_SIZE(size) [UIFont systemFontOfSize:size]
 #endif /* macro_h */

+ 19 - 0
UU_Ent/UU_Ent/Utils/NSString/NSString+regular.h

@@ -0,0 +1,19 @@
+//
+//  NSString+regular.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSString (regular)
+
++(BOOL)isAllNumber:(NSString *)str;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 24 - 0
UU_Ent/UU_Ent/Utils/NSString/NSString+regular.m

@@ -0,0 +1,24 @@
+//
+//  NSString+regular.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "NSString+regular.h"
+
+@implementation NSString (regular)
+
++(BOOL)isAllNumber:(NSString *)str{
+    
+    NSString *CM_NUM = @"^[(a-z)|(A-Z)|(0-9)|( )]{0,1000000}$";
+    
+    NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CM_NUM];
+    
+    BOOL isMatch = [pred evaluateWithObject:str];
+    
+    return isMatch;
+}
+
+@end

+ 21 - 0
UU_Ent/UU_Ent/Utils/UIImageView/UIImageView+userId.h

@@ -0,0 +1,21 @@
+//
+//  UIImageView+userId.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "UIImageView+WebCache.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIImageView (userId)
+
+//ID获取图片
+-(void)getImageWithUserId:(NSString *)userId;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 37 - 0
UU_Ent/UU_Ent/Utils/UIImageView/UIImageView+userId.m

@@ -0,0 +1,37 @@
+//
+//  UIImageView+userId.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "UIImageView+userId.h"
+
+@implementation UIImageView (userId)
+
+-(void)getImageWithUserId:(NSString *)userId{
+    
+    NSString* dir  = [NSString stringWithFormat:@"%d",[userId intValue]%10000];
+    
+    NSString* filepath  = [NSString stringWithFormat:@"%@t/%@@2x.jpg",[NSString stringWithFormat:@"%@/tmp/",NSHomeDirectory()],userId];
+    
+    
+    filepath  = [[NSString stringWithFormat:@"%@/",[[NSBundle mainBundle] bundlePath]] stringByAppendingPathComponent:@"uu_zhanwei_man"];
+    
+    
+    UIImage* p = [[UIImage alloc]initWithContentsOfFile:filepath];
+    
+    
+    NSString *urlStr = [NSString stringWithFormat:@"%@avatar/t/%@/%@.jpg",@"http://www.youjob.co/",dir,userId];
+    
+    
+    [self sd_setImageWithURL:[NSURL URLWithString:urlStr] placeholderImage:p options:SDWebImageRetryFailed| SDWebImageRefreshCached];
+    
+    
+}
+
+
+
+
+@end

+ 29 - 0
UU_Ent/UU_Ent/Utils/UILabel/UILabel+vertical.h

@@ -0,0 +1,29 @@
+//
+//  UILabel+vertical.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSInteger,NSTextVerticalAlignment){
+    //位于Label上方
+    NSTextVerticalAlignmentTop = 101,
+    //位于Label中间
+    NSTextVerticalAlignmentMiddle,
+    //位于Label下方
+    NSTextVerticalAlignmentBottom
+};
+
+
+@interface UILabel (vertical)
+
+@property (nonatomic,assign)NSTextVerticalAlignment verticalAlignment;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 83 - 0
UU_Ent/UU_Ent/Utils/UILabel/UILabel+vertical.m

@@ -0,0 +1,83 @@
+//
+//  UILabel+vertical.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "UILabel+vertical.h"
+#import <objc/runtime.h>
+@implementation UILabel (vertical)
+
+-(void)setVerticalAlignment:(NSTextVerticalAlignment)verticalAlignment{
+    
+    NSString *str = [NSString stringWithFormat:@"%ld",(long)verticalAlignment];
+    objc_setAssociatedObject(self, @"verticalAlignmentSetGet", str, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+    [self setNeedsDisplay];
+    
+}
+-(NSTextVerticalAlignment)verticalAlignment{
+    
+    NSString *str = objc_getAssociatedObject(self, @"verticalAlignmentSetGet");
+    return [str integerValue];
+    
+}
+
++(void)load{
+    
+    
+    method_exchangeImplementations(class_getInstanceMethod([self class], @selector(textRectForBounds:limitedToNumberOfLines:)), class_getInstanceMethod([self class], @selector(uas_textRectForBounds:limitedToNumberOfLines:)));
+    method_exchangeImplementations(class_getInstanceMethod([self class], @selector(drawTextInRect:)), class_getInstanceMethod([self class], @selector(uas_drawTextInRect:)));
+    
+}
+
+-(CGRect)uas_textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines{
+    
+    CGRect textRect = [self uas_textRectForBounds:bounds limitedToNumberOfLines:numberOfLines];
+    if (self.verticalAlignment == NSTextVerticalAlignmentTop) {
+        
+        textRect.origin.y = bounds.origin.y;
+        
+    }else if(self.verticalAlignment == NSTextVerticalAlignmentMiddle){
+        
+        textRect.origin.y = bounds.origin.y + (bounds.size.height - textRect.size.height) / 2.0;
+        
+    }else if(self.verticalAlignment == NSTextVerticalAlignmentBottom){
+        
+        textRect.origin.y = bounds.origin.y + bounds.size.height - textRect.size.height;
+        
+    }else{
+        
+        textRect.origin.y = bounds.origin.y + (bounds.size.height - textRect.size.height) / 2.0;
+        
+    }
+    
+    
+    
+    if(self.textAlignment == NSTextAlignmentRight && [NSString isAllNumber:self.text] && iOS11Early){
+        
+        textRect.origin.x = bounds.size.width - textRect.size.width;
+        
+    }
+    
+    if(self.textAlignment == NSTextAlignmentCenter && iOS11Early){
+        
+        textRect.origin.x = (bounds.size.width - textRect.size.width)/2;
+        
+    }
+    
+    return textRect;
+}
+
+
+
+- (void)uas_drawTextInRect:(CGRect)rect
+{
+    CGRect rectDraw = [self textRectForBounds:rect limitedToNumberOfLines:self.numberOfLines];
+    
+    [self uas_drawTextInRect:rectDraw];
+}
+
+
+@end

+ 22 - 0
UU_Ent/UU_Ent/Utils/UIView/UIView+frame.h

@@ -0,0 +1,22 @@
+//
+//  UIView+frame.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIView (frame)
+
+@property (nonatomic, assign) CGFloat x;
+@property (nonatomic, assign) CGFloat y;
+@property (nonatomic, assign) CGFloat width;
+@property (nonatomic, assign) CGFloat height;
+@property (nonatomic, assign) CGPoint origin;
+@property (nonatomic, assign) CGSize size;
+
+@end
+
+

+ 123 - 0
UU_Ent/UU_Ent/Utils/UIView/UIView+frame.m

@@ -0,0 +1,123 @@
+//
+//  UIView+frame.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "UIView+frame.h"
+
+@implementation UIView (frame)
+
+/**
+ 设置新的Origin.x
+ @param   x  新设置的值
+
+ */
+- (void)setX:(CGFloat)x
+{
+    CGRect frame = self.frame;
+    frame.origin.x = x;
+    self.frame = frame;
+}
+
+/**
+ @param     返回一个Origin.x
+ */
+- (CGFloat)x
+{
+    return self.frame.origin.x;
+}
+
+/**
+ @param     设置新的Origin.Y
+ */
+- (void)setY:(CGFloat)y
+{
+    CGRect frame = self.frame;
+    frame.origin.y = y;
+    self.frame = frame;
+}
+
+/**
+ @param     返回一个Origin.y
+ */
+- (CGFloat)y
+{
+    return self.frame.origin.y;
+}
+
+/**
+ @param      设置新的Origin
+ */
+- (void)setOrigin:(CGPoint)origin
+{
+    CGRect frame = self.frame;
+    frame.origin = origin;
+    self.frame = frame;
+}
+
+/**
+ @param      返回一个Origin
+ */
+- (CGPoint)origin
+{
+    return self.frame.origin;
+}
+
+/**
+ @param   contents   设置新的Size.Width
+ */
+- (void)setWidth:(CGFloat)width
+{
+    CGRect frame = self.frame;
+    frame.size.width = width;
+    self.frame = frame;
+}
+
+/**
+ @param   contents   返回一个Size.Width
+ */
+- (CGFloat)width
+{
+    return self.frame.size.width;
+}
+
+/**
+ @param   contents   设置新的Size.Height
+ */
+- (void)setHeight:(CGFloat)height
+{
+    CGRect frame = self.frame;
+    frame.size.height = height;
+    self.frame = frame;
+}
+
+/**
+ @param   contents   返回一个Size.Height
+ */
+- (CGFloat)height
+{
+    return self.frame.size.height;
+}
+
+/**
+ @param   contents   设置新的Size
+ */
+- (void)setSize:(CGSize)size
+{
+    CGRect frame = self.frame;
+    frame.size = size;
+    self.frame = frame;
+}
+
+/**
+ @param   contents   返回一个Size
+ */
+- (CGSize)size
+{
+    return self.frame.size;
+}
+
+@end

+ 21 - 0
UU_Ent/UU_Ent/Utils/UIView/UIView+selector.h

@@ -0,0 +1,21 @@
+//
+//  UIView+selector.h
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIView (selector)
+
+@property(assign,nonatomic)id target;
+
+@property(assign,nonatomic)SEL aSelector;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 40 - 0
UU_Ent/UU_Ent/Utils/UIView/UIView+selector.m

@@ -0,0 +1,40 @@
+//
+//  UIView+selector.m
+//  UU_Ent
+//
+//  Created by liujl on 2019/5/5.
+//  Copyright © 2019 UAS. All rights reserved.
+//
+
+#import "UIView+selector.h"
+#import <objc/runtime.h>
+@implementation UIView (selector)
+
+-(void)setTarget:(id)target{
+    
+    objc_setAssociatedObject(self, @"UIViewSetGetTarget", target, OBJC_ASSOCIATION_ASSIGN);
+    
+}
+-(id)target{
+    
+    return objc_getAssociatedObject(self,@"UIViewSetGetTarget");
+    
+}
+-(void)setASelector:(SEL)aSelector{
+    self.userInteractionEnabled = YES;
+    NSString *selStr = NSStringFromSelector(aSelector);
+    objc_setAssociatedObject(self, @"UIViewSetGetAselector", selStr, OBJC_ASSOCIATION_COPY_NONATOMIC);
+    UITapGestureRecognizer *tapGes = [[UITapGestureRecognizer alloc]initWithTarget:self.target action:aSelector];
+    [self addGestureRecognizer:tapGes];
+    
+}
+
+-(SEL)aSelector{
+    
+    NSString *selStr = objc_getAssociatedObject(self,  @"UIViewSetGetAselector");
+    
+    return NSSelectorFromString(selStr);
+    
+}
+
+@end