Browse Source

更新工具

Steven 1 year ago
parent
commit
62aa7ab660

+ 14 - 28
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -96,7 +96,6 @@
 		277931EF27E30FC20010E277 /* NSObject+Parse.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779310327E30FBE0010E277 /* NSObject+Parse.m */; };
 		277931F027E30FC20010E277 /* UIView+AddConstraints.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779310427E30FBE0010E277 /* UIView+AddConstraints.m */; };
 		277931F127E30FC20010E277 /* NSString+CZHSizeExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779310527E30FBE0010E277 /* NSString+CZHSizeExtension.m */; };
-		277931FF27E30FC30010E277 /* GRCreateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779312927E30FC00010E277 /* GRCreateManager.m */; };
 		2779320127E30FC30010E277 /* KSStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779313027E30FC00010E277 /* KSStatusView.m */; };
 		2779320427E30FC30010E277 /* KSHoldButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779313827E30FC00010E277 /* KSHoldButton.m */; };
 		2779320527E30FC30010E277 /* KSAudioRecordFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779313A27E30FC00010E277 /* KSAudioRecordFileManager.m */; };
@@ -107,7 +106,6 @@
 		2779320C27E30FC30010E277 /* KSMediaManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779314627E30FC00010E277 /* KSMediaManager.m */; };
 		2779321127E30FC30010E277 /* YKMultiLevelTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779314C27E30FC00010E277 /* YKMultiLevelTableView.m */; };
 		2779321227E30FC30010E277 /* YKNodeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779314D27E30FC00010E277 /* YKNodeModel.m */; };
-		2779322027E30FC30010E277 /* GRScanManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779316E27E30FC00010E277 /* GRScanManager.m */; };
 		2779322527E30FC30010E277 /* NSString+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779317C27E30FC00010E277 /* NSString+MD5.m */; };
 		2779322627E30FC30010E277 /* KSMessageInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779317D27E30FC00010E277 /* KSMessageInputView.m */; };
 		2779322827E30FC30010E277 /* KeyChainTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 2779318227E30FC00010E277 /* KeyChainTools.m */; };
@@ -500,18 +498,17 @@
 		BC38C49D2AFA4C7D00ABFCC2 /* KSProgressLoadingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC38C49B2AFA4C7C00ABFCC2 /* KSProgressLoadingView.xib */; };
 		BC38C49E2AFA4C7D00ABFCC2 /* KSProgressLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC38C49C2AFA4C7D00ABFCC2 /* KSProgressLoadingView.m */; };
 		BC3A4EB728DAFCF7001C4428 /* MusicTagView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3A4EB628DAFCF7001C4428 /* MusicTagView.m */; };
+		BC3A55632BAA798A002E1616 /* KSToolLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A55602BAA7989002E1616 /* KSToolLibrary.framework */; };
+		BC3A55652BAA798A002E1616 /* CloudAccompanyLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A55622BAA798A002E1616 /* CloudAccompanyLibrary.framework */; };
+		BC3A55662BAA799B002E1616 /* KSTunerLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A55612BAA798A002E1616 /* KSTunerLibrary.framework */; };
+		BC3A55672BAA799C002E1616 /* KSTunerLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BC3A55612BAA798A002E1616 /* KSTunerLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		BC3ACD942890D60800060E97 /* FreezeListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3ACD932890D60800060E97 /* FreezeListViewController.m */; };
 		BC3ACD972890D61400060E97 /* NoRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3ACD962890D61400060E97 /* NoRecordViewController.m */; };
 		BC3ACD9A2890D88600060E97 /* IncomeRecordHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3ACD992890D88600060E97 /* IncomeRecordHeadView.m */; };
 		BC3ACD9C2890D88E00060E97 /* IncomeRecordHeadView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3ACD9B2890D88E00060E97 /* IncomeRecordHeadView.xib */; };
 		BC3ACD9F2891261800060E97 /* MyMusicNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3ACD9E2891261800060E97 /* MyMusicNavView.m */; };
 		BC3ACDA12891261F00060E97 /* MyMusicNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3ACDA02891261F00060E97 /* MyMusicNavView.xib */; };
