wenweiwei 3 роки тому
батько
коміт
ad4bf69509

+ 0 - 0
BFCommonKit/Classes/BFCategorys/BFBundle+Ext.swift → BFBundle+Ext.swift


+ 1 - 1
BFCommonKit.podspec

@@ -8,7 +8,7 @@
 # update framework 2021.11.1
 Pod::Spec.new do |s|
   s.name             = 'BFCommonKit'
-  s.version          = '1.4.9'
+  s.version          = '1.5.0'
   s.summary          = 'A short description of BFCommonKit.'
   s.swift_version    = '5.0'
 # This description is used to generate tags and improve search results.

+ 0 - 32
BFCommonKit/Classes/BFCategorys/UIControl+NXCategory.h

@@ -1,32 +0,0 @@
-//
-//  UIControl+acceptEventInterval.h
-//  NXlib
-//
-//  Created by AK on 15/9/15.
-//  Copyright (c) 2015年 AK. All rights reserved.
-//
-
-// 本类的作用
-// 防止多次连续点击事件,加一个两次点击的时间间隔,专治各种测试人员-_-!
-// 使用 addTarget:action:forControlEvents 给对象添加事件的都可以加时间间隔 如
-// UIButton、UISwitch、UITextField
-
-/*
- *	UIButton * testBtn;
- *  testBtn.uxy_acceptEventInterval = 2.5;
- */
-#import <UIKit/UIKit.h>
-
-@interface UIControl (NXCategory)
-
-/**
- *  设置重复点击加间隔。
- */
-@property(nonatomic, assign) NSTimeInterval uxy_acceptEventInterval;
-
-/**
- *  忽略本次点击。
- */
-@property(nonatomic) BOOL ignoreEvent;
-
-@end

+ 0 - 68
BFCommonKit/Classes/BFCategorys/UIControl+NXCategory.m

@@ -1,68 +0,0 @@
-//
-//  UIControl+acceptEventInterval.m
-//  NXlib
-//
-//  Created by AK on 15/9/15.
-//  Copyright (c) 2015年 AK. All rights reserved.
-//
-
-#import "UIControl+NXCategory.h"
-
-#if TARGET_OS_IPHONE
-#import <objc/message.h>
-#import <objc/runtime.h>
-#else
-#import <objc/objc-class.h>
-#endif
-
-@implementation UIControl (NXCategory)
-
-static const char *UIControl_acceptEventInterval = "UIControl_acceptEventInterval";
-static const char *UIControl_ignoreEvent = "UIControl_ignoreEvent";
-
-//改变两个方法的实现。在类第一次使用的时候回调用这个方法
-+ (void)load
-{
-    Method a = class_getInstanceMethod(self, @selector(sendAction:to:forEvent:));
-    Method b = class_getInstanceMethod(self, @selector(__uxy_sendAction:to:forEvent:));
-    //改变两个方法的实现
-    method_exchangeImplementations(a, b);  // isnt
-}
-//通过关联对象重写get和set方法
-- (NSTimeInterval)uxy_acceptEventInterval
-{
-    return [objc_getAssociatedObject(self, UIControl_acceptEventInterval) doubleValue];
-}
-
-- (void)setUxy_acceptEventInterval:(NSTimeInterval)uxy_acceptEventInterval
-{
-    objc_setAssociatedObject(self, UIControl_acceptEventInterval, @(uxy_acceptEventInterval),
-                             OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-}
-#pragma mark 现在是否可点的get和set。通过关联对象。
-- (void)setIgnoreEvent:(BOOL)ignoreEvent
-{
-    objc_setAssociatedObject(self, UIControl_ignoreEvent, @(ignoreEvent), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-}
-- (BOOL)ignoreEvent { return [objc_getAssociatedObject(self, UIControl_ignoreEvent) boolValue]; }
-- (void)__uxy_sendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event
-{
-    if (self.ignoreEvent)
-    {
-        NSLog(@"无效点击!!!!!!!!!!");
-        return;
-    }
-    if (self.uxy_acceptEventInterval > 0)
-    {
-        self.ignoreEvent = YES;
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.uxy_acceptEventInterval * NSEC_PER_SEC)),
-                       dispatch_get_main_queue(), ^{
-                           self.ignoreEvent = NO;
-                       });
-    }
-
-    //调用系统实现
-    [self __uxy_sendAction:action to:target forEvent:event];
-}
-
-@end

