wangmeng 2 лет назад
Родитель
Сommit
615f31817c

+ 6 - 1
WMBase.podspec

@@ -98,7 +98,12 @@ Pod::Spec.new do |s|
 
 
   # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
-  #
+  # 暂时把所有资源都放到了主要项目中
+  s.resources = "WMBase/Assets/*.{xcassets}"
+#  s.resource_bundles = {
+#    'WMBase' => ['WMBase/Assets/*.{xcassets}']
+#  }
+
   #  A list of resources included with the Pod. These are copied into the
   #  target bundle with a build phase script. Anything else will be cleaned.
   #  You can preserve files from being cleaned, please don't preserve

+ 1 - 0
WMBase/WMBase/UCMBaseC.h

@@ -10,6 +10,7 @@
 #import <QMUIKit/QMUIKit.h>
 #import "WRNavigationBar.h"
 #import "WRCustomNavigationBar.h"
+#import "WMBase_Tool.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 12 - 1
WMBase/WMBase/UCMBaseC.m

@@ -35,14 +35,25 @@
     [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];
+        UIImage *backImg = [UIImage imageNamed:@"base_back"
+                                      inBundle: [WMBase_Tool get_WMBaseFrameworkPath]
+                                    compatibleWithTraitCollection:nil];
+        
+        [self.customNavBar.leftButton setImage:backImg forState:UIControlStateNormal];
     }
 }
 
+
+
 #pragma mark - **************** 调用 ****************
 - (void)tool_deletenoti {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
 }
+
+
+-(void)setTitle:(NSString *)title {
+    self.customNavBar.title = title;
+}
 ///隐藏系统 NavBar
 - (WRCustomNavigationBar *)customNavBar {
     if (!_customNavBar) {

+ 1 - 2
WMBase/WMBase/UC_Commonmodule/UC_CommonmoduleTool/Current_normalTool.h

@@ -148,8 +148,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 //计算lLab 的高度
 +(CGFloat)getHeightLabWidth:(CGFloat)width title:(NSString *)title font:(UIFont *)font;
-/// 判断H5版本是否需要清空
-+ (void)tengtengconfightmlupdate;
+
 
 + (id)tengteng_confignsuserdefaultobjectforkey:(NSString *)object normalobject:(NSString *)normal;
 

+ 1 - 29
WMBase/WMBase/UC_Commonmodule/UC_CommonmoduleTool/Current_normalTool.m

@@ -8,7 +8,7 @@
 
 #import "Current_normalTool.h"
 #import "TT_DarkmodeTool.h"
-#import "DataUtil.h"
+
 #import <WebKit/WebKit.h>
 #import <QMUIKit/QMUIKit.h>
 
@@ -29,7 +29,6 @@
 
 #import "TT_GeneralProfile.h"
 #import "UC_CommonmoduleCat.h"
-#import "XXX_Datautil.h"
 #import "KWLoginedManager.h"
 @implementation Current_normalTool
 
@@ -966,33 +965,6 @@ static char encodingTable[64] = {
 }
 
 
-+ (void)tengtengconfightmlupdate {
-    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
-    NSData *xmlData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[XXX_Datautil getuploadhtml]]];
-    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
-    NSString *xmlString = [[NSString alloc] initWithData:xmlData encoding:NSUTF8StringEncoding];
-    NSArray *arr = [xmlString componentsSeparatedByString:@"</version>"];
-    if (arr.count > 1) {
-        NSArray *tt = [arr[0] componentsSeparatedByString:@"<version>"];
-        if (tt.count > 1) {
-            NSString *htmlversion = tt[1];
-            Exist(@"htmlV") {
-                NSString *htmlV = TakeOut(@"htmlV");
-                if ([htmlversion integerValue] > [htmlV integerValue]) {
-                    [Current_normalTool clearHTMLCache];
-                }
-            }else {
-                SaveObject(htmlversion, @"htmlV")
-                [Current_normalTool clearHTMLCache];
-            }
-        }
-    }
-    if (xmlData == nil) {
-        NSLog(@"File read failed!:%@", xmlString);
-    }else {
-        NSLog(@"File read succeed!:%@",xmlString);
-    }
-}
 
 
 

+ 16 - 0
WMBase/WMBase/WMBase_Tool.h

@@ -0,0 +1,16 @@
+//
+//  WMBase_Tool.h
+//  WMBase
+//
+//  Created by 王猛 on 2023/5/10.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface WMBase_Tool : NSObject
++(NSBundle *)get_WMBaseFrameworkPath;
+@end
+
+NS_ASSUME_NONNULL_END

+ 18 - 0
WMBase/WMBase/WMBase_Tool.m

@@ -0,0 +1,18 @@
+//
+//  WMBase_Tool.m
+//  WMBase
+//
+//  Created by 王猛 on 2023/5/10.
+//
+
+#import "WMBase_Tool.h"
+
+@implementation WMBase_Tool
++(NSBundle *)get_WMBaseFrameworkPath{
+    NSURL *associateBundleURL = [[NSBundle mainBundle] URLForResource:@"Frameworks" withExtension:nil];
+    associateBundleURL = [associateBundleURL URLByAppendingPathComponent:@"WMBase"];
+    associateBundleURL = [associateBundleURL URLByAppendingPathExtension:@"framework"];
+    NSBundle *associateBunle = [NSBundle bundleWithURL:associateBundleURL];
+    return associateBunle;
+}
+@end