-
-		BC3BF6202B9EAED300831494 /* CloudAccompanyLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3BF61F2B9EAED300831494 /* CloudAccompanyLibrary.framework */; };
-		BC3BF6212B9EAEEE00831494 /* KSTunerLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3BF61D2B9EAEB400831494 /* KSTunerLibrary.framework */; };
-		BC3BF6222B9EAEEE00831494 /* KSTunerLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BC3BF61D2B9EAEB400831494 /* KSTunerLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		BC3BF6362B9ED1F600831494 /* StateView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3BF6342B9ED1F600831494 /* StateView.m */; };
-		BC3BF63A2B9EF16F00831494 /* KSToolLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3BF6392B9EF16F00831494 /* KSToolLibrary.framework */; };
 		BC3BF6452B9FED9B00831494 /* ShareFunctionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3BF6432B9FED9A00831494 /* ShareFunctionView.xib */; };
 		BC3BF6462B9FED9B00831494 /* ShareFunctionView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3BF6442B9FED9B00831494 /* ShareFunctionView.m */; };
 		BC3DE082280D88670027DC0E /* EvaluateListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BC3DE081280D88670027DC0E /* EvaluateListModel.m */; };
@@ -1097,7 +1094,7 @@
 			dstPath = "";
 			dstSubfolderSpec = 10;
 			files = (
-				BC3BF6222B9EAEEE00831494 /* KSTunerLibrary.framework in Embed Frameworks */,
+				BC3A55672BAA799C002E1616 /* KSTunerLibrary.framework in Embed Frameworks */,
 			);
 			name = "Embed Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1257,8 +1254,6 @@
 		2779311C27E30FBE0010E277 /* NSObject+Parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+Parse.h"; sourceTree = "<group>"; };
 		2779311D27E30FBE0010E277 /* UIView+AddConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+AddConstraints.h"; sourceTree = "<group>"; };
 		2779311F27E30FBE0010E277 /* zhPopupController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zhPopupController.h; sourceTree = "<group>"; };
-		2779312927E30FC00010E277 /* GRCreateManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRCreateManager.m; sourceTree = "<group>"; };
-		2779312A27E30FC00010E277 /* GRScanManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRScanManager.h; sourceTree = "<group>"; };
 		2779313027E30FC00010E277 /* KSStatusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSStatusView.m; sourceTree = "<group>"; };
 		2779313627E30FC00010E277 /* KSAudioRecordManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSAudioRecordManager.h; sourceTree = "<group>"; };
 		2779313727E30FC00010E277 /* KSRecordStatusView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRecordStatusView.h; sourceTree = "<group>"; };
@@ -1281,8 +1276,6 @@
 		2779315227E30FC00010E277 /* NSString+MD5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MD5.h"; sourceTree = "<group>"; };
 		2779316727E30FC00010E277 /* KeyChainTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyChainTools.h; sourceTree = "<group>"; };
 		2779316827E30FC00010E277 /* KSStatusView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSStatusView.h; sourceTree = "<group>"; };
-		2779316E27E30FC00010E277 /* GRScanManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRScanManager.m; sourceTree = "<group>"; };
-		2779316F27E30FC00010E277 /* GRCreateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRCreateManager.h; sourceTree = "<group>"; };
 		2779317327E30FC00010E277 /* KSMediaManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSMediaManager.h; sourceTree = "<group>"; };
 		2779317C27E30FC00010E277 /* NSString+MD5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MD5.m"; sourceTree = "<group>"; };
 		2779317D27E30FC00010E277 /* KSMessageInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSMessageInputView.m; sourceTree = "<group>"; };
@@ -1950,6 +1943,9 @@
 		BC38C49C2AFA4C7D00ABFCC2 /* KSProgressLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSProgressLoadingView.m; sourceTree = "<group>"; };
 		BC3A4EB528DAFCF7001C4428 /* MusicTagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MusicTagView.h; sourceTree = "<group>"; };
 		BC3A4EB628DAFCF7001C4428 /* MusicTagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MusicTagView.m; sourceTree = "<group>"; };
+		BC3A55602BAA7989002E1616 /* KSToolLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSToolLibrary.framework; sourceTree = "<group>"; };
+		BC3A55612BAA798A002E1616 /* KSTunerLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSTunerLibrary.framework; sourceTree = "<group>"; };
+		BC3A55622BAA798A002E1616 /* CloudAccompanyLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CloudAccompanyLibrary.framework; sourceTree = "<group>"; };
 		BC3ACD922890D60800060E97 /* FreezeListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FreezeListViewController.h; sourceTree = "<group>"; };
 		BC3ACD932890D60800060E97 /* FreezeListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FreezeListViewController.m; sourceTree = "<group>"; };
 		BC3ACD952890D61400060E97 /* NoRecordViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NoRecordViewController.h; sourceTree = "<group>"; };
@@ -1960,12 +1956,9 @@
 		BC3ACD9D2891261800060E97 /* MyMusicNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyMusicNavView.h; sourceTree = "<group>"; };
 		BC3ACD9E2891261800060E97 /* MyMusicNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyMusicNavView.m; sourceTree = "<group>"; };
 		BC3ACDA02891261F00060E97 /* MyMusicNavView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyMusicNavView.xib; sourceTree = "<group>"; };
-		BC3BF61D2B9EAEB400831494 /* KSTunerLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSTunerLibrary.framework; sourceTree = "<group>"; };
-		BC3BF61F2B9EAED300831494 /* CloudAccompanyLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CloudAccompanyLibrary.framework; sourceTree = "<group>"; };
 		BC3BF6242B9EAF1700831494 /* client.p12 */ = {isa = PBXFileReference; lastKnownFileType = file; path = client.p12; sourceTree = "<group>"; };
 		BC3BF6342B9ED1F600831494 /* StateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StateView.m; sourceTree = "<group>"; };
 		BC3BF6352B9ED1F600831494 /* StateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StateView.h; sourceTree = "<group>"; };
-		BC3BF6392B9EF16F00831494 /* KSToolLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KSToolLibrary.framework; sourceTree = "<group>"; };
 		BC3BF6422B9FED9900831494 /* ShareFunctionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareFunctionView.h; sourceTree = "<group>"; };
 		BC3BF6432B9FED9A00831494 /* ShareFunctionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShareFunctionView.xib; sourceTree = "<group>"; };
 		BC3BF6442B9FED9B00831494 /* ShareFunctionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareFunctionView.m; sourceTree = "<group>"; };
@@ -2857,6 +2850,7 @@
 				BCFF4814290172C600E9293A /* AudioKit in Frameworks */,
 				BC8B6E642856ED0700866917 /* TencentOpenAPI.framework in Frameworks */,
 				2779334727E3148E0010E277 /* GLKit.framework in Frameworks */,