+ 17 - 18
BFCommonKit/Classes/BFUtility/PQCommonMethodUtil.swift

@@ -122,25 +122,24 @@ public func bf_getCurrentViewController() -> UIViewController? {
  
  */
 public func BFLog<T>( _ type : Int = 0, _ file:String = #file, _ line:Int = #line, message: T) {
-    let dateFmt = DateFormatter()
-    dateFmt.dateFormat = "HH:mm:ss:SSSS"
-    let file = (file as NSString).lastPathComponent;
-    let msg = "\(file) (L:\(line)) \(message)"
-    if type == 0{
-//        BuglyLog.level(.warn, logs: msg)
+//    let dateFmt = DateFormatter()
+//    dateFmt.dateFormat = "HH:mm:ss:SSSS"
+//    let file = (file as NSString).lastPathComponent;
+//    let msg = "\(file) (L:\(line)) \(message)"
+//    if type == 0{
+////        BuglyLog.level(.warn, logs: msg)
 //        print("\(dateFmt.string(from: Date())) \(msg)")
-    }
-#if DEBUG
-     if type == 11 {
-        print("hhz-\(dateFmt.string(from: Date())) \(msg)");
-     }else if type == 12 {
-        print("ak-\(dateFmt.string(from: Date())) \(msg)");
-     }else if type == 13 {
-        print("ww-\(dateFmt.string(from: Date())) \(msg)");
-     }
- 
-#endif
- 
+//    }
+//#if DEBUG
+//     if type == 1 {
+//        print("hhz-\(dateFmt.string(from: Date())) \(msg)");
+//     }else if type == 2 {
+//        print("ak-\(dateFmt.string(from: Date())) \(msg)");
+//     }else if type == 3 {
+//        print("ww-\(dateFmt.string(from: Date())) \(msg)");
+//     }
+//
+//#endif
 }
 
 // MARK: 获取公共参数

+ 0 - 6
Example/BFCommonKit.xcodeproj/project.pbxproj

@@ -272,12 +272,9 @@
 				"${PODS_ROOT}/Target Support Files/Pods-BFCommonKit_Example/Pods-BFCommonKit_Example-frameworks.sh",
 				"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
 				"${BUILT_PRODUCTS_DIR}/BFCommonKit/BFCommonKit.framework",
-				"${BUILT_PRODUCTS_DIR}/FDFullscreenPopGesture/FDFullscreenPopGesture.framework",
 				"${BUILT_PRODUCTS_DIR}/KeychainAccess/KeychainAccess.framework",
 				"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
 				"${BUILT_PRODUCTS_DIR}/KingfisherWebP/KingfisherWebP.framework",
-				"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
-				"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
 				"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
 				"${BUILT_PRODUCTS_DIR}/Toast-Swift/Toast_Swift.framework",
 				"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
@@ -286,12 +283,9 @@
 			outputPaths = (
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BFCommonKit.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FDFullscreenPopGesture.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KeychainAccess.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KingfisherWebP.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast_Swift.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",

+ 17 - 31
Example/Podfile.lock

@@ -1,35 +1,32 @@
 PODS:
   - Alamofire (5.4.4)
-  - BFCommonKit (1.4.9):
-    - BFCommonKit/BFBase (= 1.4.9)
-    - BFCommonKit/BFCategorys (= 1.4.9)
-    - BFCommonKit/BFConfig (= 1.4.9)
-    - BFCommonKit/BFDebug (= 1.4.9)
-    - BFCommonKit/BFEnums (= 1.4.9)
-    - BFCommonKit/BFUtility (= 1.4.9)
-  - BFCommonKit/BFBase (1.4.9):
+  - BFCommonKit (1.5.0):
+    - BFCommonKit/BFBase (= 1.5.0)
+    - BFCommonKit/BFCategorys (= 1.5.0)
+    - BFCommonKit/BFConfig (= 1.5.0)
+    - BFCommonKit/BFDebug (= 1.5.0)
+    - BFCommonKit/BFEnums (= 1.5.0)
+    - BFCommonKit/BFUtility (= 1.5.0)
+  - BFCommonKit/BFBase (1.5.0):
     - Alamofire (= 5.4.4)
     - BFCommonKit/BFCategorys
     - BFCommonKit/BFConfig
     - BFCommonKit/BFUtility
-    - FDFullscreenPopGesture (= 1.1)
-    - RealmSwift (= 10.7.6)
     - SnapKit (= 5.0.1)
-  - BFCommonKit/BFCategorys (1.4.9):
-    - KingfisherWebP
-  - BFCommonKit/BFConfig (1.4.9)
-  - BFCommonKit/BFDebug (1.4.9):
+  - BFCommonKit/BFCategorys (1.5.0):
+    - KingfisherWebP (= 1.3.0)
+  - BFCommonKit/BFConfig (1.5.0)
+  - BFCommonKit/BFDebug (1.5.0):
     - BFCommonKit/BFCategorys
-  - BFCommonKit/BFEnums (1.4.9)
-  - BFCommonKit/BFUtility (1.4.9):
+  - BFCommonKit/BFEnums (1.5.0)
+  - BFCommonKit/BFUtility (1.5.0):
     - Alamofire (= 5.4.4)
     - BFCommonKit/BFCategorys
     - BFCommonKit/BFConfig
     - KeychainAccess (= 4.2.2)
-    - Kingfisher
-    - KingfisherWebP
+    - Kingfisher (= 6.3.1)
+    - KingfisherWebP (= 1.3.0)
     - Toast-Swift (= 5.0.1)
-  - FDFullscreenPopGesture (1.1)
   - KeychainAccess (4.2.2)
   - Kingfisher (6.3.1)
   - KingfisherWebP (1.3.0):
@@ -44,11 +41,6 @@ PODS:
   - libwebp/mux (1.2.1):
     - libwebp/demux
   - libwebp/webp (1.2.1)
-  - Realm (10.7.6):
-    - Realm/Headers (= 10.7.6)
-  - Realm/Headers (10.7.6)
-  - RealmSwift (10.7.6):
-    - Realm (= 10.7.6)
   - SnapKit (5.0.1)
   - Toast-Swift (5.0.1)
 
@@ -58,13 +50,10 @@ DEPENDENCIES:
 SPEC REPOS:
   trunk:
     - Alamofire
-    - FDFullscreenPopGesture
     - KeychainAccess
     - Kingfisher
     - KingfisherWebP
     - libwebp
-    - Realm
-    - RealmSwift
     - SnapKit
     - Toast-Swift
 
@@ -74,14 +63,11 @@ EXTERNAL SOURCES:
 
 SPEC CHECKSUMS:
   Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9
-  BFCommonKit: af7ab17be94765ab4162fb43971167da4f41e0a0
-  FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
+  BFCommonKit: 8afeb14571a71f9ba92d82507976ca2bce899dc1
   KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
   Kingfisher: 016c8b653a35add51dd34a3aba36b580041acc74
   KingfisherWebP: dec17a5eb1af2658791bde1f93ae9a853678f826
   libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
-  Realm: ed860452717c8db8f4bf832b6807f7f2ce708839
-  RealmSwift: e31c4ddbcc42ac879313d656b86f9ca539f6f4f4
   SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
   Toast-Swift: 9b6a70f28b3bf0b96c40d46c0c4b9d6639846711