wangmeng 2 anni fa
parent
commit
ba9802ae12

+ 12 - 0
WMBase.xcodeproj/project.pbxproj

@@ -73,6 +73,7 @@
 		9A75429A2A0347CD0048C774 /* UCMViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A7542992A0347CD0048C774 /* UCMViewController.m */; };
 		9A8369792A03651D00E0DA39 /* UCMBaseC.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8369782A03651D00E0DA39 /* UCMBaseC.m */; };
 		9A8DD8BE2A0B880100573324 /* UIViewController+MM_configNet.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A8DD8BC2A0B880100573324 /* UIViewController+MM_configNet.m */; };
+		9A8DD8CB2A0B9BAD00573324 /* WMBase.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9A8DD8CA2A0B9BAD00573324 /* WMBase.xcassets */; };
 		9AA254CE2A025C3A0083EC60 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AA254CD2A025C3A0083EC60 /* AppDelegate.m */; };
 		9AA254D12A025C3A0083EC60 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AA254D02A025C3A0083EC60 /* SceneDelegate.m */; };
 		9AA254D42A025C3A0083EC60 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AA254D32A025C3A0083EC60 /* ViewController.m */; };
@@ -226,6 +227,7 @@
 		9A8DD8BB2A0B87AF00573324 /* WMBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMBase.h; sourceTree = "<group>"; };
 		9A8DD8BC2A0B880100573324 /* UIViewController+MM_configNet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+MM_configNet.m"; sourceTree = "<group>"; };
 		9A8DD8BD2A0B880100573324 /* UIViewController+MM_configNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+MM_configNet.h"; sourceTree = "<group>"; };
+		9A8DD8CA2A0B9BAD00573324 /* WMBase.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = WMBase.xcassets; sourceTree = "<group>"; };
 		9AA254C92A025C3A0083EC60 /* WMBase.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WMBase.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		9AA254CC2A025C3A0083EC60 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		9AA254CD2A025C3A0083EC60 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -461,6 +463,14 @@
 			path = UserModel;
 			sourceTree = "<group>";
 		};
+		9A8DD8C92A0B9B5400573324 /* Assets */ = {
+			isa = PBXGroup;
+			children = (
+				9A8DD8CA2A0B9BAD00573324 /* WMBase.xcassets */,
+			);
+			path = Assets;
+			sourceTree = "<group>";
+		};
 		9AA254C02A025C3A0083EC60 = {
 			isa = PBXGroup;
 			children = (
@@ -482,6 +492,7 @@
 		9AA254CB2A025C3A0083EC60 /* WMBase */ = {
 			isa = PBXGroup;
 			children = (
+				9A8DD8C92A0B9B5400573324 /* Assets */,
 				9AA254E52A025C630083EC60 /* WMBase */,
 				9AA254CC2A025C3A0083EC60 /* AppDelegate.h */,
 				9AA254CD2A025C3A0083EC60 /* AppDelegate.m */,
@@ -586,6 +597,7 @@
 			files = (
 				9AA254DC2A025C3C0083EC60 /* LaunchScreen.storyboard in Resources */,
 				9AA254D92A025C3C0083EC60 /* Assets.xcassets in Resources */,
+				9A8DD8CB2A0B9BAD00573324 /* WMBase.xcassets in Resources */,
 				9AA254D72A025C3A0083EC60 /* Main.storyboard in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

BIN
WMBase.xcworkspace/xcuserdata/wangmeng.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 0
WMBase/Assets/WMBase.xcassets/Contents.json

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

+ 23 - 0
WMBase/Assets/WMBase.xcassets/base_back.imageset/Contents.json

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

BIN
WMBase/Assets/WMBase.xcassets/base_back.imageset/组 8043.png


BIN
WMBase/Assets/WMBase.xcassets/base_back.imageset/组 8043@2x.png


BIN
WMBase/Assets/WMBase.xcassets/base_back.imageset/组 8043@3x.png


+ 4 - 0
WMBase/WMBase/UCMBaseC.h

@@ -8,14 +8,18 @@
 
 #import <UIKit/UIKit.h>
 #import <QMUIKit/QMUIKit.h>
+#import "WRNavigationBar.h"
+#import "WRCustomNavigationBar.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface UCMBaseC : QMUICommonViewController
+@property (nonatomic , strong) WRCustomNavigationBar *_Nonnull customNavBar;
 
 #pragma mark -- 公开方法
 -(void)ucm_bindvmmodel;
 -(void)ucm_changedefault;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 26 - 1
WMBase/WMBase/UCMBaseC.m

@@ -6,6 +6,7 @@
 //
 
 #import "UCMBaseC.h"
+#import "TT_GeneralProfile.h"
 
 @interface UCMBaseC ()
 
@@ -17,18 +18,42 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     self.view.backgroundColor = [UIColor qmui_colorWithHexString:@"#FFFFFF"];
+    //config 表示在内部方法有内容
+    [self ucm_configNavbar];
     [self ucm_bindvmmodel]; //绑定网络请求
     [self ucm_changedefault];
 }
 #pragma mark -- 公开方法
 -(void)ucm_bindvmmodel{
-    
 }
 -(void)ucm_changedefault{
     
 }
+
+-(void)ucm_configNavbar{
+    self.navigationController.navigationBar.hidden = YES;
+    [self.view addSubview:self.customNavBar];
+    if (self.navigationController.viewControllers.count > 1) {
+        self.customNavBar.leftButton.hidden = NO;
+        [self.customNavBar.leftButton setImage:[UIImage imageNamed:@"base_back"] forState:UIControlStateNormal];
+    }
+}
+
 #pragma mark - **************** 调用 ****************
 - (void)tool_deletenoti {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
 }
+///隐藏系统 NavBar
+- (WRCustomNavigationBar *)customNavBar {
+    if (!_customNavBar) {
+        _customNavBar = [WRCustomNavigationBar CustomNavigationBar];
+        [_customNavBar wr_setBottomLineHidden:YES];
+        _customNavBar.titleLabelFont = [UIFont fontWithName:Rob_Medium size:20];
+        _customNavBar.titleLabelColor = [UIColor blackColor];
+        _customNavBar.barBackgroundColor = [UIColor qmui_colorWithHexString:@"#FFF8F9"];
+    }
+    return _customNavBar;
+}
+
+
 @end

+ 9 - 9
WMBase/WMBase/WMBase.h

@@ -7,17 +7,17 @@
 
 #ifndef WMBase_h
 #define WMBase_h
-#if __has_include(<WMBase.h>)
+#if __has_include(<WMBase/WMBase.h>)
 
 
-#import <TT_GeneralProfile.h>
-#import <UC_CommonmoduleCat.h>
-#import <UC_CommonmoduleKit.h>
-#import <UC_CommonmoduleNetWork.h>
-#import <UC_CommonmoduleTool.h>
-#import <UCMBaseC.h>
-#import <CTMediator+Targets.h>
-#import <TT_GeneralProfile.h>
+#import <WMBase/TT_GeneralProfile.h>
+#import <WMBase/UC_CommonmoduleCat.h>
+#import <WMBase/UC_CommonmoduleKit.h>
+#import <WMBase/UC_CommonmoduleNetWork.h>
+#import <WMBase/UC_CommonmoduleTool.h>
+#import <WMBase/UCMBaseC.h>
+#import <WMBase/CTMediator+Targets.h>
+#import <WMBase/TT_GeneralProfile.h>
 
 
 #else