+				BC3A55632BAA798A002E1616 /* KSToolLibrary.framework in Frameworks */,
 				2779334527E314870010E277 /* VideoToolbox.framework in Frameworks */,
 				2779334327E3147C0010E277 /* OpenGLES.framework in Frameworks */,
 				BC8B6E552856ED0600866917 /* UMCommon.framework in Frameworks */,
@@ -2865,10 +2859,9 @@
 				BC8B6E612856ED0600866917 /* libWeiboSDK.a in Frameworks */,
 				BC8B6E532856ED0600866917 /* UMAPM.framework in Frameworks */,
 				2779333F27E314640010E277 /* CoreVideo.framework in Frameworks */,
-				BC3BF63A2B9EF16F00831494 /* KSToolLibrary.framework in Frameworks */,
-				BC3BF6202B9EAED300831494 /* CloudAccompanyLibrary.framework in Frameworks */,
+				BC3A55652BAA798A002E1616 /* CloudAccompanyLibrary.framework in Frameworks */,
 				BC8B6E572856ED0600866917 /* UMDevice.framework in Frameworks */,
-				BC3BF6212B9EAEEE00831494 /* KSTunerLibrary.framework in Frameworks */,
+				BC3A55662BAA799B002E1616 /* KSTunerLibrary.framework in Frameworks */,
 				2779334127E3146B0010E277 /* CoreMedia.framework in Frameworks */,
 				2779333D27E314550010E277 /* AVFoundation.framework in Frameworks */,
 				2779333B27E314450010E277 /* AudioToolbox.framework in Frameworks */,
@@ -3024,7 +3017,6 @@
 				BC66739E2BA8421100FC01A5 /* PrivacyInfo.xcprivacy */,
 				BC255E802B29424900A1FC27 /* SwiftImportHeader.h */,
 				BC255E812B29424900A1FC27 /* WebViewBaseConfig.h */,
-				BCDE35892897B48E00A9A560 /* shareImage@2x.png */,
 				BC3BF61A2B9EAE7A00831494 /* ToolKit */,
 				BCF880D92B91C4C40007B8F0 /* configuration */,
 				277935D927E325B90010E277 /* Module */,
@@ -3327,10 +3319,6 @@
 		2779312227E30FC00010E277 /* Custom */ = {
 			isa = PBXGroup;
 			children = (
-				2779316F27E30FC00010E277 /* GRCreateManager.h */,
-				2779312927E30FC00010E277 /* GRCreateManager.m */,
-				2779312A27E30FC00010E277 /* GRScanManager.h */,
-				2779316E27E30FC00010E277 /* GRScanManager.m */,
 				2779316727E30FC00010E277 /* KeyChainTools.h */,
 				2779318227E30FC00010E277 /* KeyChainTools.m */,
 				2779317327E30FC00010E277 /* KSMediaManager.h */,
@@ -5082,11 +5070,11 @@
 		BC3BF61A2B9EAE7A00831494 /* ToolKit */ = {
 			isa = PBXGroup;
 			children = (
+				BC3A55622BAA798A002E1616 /* CloudAccompanyLibrary.framework */,
+				BC3A55602BAA7989002E1616 /* KSToolLibrary.framework */,
+				BC3A55612BAA798A002E1616 /* KSTunerLibrary.framework */,
 				BC24570E286C437D00D1F7C0 /* SoundFontFile */,
 				BC3BF6242B9EAF1700831494 /* client.p12 */,
-				BC3BF6392B9EF16F00831494 /* KSToolLibrary.framework */,
-				BC3BF61F2B9EAED300831494 /* CloudAccompanyLibrary.framework */,
-				BC3BF61D2B9EAEB400831494 /* KSTunerLibrary.framework */,
 			);
 			path = ToolKit;
 			sourceTree = "<group>";
@@ -8012,7 +8000,6 @@
 				BC0A22BA2847523E0065C1AB /* MemberListCell.m in Sources */,
 				BC31BF822B219C5700F7D538 /* MetronomeManager.m in Sources */,
 				27D83F4C27F3EC1500062476 /* CreateLiveBodyView.m in Sources */,
-				2779322027E30FC30010E277 /* GRScanManager.m in Sources */,
 				BC8C2C642824EB9000FBA5D5 /* NotiferHeadView.m in Sources */,
 				BC106B772A8F4586000759A9 /* TXLiveMessageDownSeat.m in Sources */,
 				BC31BF7F2B219C5700F7D538 /* WidgetViewController.m in Sources */,
@@ -8135,7 +8122,6 @@
 				BC12638028FEB5B900509E90 /* UserDetailNavView.m in Sources */,
 				BC106BAC2A8F45AA000759A9 /* TXUISeatMember.m in Sources */,
 				BCB9FA1C286D537E005D766B /* KSScanViewController.m in Sources */,
-				277931FF27E30FC30010E277 /* GRCreateManager.m in Sources */,
 				BC14A62428A212C50086395C /* HomeHotMusicView.m in Sources */,
 				BCECE21F2B3D5F0800C0D555 /* FeedbackBodyView.m in Sources */,
 				2779326627E30FD80010E277 /* FSCalendarCell.m in Sources */,

+ 0 - 189
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/GRCreateManager.m

@@ -1,189 +0,0 @@
-//
-//  GRCreateManager.m
-//  GreenRoad
-//
-//  Created by  jetsum on 2017/2/13.
-//  Copyright © 2017年  jetsum. All rights reserved.
-//
-
-#import "GRCreateManager.h"
-
-@implementation GRCreateManager
-
-//二维码生成
-+ (UIImage *)generateQRCodeImage:(NSString *)source  size: (CGSize)size{
-    if (!source || ![source isKindOfClass:[NSString class]]) {
-        return nil;
-    }
-    if ([NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){9,0,0}])  {
-        source = [source stringByRemovingPercentEncoding];
-    }else {
-        source = [source stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    }
-   
-    if (!source.length) {
-        return nil;
-    }
-    NSData *data = [source dataUsingEncoding:NSUTF8StringEncoding];
-    CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
-    [filter setValue:data forKey:@"inputMessage"];
-    [filter setValue:@"Q" forKey:@"inputCorrectionLevel"];
-    
-//   UIImage *image = [self resizeCodeImage:filter.outputImage withSize:size];
-    //    return image;
-    return [self createNonInterpolatedUIImageFormCIImage:filter.outputImage withSize:size];
-}
-
-//条形码生成
-+ (UIImage *)generateBarCodeImage:(NSString *)source size:(CGSize)size
-{
-    if (!source || ![source isKindOfClass:[NSString class]]) {
-        return nil;
-    }
-//    source = [source stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    if ([NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){9,0,0}])  {
-        source = [source stringByRemovingPercentEncoding];
-    }else {
-        source = [source stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    }
-    if (!source.length) {
-        return nil;
-    }
-    // iOS 8.0以上的系统才支持条形码的生成,iOS8.0以下使用第三方控件生成
-    if ([NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){8,0,0}]) {
-//        // 注意生成条形码的编码方式
-//        NSData *data = [source dataUsingEncoding: NSASCIIStringEncoding];
-//        CIFilter *filter = [CIFilter filterWithName:@"CICode128BarcodeGenerator"];
-//        [filter setValue:data forKey:@"inputMessage"];
-//        // 设置生成的条形码的上,下,左,右的margins的值
-//        [filter setValue:[NSNumber numberWithInteger:0] forKey:@"inputQuietSpace"];
-//        
-//        UIImage *image = [self resizeCodeImage:filter.outputImage withSize:size];
-//        
-//        return image;
-        
-        // @"CICode128BarcodeGenerator"  条形码
-        // @"CIAztecCodeGenerator"       二维码
-        NSString *filtername = @"CICode128BarcodeGenerator";
-        
-        
-        CIFilter *filter = [CIFilter filterWithName:filtername];
-        [filter setDefaults];
-        
-        NSData *data = [source dataUsingEncoding:NSUTF8StringEncoding];
-        [filter setValue:data forKey:@"inputMessage"];
-        
-        CIImage *outputImage = [filter outputImage];
-        CIContext *context = [CIContext contextWithOptions:nil];
-        CGImageRef cgImage = [context createCGImage:outputImage
-                                           fromRect:[outputImage extent]];
-        UIImage *image = [UIImage imageWithCGImage:cgImage
-                                             scale:1.
-                                       orientation:UIImageOrientationUp];
-        
-        // Resize without interpolating
-//        CGFloat scaleRate = size.width / image.size.width;
-        UIImage *resized = [self resizeImage:image
-                                   withQuality:kCGInterpolationNone
-                                          rate:1];
-        CGImageRelease(cgImage);
-        return resized;
-    }else{
-        return nil;
-    }
-}
-
-/**
- *  调整生成的图片的大小
- *
- *  @param image CIImage对象
- *  @param size  需要的UIImage的大小
- *
- *  @return size大小的UIImage对象
- */
-+ (UIImage *) resizeCodeImage:(CIImage *)image withSize:(CGSize)size
-{
-    if (image) {
-        CGRect extent = CGRectIntegral(image.extent);
-        CGFloat scaleWidth = size.width/CGRectGetWidth(extent);
-        CGFloat scaleHeight = size.height/CGRectGetHeight(extent);
-        size_t width = CGRectGetWidth(extent) * scaleWidth;
-        size_t height = CGRectGetHeight(extent) * scaleHeight;
-        CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceGray();
-        CGContextRef contentRef = CGBitmapContextCreate(nil, width, height, 8, 0, colorSpaceRef, (CGBitmapInfo)kCGImageAlphaNone);
-        CIContext *context = [CIContext contextWithOptions:nil];
-        CGImageRef imageRef = [context createCGImage:image fromRect:extent];
-        CGContextSetInterpolationQuality(contentRef, kCGInterpolationLow);
-        CGContextScaleCTM(contentRef, scaleWidth, scaleHeight);
-        CGContextDrawImage(contentRef, extent, imageRef);
-        CGImageRef imageRefResized = CGBitmapContextCreateImage(contentRef);
-    
-        
-        UIImage *completeImg = [UIImage imageWithCGImage:imageRefResized];
-        CGColorSpaceRelease(colorSpaceRef);
-        CGContextRelease(contentRef);
-        CGImageRelease(imageRef);
-        CGImageRelease(imageRefResized);
-        return completeImg;
-//        return [UIImage imageWithCGImage:imageRefResized];
-    }else{
-        return nil;
-    }
-}
-
-+ (UIImage *)resizeImage:(UIImage *)image
-             withQuality:(CGInterpolationQuality)quality
-                    rate:(CGFloat)rate {
-    UIImage *resized = nil;
-    CGFloat width    = image.size.width * rate;
-    CGFloat height   = image.size.height * rate;
-    
-    UIGraphicsBeginImageContext(CGSizeMake(width, height));
-    CGContextRef context = UIGraphicsGetCurrentContext();
-    CGContextSetInterpolationQuality(context, quality);
-    [image drawInRect:CGRectMake(0, 0, width, height)];
-    resized = UIGraphicsGetImageFromCurrentImageContext();
-    UIGraphicsEndImageContext();
-    
-    return resized;
-}
-
-/**
- *  根据CIImage生成指定大小的UIImage
- *
- *  @param image CIImage
- *  @param size  图片宽高
- */
-+ (UIImage *)createNonInterpolatedUIImageFormCIImage:(CIImage *)image withSize:(CGSize) size
-{
-    if (!image) {
-        return nil;
-    }
-    CGRect extent = CGRectIntegral(image.extent);
-//    CGFloat scale = MIN(size/CGRectGetWidth(extent), size/CGRectGetHeight(extent));
-//    size_t width = CGRectGetWidth(extent) * scale;
-//    size_t height = CGRectGetHeight(extent) * scale;
-    CGFloat scaleWidth = size.width/CGRectGetWidth(extent);
-    CGFloat scaleHeight = size.height/CGRectGetHeight(extent);
-    size_t width = CGRectGetWidth(extent) * scaleWidth;
-    size_t height = CGRectGetHeight(extent) * scaleHeight;
-    // 1.创建bitmap;
-    CGColorSpaceRef cs = CGColorSpaceCreateDeviceGray();
-    CGContextRef bitmapRef = CGBitmapContextCreate(nil, width, height, 8, 0, cs, (CGBitmapInfo)kCGImageAlphaNone);
-    CIContext *context = [CIContext contextWithOptions:nil];
-    CGImageRef bitmapImage = [context createCGImage:image fromRect:extent];
-    CGContextSetInterpolationQuality(bitmapRef, kCGInterpolationNone);
-    CGContextScaleCTM(bitmapRef, scaleWidth, scaleHeight);
-    CGContextDrawImage(bitmapRef, extent, bitmapImage);
-    
-    // 2.保存bitmap到图片
-    CGImageRef scaledImage = CGBitmapContextCreateImage(bitmapRef);
-    UIImage *img = [UIImage imageWithCGImage:scaledImage];
-    CGColorSpaceRelease(cs);
-    CGContextRelease(bitmapRef);
-    CGImageRelease(bitmapImage);
-    CGImageRelease(scaledImage);;
-    return img;
-}
-
-@end

+ 0 - 226
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/GRScanManager.m

@@ -1,226 +0,0 @@
-//
-//  GRCodeManager.m
-//  GreenRoad
-//
-//  Created by Vecige on 16/11/17.
-//  Copyright © 2016年  jetsum. All rights reserved.
-//
-
-#import "GRScanManager.h"
-#import <AVFoundation/AVFoundation.h>
-#import <AudioToolbox/AudioToolbox.h>
-
-@interface GRScanManager()<AVCaptureMetadataOutputObjectsDelegate>
-
-@property (copy, nonatomic) void (^completionBlock) (NSString *);
-
-@property (nonatomic, strong) AVCaptureSession *session;
-
-@property (nonatomic, strong) dispatch_queue_t sessionQueue;
-
-
-@end
-
-@implementation GRScanManager
-
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        _supportQRCode = YES;
-        _supportBarCode = YES;
-        [self createQueue];
-    }
-    return self;
-}
-
-/**
- *  创建一个队列,防止阻塞主线程
- */
-- (void)createQueue{
-    dispatch_queue_t sessionQueue = dispatch_queue_create("com.Colexiu.KulexiuForStudent.sesson", DISPATCH_QUEUE_SERIAL);
-    self.sessionQueue = sessionQueue;
-}
-
-
-#pragma mark - 扫描二维码
-#pragma mark 开始扫描
-- (void)startScanningQRCodeWithInView:(UIView *)inView scanView:(UIView *)scanView resultCallback:(void(^)(NSString *result))callback {
-    
-    if ([self.session isRunning]) {
-        [self.session stopRunning];
-        self.session = nil;
-    }
-    
-    // 0.保存block
-    self.completionBlock = callback;
-    
-    // 1.创建输入
-    // 1.1.定义错误
-    NSError *error = nil;
-    
-    // 1.2.获取摄像头
-    AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
-    
-    if ([device respondsToSelector:@selector(setVideoZoomFactor:)]) {
-        if ([ device lockForConfiguration:nil]) {
-            //            float zoomFactor = device.activeFormat.videoZoomFactorUpscaleThreshold;
-            float zoomFactor = 2.0;
-            [device setVideoZoomFactor:zoomFactor];
-            [device unlockForConfiguration];
-        }
-    }
-    
-    // 1.3.创建输入
-    AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error];
-    if (error != nil) {
-        return;
-    }
-    
-    // 2.创建输出
-    AVCaptureMetadataOutput *output = [[AVCaptureMetadataOutput alloc] init];
-    [output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];
-    
-    // 3.创建捕捉会话
-    AVCaptureSession *session = [[AVCaptureSession alloc] init];
-    [session addInput:input];
-    [session addOutput:output];
-    
-    self.session = session;
-    
-    // 4.设置输入的内容类型
-    //    [output setMetadataObjectTypes:@[AVMetadataObjectTypeQRCode]];
-//    [output setMetadataObjectTypes:@[AVMetadataObjectTypeQRCode, AVMetadataObjectTypeEAN13Code, AVMetadataObjectTypeEAN8Code, AVMetadataObjectTypeCode128Code]];
-    NSMutableArray *types = [NSMutableArray array];
-    if (self.supportQRCode) {
-        [types addObject:AVMetadataObjectTypeQRCode];
-    }
-    if (self.supportBarCode) {
-        [types addObjectsFromArray:@[AVMetadataObjectTypeEAN13Code, AVMetadataObjectTypeEAN8Code, AVMetadataObjectTypeCode128Code]];
-    }
-    [output setMetadataObjectTypes:[types copy]];
-    // 5.添加预览图层(让用户看到扫描的界面)
-    // 5.1.创建图层
-    AVCaptureVideoPreviewLayer *previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
-    previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
-    // 5.2.设置的layer的frame
-    previewLayer.frame = inView.bounds;
-
-    inView.clipsToBounds = YES;
-    inView.layer.masksToBounds = YES;
-    scanView.clipsToBounds = YES;
-    scanView.layer.masksToBounds = YES;
-    // 5.3.将图层添加到其它图层中
-    [inView.layer insertSublayer:previewLayer below:scanView.layer];
-    [previewLayer setAffineTransform:CGAffineTransformMakeScale(2.0, 2.0)];
-
-    // 6.设置扫描区域
-    CGSize screenSize = [UIScreen mainScreen].bounds.size;
-    CGFloat x = scanView.frame.origin.y / screenSize.height;
-    CGFloat y = scanView.frame.origin.x / screenSize.width;
-    CGFloat w = scanView.frame.size.height / screenSize.height;
-    CGFloat h = scanView.frame.size.width / screenSize.width;
-    output.rectOfInterest = CGRectMake(x, y, w, h);
-    
-    // 7.开始扫描
-    [self sessionStartRunning];
-}
-- (void)sessionStartRunning {
-    
-    @weakObj(self);
-    dispatch_async(self.sessionQueue, ^{
-        @strongObj(self);
-        if (!self.session.running) {
-            [self.session startRunning];
-        }
-    });
-}
-
--(void)sessionStopRunning{
-    
-    @weakObj(self);
-    dispatch_async(self.sessionQueue, ^{
-        @strongObj(self);
-        if (self.session.running) {
-            [self.session stopRunning];
-        }
-    });
-}
-
-#pragma mark - 实现AVCaptureMetadataOutput代理方法
-- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection {
-    // 1.遍历结果
-    
-    for (AVMetadataMachineReadableCodeObject *result in metadataObjects) {
-        NSString *scannedResult = [(AVMetadataMachineReadableCodeObject *) result stringValue];
-        [self addwarningtone];
-       BLOCK_EXEC(_completionBlock,scannedResult);
-//                [self stopScanning];
-        break;
-    }
-}
-
-#pragma mark 给扫描结果添加提示音
--(void)addwarningtone{
-    SystemSoundID soundID = 1000;
-    AudioServicesPlaySystemSound(soundID);
-    AudioServicesPlayAlertSound(soundID);
-}
-
-
-+ (BOOL)isAvailable
-{
-    @autoreleasepool {
-        AVCaptureDevice *captureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
-        
-        if (!captureDevice) {
-            return NO;
-        }
-        
-        NSError *error;
-        AVCaptureDeviceInput *deviceInput = [AVCaptureDeviceInput deviceInputWithDevice:captureDevice error:&error];
-        
-        if (!deviceInput || error) {
-            return NO;
-        }
-        
-        return YES;
-    }
-}
-
-
-+ (BOOL)supportsMetadataObjectTypes:(NSArray *)metadataObjectTypes
-{
-    if (![self isAvailable]) {
-        return NO;
-    }
-    
-    @autoreleasepool {
-        // Setup components
-        AVCaptureDevice *captureDevice    = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
-        AVCaptureDeviceInput *deviceInput = [AVCaptureDeviceInput deviceInputWithDevice:captureDevice error:nil];
-        AVCaptureMetadataOutput *output   = [[AVCaptureMetadataOutput alloc] init];
-        AVCaptureSession *session         = [[AVCaptureSession alloc] init];
-        
-        [session addInput:deviceInput];
-        [session addOutput:output];
-        
-        if (metadataObjectTypes == nil || metadataObjectTypes.count == 0) {
-            // Check the QRCode metadata object type by default
-            metadataObjectTypes = @[AVMetadataObjectTypeQRCode];
-        }
-        
-        for (NSString *metadataObjectType in metadataObjectTypes) {
-            if (![output.availableMetadataObjectTypes containsObject:metadataObjectType]) {
-                return NO;
-            }
-        }
-        
-        return YES;
-    }
-}
-
-- (void)stopScanning {
-    [self sessionStopRunning];
-}
-
-@end

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/ScanView/Controller/KSScanViewController.m

@@ -6,7 +6,7 @@
 //
 
 #import "KSScanViewController.h"
-#import "GRScanManager.h"
+#import <KSToolLibrary/GRScanManager.h>
 #import "ScanNavView.h"
 #import "KSBaseWKWebViewController.h"
 #import "KSMediaManager.h"

BIN
KulexiuForTeacher/KulexiuForTeacher/ToolKit/CloudAccompanyLibrary.framework/CloudAccompanyLibrary


BIN
KulexiuForTeacher/KulexiuForTeacher/ToolKit/CloudAccompanyLibrary.framework/_CodeSignature/CodeDirectory


BIN
KulexiuForTeacher/KulexiuForTeacher/ToolKit/CloudAccompanyLibrary.framework/_CodeSignature/CodeRequirements-1


BIN
KulexiuForTeacher/KulexiuForTeacher/ToolKit/CloudAccompanyLibrary.framework/_CodeSignature/CodeSignature


+ 3 - 0
KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/Headers/BaseMaroDefine.h

@@ -8,6 +8,9 @@
 #ifndef BaseMaroDefine_h
 #define BaseMaroDefine_h
 
+#define BLOCK_EXEC(block, ...) !block ?: block(__VA_ARGS__);
+
+
 #pragma mark ------ 宽高相关
 
 #define kScreenWidth [UIScreen mainScreen].bounds.size.width

+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/GRCreateManager.h → KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/Headers/GRCreateManager.h


+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/Custom/GRScanManager.h → KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/Headers/GRScanManager.h


+ 1 - 0
KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/Headers/NSString+Extension.h

@@ -35,6 +35,7 @@ typedef NS_ENUM(NSInteger,CHECKTYPE){
 - (NSString *)getUrlEndcodeString;
 // 移除endcodeing
 - (NSString *)removeUrlEndcodeString;
+
 // 获取保存文件名
 - (NSString *)getUrlFileName;
 /**

BIN
KulexiuForTeacher/KulexiuForTeacher/ToolKit/KSToolLibrary.framework/KSToolLibrary