批量批改

This commit is contained in:
pengguangjian 2024-11-18 18:22:58 +08:00
parent 364693e4ad
commit c77b9cde18
58 changed files with 2295 additions and 50 deletions

View File

@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
664551746CA42328436EB43A /* Pods_ProductApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E9D1598912BF8D031CA536 /* Pods_ProductApp.framework */; };
CA0372992CE6E954001CE910 /* CamreImageEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0372982CE6E954001CE910 /* CamreImageEditViewController.m */; };
CA0688CD2CD328C500DF7025 /* ToolCheckModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0688CC2CD328C500DF7025 /* ToolCheckModel.m */; };
CA0688D02CD3291900DF7025 /* OcrModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0688CF2CD3291900DF7025 /* OcrModel.m */; };
CA0688D32CD329AD00DF7025 /* TranslateLanguageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA0688D22CD329AD00DF7025 /* TranslateLanguageModel.m */; };
@ -97,6 +98,18 @@
CA22D1DE2CD0C77B00CA7E93 /* FanWenSearchView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1DD2CD0C77B00CA7E93 /* FanWenSearchView.m */; };
CA22D1E12CD0C7F300CA7E93 /* FanWenSearchHestoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1E02CD0C7F300CA7E93 /* FanWenSearchHestoryView.m */; };
CA22D1E42CD0D7B200CA7E93 /* ChatRoomTipsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA22D1E32CD0D7B200CA7E93 /* ChatRoomTipsModel.m */; };
CA2A38D12CEB0C4600156CD2 /* ImageEditDrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38C52CEB0C4600156CD2 /* ImageEditDrawView.m */; };
CA2A38D22CEB0C4600156CD2 /* MosaiManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38C82CEB0C4600156CD2 /* MosaiManager.m */; };
CA2A38D32CEB0C4600156CD2 /* MosaiPath.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38CA2CEB0C4600156CD2 /* MosaiPath.m */; };
CA2A38D42CEB0C4600156CD2 /* MosaiView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38CC2CEB0C4600156CD2 /* MosaiView.m */; };
CA2A38D52CEB0C4600156CD2 /* ImageEditDrawViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38CF2CEB0C4600156CD2 /* ImageEditDrawViewController.m */; };
CA2A38D92CEB142300156CD2 /* PiLiangXiuGaiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38D82CEB142300156CD2 /* PiLiangXiuGaiViewController.m */; };
CA2A38DD2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */; };
CA2A38E02CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */; };
CA2A38E42CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38E32CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m */; };
CA2A38E82CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2A38E72CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m */; };
CA2DB77D2CE5814200AF3DAD /* NotNetWorkView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA2DB77C2CE5814200AF3DAD /* NotNetWorkView.m */; };
CA2DB7822CE5E17F00AF3DAD /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2DB7812CE5E17F00AF3DAD /* StoreKit.framework */; };
CA3868572CC1F66E009C98B0 /* LoginAppleView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA38684C2CC1F66E009C98B0 /* LoginAppleView.m */; };
CA3868582CC1F66E009C98B0 /* LoginTelView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA38684E2CC1F66E009C98B0 /* LoginTelView.m */; };
CA3868592CC1F66E009C98B0 /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA3868502CC1F66E009C98B0 /* LoginView.m */; };
@ -546,6 +559,8 @@
/* Begin PBXFileReference section */
87167CC240BDAA55C86F80DE /* Pods-ProductApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProductApp.debug.xcconfig"; path = "Target Support Files/Pods-ProductApp/Pods-ProductApp.debug.xcconfig"; sourceTree = "<group>"; };
B3DBEC0C6ED0E182F65EDBEA /* Pods-ProductApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProductApp.release.xcconfig"; path = "Target Support Files/Pods-ProductApp/Pods-ProductApp.release.xcconfig"; sourceTree = "<group>"; };
CA0372972CE6E954001CE910 /* CamreImageEditViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CamreImageEditViewController.h; sourceTree = "<group>"; };
CA0372982CE6E954001CE910 /* CamreImageEditViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CamreImageEditViewController.m; sourceTree = "<group>"; };
CA0688CB2CD328C500DF7025 /* ToolCheckModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToolCheckModel.h; sourceTree = "<group>"; };
CA0688CC2CD328C500DF7025 /* ToolCheckModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToolCheckModel.m; sourceTree = "<group>"; };
CA0688CE2CD3291900DF7025 /* OcrModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OcrModel.h; sourceTree = "<group>"; };
@ -726,6 +741,29 @@
CA22D1E02CD0C7F300CA7E93 /* FanWenSearchHestoryView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FanWenSearchHestoryView.m; sourceTree = "<group>"; };
CA22D1E22CD0D7B200CA7E93 /* ChatRoomTipsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatRoomTipsModel.h; sourceTree = "<group>"; };
CA22D1E32CD0D7B200CA7E93 /* ChatRoomTipsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatRoomTipsModel.m; sourceTree = "<group>"; };
CA2A38C42CEB0C4600156CD2 /* ImageEditDrawView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageEditDrawView.h; sourceTree = "<group>"; };
CA2A38C52CEB0C4600156CD2 /* ImageEditDrawView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageEditDrawView.m; sourceTree = "<group>"; };
CA2A38C72CEB0C4600156CD2 /* MosaiManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MosaiManager.h; sourceTree = "<group>"; };
CA2A38C82CEB0C4600156CD2 /* MosaiManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MosaiManager.m; sourceTree = "<group>"; };
CA2A38C92CEB0C4600156CD2 /* MosaiPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MosaiPath.h; sourceTree = "<group>"; };
CA2A38CA2CEB0C4600156CD2 /* MosaiPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MosaiPath.m; sourceTree = "<group>"; };
CA2A38CB2CEB0C4600156CD2 /* MosaiView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MosaiView.h; sourceTree = "<group>"; };
CA2A38CC2CEB0C4600156CD2 /* MosaiView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MosaiView.m; sourceTree = "<group>"; };
CA2A38CE2CEB0C4600156CD2 /* ImageEditDrawViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageEditDrawViewController.h; sourceTree = "<group>"; };
CA2A38CF2CEB0C4600156CD2 /* ImageEditDrawViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageEditDrawViewController.m; sourceTree = "<group>"; };
CA2A38D72CEB142300156CD2 /* PiLiangXiuGaiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiViewController.h; sourceTree = "<group>"; };
CA2A38D82CEB142300156CD2 /* PiLiangXiuGaiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiViewController.m; sourceTree = "<group>"; };
CA2A38DB2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiTableViewCell.h; sourceTree = "<group>"; };
CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiTableViewCell.m; sourceTree = "<group>"; };
CA2A38DE2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiPGTableViewCell.h; sourceTree = "<group>"; };
CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiPGTableViewCell.m; sourceTree = "<group>"; };
CA2A38E22CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiLiShiViewController.h; sourceTree = "<group>"; };
CA2A38E32CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiLiShiViewController.m; sourceTree = "<group>"; };
CA2A38E62CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiLiShiTableViewCell.h; sourceTree = "<group>"; };
CA2A38E72CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiLiShiTableViewCell.m; sourceTree = "<group>"; };
CA2DB77B2CE5814200AF3DAD /* NotNetWorkView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotNetWorkView.h; sourceTree = "<group>"; };
CA2DB77C2CE5814200AF3DAD /* NotNetWorkView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotNetWorkView.m; sourceTree = "<group>"; };
CA2DB7812CE5E17F00AF3DAD /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
CA38684B2CC1F66E009C98B0 /* LoginAppleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginAppleView.h; sourceTree = "<group>"; };
CA38684C2CC1F66E009C98B0 /* LoginAppleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginAppleView.m; sourceTree = "<group>"; };
CA38684D2CC1F66E009C98B0 /* LoginTelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginTelView.h; sourceTree = "<group>"; };
@ -1602,6 +1640,7 @@
CA3868812CC23A0E009C98B0 /* SystemConfiguration.framework in Frameworks */,
CA38687F2CC23A06009C98B0 /* QuartzCore.framework in Frameworks */,
CA38687D2CC239FF009C98B0 /* libz.tbd in Frameworks */,
CA2DB7822CE5E17F00AF3DAD /* StoreKit.framework in Frameworks */,
CA38687B2CC239FA009C98B0 /* libc++.tbd in Frameworks */,
CA3868792CC239EA009C98B0 /* CoreTelephony.framework in Frameworks */,
CA3868772CC239E3009C98B0 /* CoreLocation.framework in Frameworks */,
@ -1955,10 +1994,13 @@
CA0D08802CA568120086855E /* 自定义相机 */ = {
isa = PBXGroup;
children = (
CA2A38D02CEB0C4600156CD2 /* ImageEditDraw */,
CA11ED5E2CA6555B00209DFC /* cell */,
CA11ED572CA6489600209DFC /* view */,
CA0D08812CA5682D0086855E /* CamreViewController.h */,
CA0D08822CA5682D0086855E /* CamreViewController.m */,
CA0372972CE6E954001CE910 /* CamreImageEditViewController.h */,
CA0372982CE6E954001CE910 /* CamreImageEditViewController.m */,
);
path = "自定义相机";
sourceTree = "<group>";
@ -2159,6 +2201,80 @@
path = view;
sourceTree = "<group>";
};
CA2A38C62CEB0C4600156CD2 /* view */ = {
isa = PBXGroup;
children = (
CA2A38C42CEB0C4600156CD2 /* ImageEditDrawView.h */,
CA2A38C52CEB0C4600156CD2 /* ImageEditDrawView.m */,
);
path = view;
sourceTree = "<group>";
};
CA2A38CD2CEB0C4600156CD2 /* YJMosaiView */ = {
isa = PBXGroup;
children = (
CA2A38C72CEB0C4600156CD2 /* MosaiManager.h */,
CA2A38C82CEB0C4600156CD2 /* MosaiManager.m */,
CA2A38C92CEB0C4600156CD2 /* MosaiPath.h */,
CA2A38CA2CEB0C4600156CD2 /* MosaiPath.m */,
CA2A38CB2CEB0C4600156CD2 /* MosaiView.h */,
CA2A38CC2CEB0C4600156CD2 /* MosaiView.m */,
);
path = YJMosaiView;
sourceTree = "<group>";
};
CA2A38D02CEB0C4600156CD2 /* ImageEditDraw */ = {
isa = PBXGroup;
children = (
CA2A38CD2CEB0C4600156CD2 /* YJMosaiView */,
CA2A38C62CEB0C4600156CD2 /* view */,
CA2A38CE2CEB0C4600156CD2 /* ImageEditDrawViewController.h */,
CA2A38CF2CEB0C4600156CD2 /* ImageEditDrawViewController.m */,
);
path = ImageEditDraw;
sourceTree = "<group>";
};
CA2A38D62CEB13E300156CD2 /* 批量批改 */ = {
isa = PBXGroup;
children = (
CA2A38E12CEB45BB00156CD2 /* 历史记录 */,
CA2A38DA2CEB2CCA00156CD2 /* cell */,
CA2A38D72CEB142300156CD2 /* PiLiangXiuGaiViewController.h */,
CA2A38D82CEB142300156CD2 /* PiLiangXiuGaiViewController.m */,
);
path = "批量批改";
sourceTree = "<group>";
};
CA2A38DA2CEB2CCA00156CD2 /* cell */ = {
isa = PBXGroup;
children = (
CA2A38DB2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.h */,
CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */,
CA2A38DE2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.h */,
CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */,
);
path = cell;
sourceTree = "<group>";
};
CA2A38E12CEB45BB00156CD2 /* 历史记录 */ = {
isa = PBXGroup;
children = (
CA2A38E52CEB464200156CD2 /* cell */,
CA2A38E22CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.h */,
CA2A38E32CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m */,
);
path = "历史记录";
sourceTree = "<group>";
};
CA2A38E52CEB464200156CD2 /* cell */ = {
isa = PBXGroup;
children = (
CA2A38E62CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.h */,
CA2A38E72CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m */,
);
path = cell;
sourceTree = "<group>";
};
CA3868532CC1F66E009C98B0 /* view */ = {
isa = PBXGroup;
children = (
@ -3007,6 +3123,7 @@
CABA145A2C9D0AF2002CB3B1 /* 首页 */ = {
isa = PBXGroup;
children = (
CA2A38D62CEB13E300156CD2 /* 批量批改 */,
CA0C3AAE2CB5051800E01A72 /* 智能PPT生成 */,
CAB0D3722CAA47CF009BF67D /* 智能写作 */,
CAA600CE2CA9470800026CF4 /* 课堂写作 */,
@ -3121,6 +3238,8 @@
CABA14862C9D277E002CB3B1 /* view */ = {
isa = PBXGroup;
children = (
CA2DB77B2CE5814200AF3DAD /* NotNetWorkView.h */,
CA2DB77C2CE5814200AF3DAD /* NotNetWorkView.m */,
CABA14872C9D2AE2002CB3B1 /* StartGNTiShiView.h */,
CABA14882C9D2AE2002CB3B1 /* StartGNTiShiView.m */,
CABA14CF2C9D4961002CB3B1 /* StartGNView.h */,
@ -4499,6 +4618,7 @@
F2AFD5F388A8B6D60B4992F6 /* Frameworks */ = {
isa = PBXGroup;
children = (
CA2DB7812CE5E17F00AF3DAD /* StoreKit.framework */,
CA3868802CC23A0E009C98B0 /* SystemConfiguration.framework */,
CA38687E2CC23A06009C98B0 /* QuartzCore.framework */,
CA38687C2CC239FF009C98B0 /* libz.tbd */,
@ -4739,6 +4859,7 @@
CA5D03272CC0DDF0007B3BA5 /* PayPublicView.m in Sources */,
CA5D02A82CC0B2DE007B3BA5 /* ZhangHuGuanLiAlterView.m in Sources */,
CB489DD027449D5C00DA044A /* ViewController.m in Sources */,
CA2A38D92CEB142300156CD2 /* PiLiangXiuGaiViewController.m in Sources */,
CA0FD6902CA8EECE009A4417 /* XieZuoFenXiangAlterTableViewCell.m in Sources */,
CAC806702CA16E0700C21AA7 /* StartPZXZView.m in Sources */,
CB489FAA2744A0BD00DA044A /* UIImage+XLExtension.m in Sources */,
@ -4762,6 +4883,7 @@
CB489F612744A0BD00DA044A /* ListAlterView.m in Sources */,
CA5D02E02CC0DD6B007B3BA5 /* UserConfigModel.m in Sources */,
CBD422C028DAF38900C32440 /* KAlterView.m in Sources */,
CA2A38DD2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m in Sources */,
CA0D08302CA4FBDB0086855E /* ShouYeXieZuoTableViewCell.m in Sources */,
CABA14BB2C9D4330002CB3B1 /* PublicUploadImageManager.m in Sources */,
CA6B97292CBD04FA000213F3 /* AIChatModel.m in Sources */,
@ -4842,6 +4964,7 @@
CA6B97372CBD2102000213F3 /* AIChaAnswerTableViewCell.m in Sources */,
CAF2BC812CCF8D2700028275 /* FanWenSearchListViewController.m in Sources */,
CB489F4B2744A0BD00DA044A /* PGGDatePickView.m in Sources */,
CA0372992CE6E954001CE910 /* CamreImageEditViewController.m in Sources */,
CB489FB72744A0BD00DA044A /* UIAlertController+Blocks.m in Sources */,
CABA14612C9D0B1C002CB3B1 /* ShouYeViewController.m in Sources */,
CA5D02E72CC0DD6B007B3BA5 /* OrderGoodsModel.m in Sources */,
@ -4871,6 +4994,7 @@
CA11ED782CA69B5200209DFC /* GaiXieRunSeView.m in Sources */,
CB489F6D2744A0BD00DA044A /* UIView+Additions.m in Sources */,
CAB0D3752CAA47F3009BF67D /* ZhiNengXieZuoViewController.m in Sources */,
CA2A38D12CEB0C4600156CD2 /* ImageEditDrawView.m in Sources */,
CAF76E972CBE6AB900825E5E /* GongJuCreateTimeTwoView.m in Sources */,
CABA14CD2C9D4395002CB3B1 /* NSString+AES.m in Sources */,
CA42579C2CA2998200A36A10 /* StartZNPPTDaGangViewController.m in Sources */,
@ -4932,6 +5056,7 @@
CB489FB02744A0BD00DA044A /* FSActionSheet.m in Sources */,
CB489F652744A0BD00DA044A /* DAYComponentView.m in Sources */,
CA22D1CD2CD0829300CA7E93 /* CorrectSaveDetailModel.m in Sources */,
CA2A38D22CEB0C4600156CD2 /* MosaiManager.m in Sources */,
CB489FAC2744A0BD00DA044A /* XLPhotoBrowser.m in Sources */,
CB489F522744A0BD00DA044A /* PlayAudio.m in Sources */,
CA0D08492CA534ED0086855E /* ShouYeShenFenCollectionViewCell.m in Sources */,
@ -4957,6 +5082,7 @@
CB489F602744A0BD00DA044A /* GETCorelLocation.m in Sources */,
CB489F892744A0BD00DA044A /* TagInfoModel.m in Sources */,
CABA14712C9D0D4E002CB3B1 /* StartViewController.m in Sources */,
CA2A38D32CEB0C4600156CD2 /* MosaiPath.m in Sources */,
CABA14892C9D2AE2002CB3B1 /* StartGNTiShiView.m in Sources */,
CAF76E7A2CBE569500825E5E /* SearchInputHestoryView.m in Sources */,
CA5D02E12CC0DD6B007B3BA5 /* M3u8Model.m in Sources */,
@ -4964,6 +5090,7 @@
CB489F8E2744A0BD00DA044A /* UITextFieldYS.m in Sources */,
CA6B97302CBD11B1000213F3 /* AIChatFunctionCollectionViewCell.m in Sources */,
CB489F922744A0BD00DA044A /* IndexGetNewsModel.m in Sources */,
CA2DB77D2CE5814200AF3DAD /* NotNetWorkView.m in Sources */,
CAC806522CA137E600C21AA7 /* StartZNXZViewController.m in Sources */,
CAA600DD2CA95B0200026CF4 /* KeTangXieZuoNJTableViewCell.m in Sources */,
CA5D02A12CC0B2DE007B3BA5 /* PeiZhiShowView.m in Sources */,
@ -5016,6 +5143,7 @@
CAA144CA2CDC66A300A25AC4 /* UpdataAlterView.m in Sources */,
CB489F8A2744A0BD00DA044A /* UIButton+HQCustomIcon.m in Sources */,
CA4257912CA2652D00A36A10 /* StartZNPPTView.m in Sources */,
CA2A38E02CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m in Sources */,
CB489F632744A0BD00DA044A /* CountDownManager.m in Sources */,
CB489F9A2744A0BD00DA044A /* baseInfoModel.m in Sources */,
CA9CFF742CCA2FB200C3E90E /* SSEDrawListTextModel.m in Sources */,
@ -5073,6 +5201,7 @@
CA6B97162CBCBCC1000213F3 /* FanWenDetailViewController.m in Sources */,
CABD8C8D2CBF91B0009A5E5E /* GongJuWenBenView.m in Sources */,
CB489F802744A0BD00DA044A /* NSString+Base64.m in Sources */,
CA2A38E42CEB45DA00156CD2 /* PiLiangXiuGaiLiShiViewController.m in Sources */,
CA0D08572CA543440086855E /* ShouYeLSKTPGTableViewCell.m in Sources */,
CB489FD82744A30000DA044A /* PGGMovieLineSetView.m in Sources */,
CB489F4D2744A0BD00DA044A /* AddressListAlterView.m in Sources */,
@ -5097,6 +5226,7 @@
CA0D082D2CA4F8930086855E /* ShouYeZNXZTableViewCell.m in Sources */,
CA0688D02CD3291900DF7025 /* OcrModel.m in Sources */,
CA07CD232CC6601500AF41ED /* SSENetWorkManager.m in Sources */,
CA2A38E82CEB464C00156CD2 /* PiLiangXiuGaiLiShiTableViewCell.m in Sources */,
CAF76E872CBE5F8B00825E5E /* GongJuCreateView.m in Sources */,
CA07CD172CC5F25B00AF41ED /* TextbookDetailModel.m in Sources */,
CAB0D3792CAA488C009BF67D /* ZhiNengXieZuoView.m in Sources */,
@ -5106,6 +5236,7 @@
CA5D02E52CC0DD6B007B3BA5 /* UserAuthModel.m in Sources */,
CABD8C982CBF9D26009A5E5E /* LanguageKeyModel.m in Sources */,
CA11ED612CA6556900209DFC /* CamreImagesCollectionViewCell.m in Sources */,
CA2A38D42CEB0C4600156CD2 /* MosaiView.m in Sources */,
CAF76E942CBE69F900825E5E /* GongJuCreateTimeView.m in Sources */,
CA0D08452CA5316B0086855E /* ShouYeShenFenView.m in Sources */,
CA0688E82CD374CD00DF7025 /* NSString+JavaSubstring.m in Sources */,
@ -5135,6 +5266,7 @@
CA11ED702CA6946500209DFC /* KaiTongAlterTQView.m in Sources */,
CA6B972C2CBD10FB000213F3 /* AIChatFunctionView.m in Sources */,
CAB0D3712CAA3DAE009BF67D /* KeTangXieZuoXiangQingView.m in Sources */,
CA2A38D52CEB0C4600156CD2 /* ImageEditDrawViewController.m in Sources */,
CABA14CE2C9D4395002CB3B1 /* MIUAES.m in Sources */,
CA0FD69A2CA8F6DE009A4417 /* FenXiangHaiBaoView.m in Sources */,
CB489F562744A0BD00DA044A /* amrFileCodec.m in Sources */,
@ -5296,7 +5428,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = D5PBFE23SF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -5367,7 +5499,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ProductApp/ProductApp.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = D5PBFE23SF;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (

View File

@ -141,7 +141,7 @@ self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
{
if ([url.host isEqualToString:@"safepay"])
{
//
//
[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
[[NSNotificationCenter defaultCenter] postNotificationName:ZhiFuBaoPayNotifi object:resultDic];
}];

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "网络错误@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "网络错误@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

View File

@ -13,6 +13,7 @@
#import "PublicNetWorkManager.h"
#import "RoleTreeModel.h"
#import "StartPayViewController.h"
#import "LoginViewController.h"
static UserInfoModel *userinfo;
@implementation UserInfoModel
@ -117,12 +118,13 @@ static UserInfoModel *userinfo;
+(BOOL)pushLoinVC:(UIViewController *)vc ispush:(BOOL)ispush
{
///
if([[[UserInfoModel shareModel].config objectForKey:@"client.nologin.pay.enable"] intValue] == 0 && [UserInfoModel shareModel].temp.intValue == 1)
if([[[UserInfoModel shareModel].config objectForKey:@"client.nologin.pay.enable"] intValue] == 1 && [UserInfoModel shareModel].temp.intValue == 1)
{
if(ispush)
{
// LoginViewController *lvc = [[LoginViewController alloc] init];
// [vc.navigationController pushViewController:lvc animated:YES];
LoginViewController *lvc = [[LoginViewController alloc] init];
lvc.isbind = YES;
[vc.navigationController pushViewController:lvc animated:YES];
[HXHud showMessage:@"请登录" afterDelayType:0];
}
@ -186,13 +188,14 @@ static UserInfoModel *userinfo;
int icode = code.intValue;
if(icode==1001003||icode==1001004||icode==1001005)
{///
LoginViewController *lvc = [[LoginViewController alloc] init];
AppDelegate *appde = (AppDelegate *)[UIApplication sharedApplication].delegate;
[appde.window setRootViewController:[[NavgationController alloc] initWithRootViewController:lvc]];
}
else if (icode==12002||icode==12003||icode==12004)
{///
}
});
}

View File

@ -27,7 +27,8 @@ NS_ASSUME_NONNULL_BEGIN
///
#define WeiXinStringPay @"5b6u5L+h5pSv5LuY"
#define ZhiFuBaoStringPay @"5pSv5LuY5a6d5pSv5LuY"
//#define ZhiFuBaoStringPay @"5pSv5LuY5a6d5pSv5LuY"
#define ZhiFuBaoStringPay @"5pSv5LuY5a6d"
///zfb
#define ZhiFuBaoPayNotifi @"ZhiFuBaoPayNotifi"
@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
#define WeiXinZhiFuSQ @"WeiXinZhiFuSQ" ///支付
#define WeiXinAPPID @"wx31efd88bd33ae068"
#define WeiXinUrlLink @"https://aiw.batiao8.com/ulink/"

View File

@ -8,6 +8,7 @@
#import "PayPublicView.h"
#import "PayPublicYouHuiView.h"
#import "PublicNetWorkManager.h"
#import "NSString+Base64.h"
@interface PayPublicView ()
///
@ -256,7 +257,7 @@
}
else if([title isEqualToString:@"alipay"])
{
strname = @"支付宝";
strname = [ZhiFuBaoStringPay base64DecodedString];
[btitem setTag:2];
}
[lbname setText:strname];

View File

@ -33,6 +33,10 @@
///
@property (nonatomic , strong) AIChatModel *modelAudio;
@property (nonatomic , assign) BOOL isDragging;
///
@property (nonatomic , strong) NSString *chat_start_time;
@end
@implementation AIChatViewController
@ -475,7 +479,13 @@
[self.tableView beginUpdates];
NSInteger nowtime = [[NSDate date] timeIntervalSince1970];
NSDictionary *dicpush = @{@"chat_start_time":[NSString stringWithFormat:@"%ld",nowtime],
if(self.chat_start_time.length==0)
{
NSString *chat_start_time = [NSString stringWithFormat:@"%ld",nowtime];
self.chat_start_time = chat_start_time;
}
NSDictionary *dicpush = @{@"chat_start_time":self.chat_start_time,
@"content":[Tools isStringnil:value]};
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/chat/room?scene=chat_room"] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {

View File

@ -46,7 +46,7 @@ static PayManager *manager = nil;
{
self.source = source;
self.number = number;
self.orderId = @"";
[LoadAlterView show];
[PublicNetWorkManager requestOrderData:nil goods_id:goods_id pay_type:pay_type source:source pay_source:@"app" coupon:coupon Callback:^(BOOL state, PayOrderModel *responseObject, NSString * _Nullable describle) {
if(state)

View File

@ -44,10 +44,12 @@
make.top.offset(NavHeight-20);
}];
[btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
if(self.viewController.navigationController.viewControllers.count<=1)
{
[btback setHidden:YES];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.viewController.navigationController.viewControllers.count<=1)
{
[btback setHidden:YES];
}
});
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"Hello"];

View File

@ -59,10 +59,13 @@
}];
[btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
if(self.viewController.navigationController.viewControllers.count<=1)
{
[btback setHidden:YES];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.viewController.navigationController.viewControllers.count<=1)
{
[btback setHidden:YES];
}
});
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"Hello"];

View File

@ -44,10 +44,12 @@
make.top.offset(NavHeight-20);
}];
[btback addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
if(self.viewController.navigationController.viewControllers.count<=1)
{
[btback setHidden:YES];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.viewController.navigationController.viewControllers.count<=1)
{
[btback setHidden:YES];
}
});
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"Hello"];

View File

@ -25,6 +25,7 @@
#import "NetWorkManager.h"
#import "PublicNetWorkManager.h"
#import "NotNetWorkView.h"
@interface StartViewController ()
///
@ -40,6 +41,9 @@
///
@property (nonatomic , strong) UserConfigModelData *modelDetail;
///
@property (nonatomic , strong) NotNetWorkView *noview;
@end
@implementation StartViewController
@ -54,16 +58,16 @@
[self.navigationView setHidden:YES];
[self.navigationController setNavigationBarHidden:YES animated:NO];
///
NSArray* familys = [UIFont familyNames];
for (int i = 0; i<[familys count]; i++) {
NSString* family = [familys objectAtIndex:i];
NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family);
NSArray* fonts = [UIFont fontNamesForFamilyName:family];
for (int j = 0; j<[fonts count]; j++) {
NSLog(@"%@",[fonts objectAtIndex:j]);
}
}
// ///
// NSArray* familys = [UIFont familyNames];
// for (int i = 0; i<[familys count]; i++) {
// NSString* family = [familys objectAtIndex:i];
// NSLog(@"\r\n\r\nFontfamily:%@\r\n=====",family);
// NSArray* fonts = [UIFont fontNamesForFamilyName:family];
// for (int j = 0; j<[fonts count]; j++) {
// NSLog(@"%@",[fonts objectAtIndex:j]);
// }
// }
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"yd_back"]];
@ -110,6 +114,17 @@
[self.arrLB addObject:lbitem];
}
NotNetWorkView *noview = [[NotNetWorkView alloc] init];
[self.view addSubview:noview];
[noview mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
[noview setHidden:YES];
[noview setBackValue:^{
[Tools pushAppSet];
}];
_noview = noview;
UIImageView *imgvmeng = [[UIImageView alloc] init];
[imgvmeng setImage:[UIImage imageNamed:@"qidong"]];
[imgvmeng setContentMode:UIViewContentModeScaleAspectFill];
@ -271,6 +286,8 @@
case AFNetworkReachabilityStatusNotReachable:
self.isnetwork = NO;
[self.imgvmeng setHidden:YES];
[self.noview setHidden:NO];
break;
case AFNetworkReachabilityStatusReachableViaWWAN:
@ -346,6 +363,7 @@
[PublicNetWorkManager requestUserConfigData:self.view idfa:stridfa Callback:^(BOOL state, UserConfigModel *responseObject, NSString * _Nullable describle) {
if(state)
{
[self.noview setHidden:YES];
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"huoquidfanotifi" object:nil];
self.modelDetail = responseObject.data;
[UserInfoModel setToken:responseObject.data.token];

View File

@ -0,0 +1,17 @@
//
// NotNetWorkView.h
// ProductApp
//
// Created by 工作 on 2024/11/14.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^NotNetWorkViewBack)(void);
@interface NotNetWorkView : UIView
///
@property (nonatomic , strong) NotNetWorkViewBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,79 @@
//
// NotNetWorkView.m
// ProductApp
//
// Created by on 2024/11/14.
//
#import "NotNetWorkView.h"
@implementation NotNetWorkView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
[self setBackgroundColor:[UIColor whiteColor]];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"网络错误"]];
[self addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self);
make.centerY.equalTo(self).offset(-100);
make.width.height.offset(UISCREEN_WIDTH-160);
}];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"网络错误"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont systemFontOfSize:16]];
[self addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self);
make.top.equalTo(imgvback.mas_bottom).offset(40);
}];
UILabel *lbts = [[UILabel alloc] init];
[lbts setText:@"网络连接错误请检查您的网络状态或者重启刷新APP"];
[lbts setTextColor:RGBCOLOR(51, 51, 51)];
[lbts setTextAlignment:NSTextAlignmentCenter];
[lbts setFont:[UIFont systemFontOfSize:12]];
[lbts setNumberOfLines:0];
[self addSubview:lbts];
[lbts mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(imgvback);
make.top.equalTo(lbname.mas_bottom).offset(15);
}];
UIButton *btref = [[UIButton alloc] init];
[btref setTitle:@"刷新" forState:UIControlStateNormal];
[btref setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal];
[btref.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btref.layer setMasksToBounds:YES];
[btref.layer setCornerRadius:15];
[self addSubview:btref];
[btref mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.sizeOffset(CGSizeMake(90, 30));
make.centerX.equalTo(self);
make.top.equalTo(lbts.mas_bottom).offset(15);
}];
[btref.layer setBorderWidth:1];
[btref.layer setBorderColor:RGBCOLOR(79, 162, 255).CGColor];
[btref addTarget:self action:@selector(refAction) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
-(void)refAction
{
if(self.backValue)
{
self.backValue();
}
}
@end

View File

@ -58,7 +58,7 @@
if([str isEqualToString:@"weixin"])
{
[imgvback setImage:[UIImage imageNamed:@"微信pay"]];
[imgvback setImage:[UIImage imageNamed:@"wxzf"]];
[lbname setText:[WeiXinStringPay base64DecodedString]];
[btitem setImage:[UIImage imageNamed:@"wx_select_N"] forState:UIControlStateNormal];
[btitem setImage:[UIImage imageNamed:@"wx_select_Y"] forState:UIControlStateSelected];
@ -66,7 +66,7 @@
}
else if([str isEqualToString:@"alipay"])
{
[imgvback setImage:[UIImage imageNamed:@"支付宝pay"]];
[imgvback setImage:[UIImage imageNamed:@"zbzf"]];
[lbname setText:[ZhiFuBaoStringPay base64DecodedString]];
[btitem setImage:[UIImage imageNamed:@"zfb_select_N"] forState:UIControlStateNormal];
[btitem setImage:[UIImage imageNamed:@"zfb_select_Y"] forState:UIControlStateSelected];

View File

@ -383,13 +383,13 @@
if([UserInfoModel PayWXQuanXian]==NO)
{
NSMutableArray *arr = [NSMutableArray new];
for(OrderGoodsModelData *model in arrGoods)
{
[arr addObject:[Tools isStringnil:model.apple_buy_id]];
}
[self.manager getGoodsPrice:arr];
// NSMutableArray *arr = [NSMutableArray new];
// for(OrderGoodsModelData *model in arrGoods)
// {
// [arr addObject:[Tools isStringnil:model.apple_buy_id]];
// }
//
// [self.manager getGoodsPrice:arr];
}
}
@ -434,7 +434,7 @@
///
[UserInfoModel pushLoinVC:self.viewController ispush:YES];
if([UserInfoModel pushLoinVC:self.viewController ispush:YES]==NO)return;
NSString *strc = [[UserInfoModel shareModel].config objectForKey:@"client.agreement.dialog"];
if((strc.intValue == 1 || [Tools isStringnil:strc].length==0) && self.btxiyi.selected == NO)

View File

@ -8,6 +8,7 @@
#import "ShouYeLSZWPGTableViewCell.h"
#import <libpag/PAGView.h>
#import "CamreViewController.h"
#import "PiLiangXiuGaiViewController.h"
@interface ShouYeLSZWPGTableViewCell ()
///
@ -37,7 +38,7 @@
[viewback setImage:[UIImage imageNamed:@"home_ls_zwpg"]];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"作文批改"];
[lbname setText:@"批量批改"];
[lbname setTextColor:RGBCOLOR(26, 26, 26)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont fontWithName:@"AlimamaShuHeiTi-Bold" size:24]];
@ -48,7 +49,7 @@
}];
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:@"拍照批改快速整理作文优缺点"];
[lbinfo setText:@"自定义拍照批量批改作文"];
[lbinfo setTextColor:RGBCOLOR(102, 102, 102)];
[lbinfo setTextAlignment:NSTextAlignmentLeft];
[lbinfo setFont:[UIFont systemFontOfSize:14]];
@ -111,11 +112,13 @@
-(void)nextAction
{
CamreViewController *vc = [CamreViewController new];
vc.type = 1;
PiLiangXiuGaiViewController *vc = [PiLiangXiuGaiViewController new];
[self.viewController.navigationController pushViewController:vc animated:YES];
[UserInfoModel shijianShangBao:0 key:@"client.jump.to.camera" value:@"correct" extra:@""];
// CamreViewController *vc = [CamreViewController new];
// vc.type = 1;
// [self.viewController.navigationController pushViewController:vc animated:YES];
//
// [UserInfoModel shijianShangBao:0 key:@"client.jump.to.camera" value:@"correct" extra:@""];
}
@end

View File

@ -0,0 +1,16 @@
//
// PiLiangXiuGaiViewController.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface PiLiangXiuGaiViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,246 @@
//
// PiLiangXiuGaiViewController.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "PiLiangXiuGaiViewController.h"
#import "PiLiangXiuGaiTableViewCell.h"
#import "PiLiangXiuGaiPGTableViewCell.h"
#import "PiLiangXiuGaiLiShiViewController.h"
@interface PiLiangXiuGaiViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@property (nonatomic , strong) UITableView *tableView;
@end
@implementation PiLiangXiuGaiViewController
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:NO];
[self.navigationView setTitle:@"批量批改" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor clearColor]];
[self.navigationView setMuenTitle:@"历史记录" titleColor:RGBCOLOR(26, 26, 26)];
[self.navigationView setMuenImg:@""];
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
-(void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
-(void)navBackButtonAction
{
[self.navigationController popViewControllerAnimated:YES];
}
-(void)navMuenButtonAction
{
PiLiangXiuGaiLiShiViewController *vc = [PiLiangXiuGaiLiShiViewController new];
[self.navigationController pushViewController:vc animated:YES];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:RGBCOLOR(246, 249, 250)];
UIView *viewback = [[UIView alloc] init];
[viewback setBackgroundColor:[UIColor whiteColor]];
[self.view addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(self.view);
}];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"plpg_backhd"]];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(viewback);
}];
[self.view sendSubviewToBack:viewback];
[self drawZDYView:viewback];
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
[tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
[tableView setBackgroundColor:[UIColor clearColor]];
[tableView setDelegate:self];
[tableView setDataSource:self];
[self.view addSubview:tableView];
[tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.equalTo(viewback.mas_bottom);
make.bottom.equalTo(self.view).offset(-TabHeight-20);
}];
_tableView = tableView;
UIView *viewbottom = [[UIView alloc] init];
[viewbottom setBackgroundColor:[UIColor whiteColor]];
[self.view addSubview:viewbottom];
[viewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.height.offset(TabHeight+20);
}];
[self drawBottomView:viewbottom];
}
-(void)drawBottomView:(UIView *)view
{
UIButton *btadd = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-32, 46)];
[btadd setTitle:@"添加作文" forState:UIControlStateNormal];
[btadd setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btadd.titleLabel setFont:[UIFont systemFontOfSize:15]];
[btadd.layer setMasksToBounds:YES];
[btadd.layer setCornerRadius:6];
// [btadd setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[view addSubview:btadd];
[btadd mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.top.offset(10);
make.right.equalTo(view).offset(-16);
make.height.offset(46);
}];
[btadd addTarget:self action:@selector(addAction) forControlEvents:UIControlEventTouchUpInside];
[btadd setIconInLeftWithSpacing:4];
[Tools changedView:btadd colors:MainJBColors startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
-(void)drawZDYView:(UIView *)viewback
{
UIView *view = [[UIView alloc] init];
[viewback addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewback);
make.top.offset(NavHeight);
make.height.offset(72);
}];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(view);
}];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: viewback.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(20,20)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = viewback.bounds;
maskLayer.path = maskPath.CGPath;
viewback.layer.mask = maskLayer;
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:0 shadowRadius:10];
});
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"plpg_通用批改"]];
[view addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.width.height.offset(40);
make.centerY.equalTo(view);
}];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"通用批改"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont boldSystemFontOfSize:15]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(imgvback.mas_right).offset(10);
make.centerY.equalTo(view);
}];
UIImageView *imgvnext = [[UIImageView alloc] init];
[imgvnext setImage:[UIImage imageNamed:@"plpj_next"]];
[view addSubview:imgvnext];
[imgvnext mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.offset(16);
make.centerY.equalTo(view);
make.right.equalTo(view).offset(-16);
}];
UILabel *lbzd = [[UILabel alloc] init];
[lbzd setText:@"自定义"];
[lbzd setTextColor:RGBCOLOR(153, 153, 153)];
[lbzd setTextAlignment:NSTextAlignmentLeft];
[lbzd setFont:[UIFont systemFontOfSize:14]];
[view addSubview:lbzd];
[lbzd mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(view);
make.right.equalTo(imgvnext.mas_left).offset(-4);
}];
UIButton *btzdy = [[UIButton alloc] init];
[view addSubview:btzdy];
[btzdy mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(view);
}];
[btzdy addTarget:self action:@selector(zidingyiAction) forControlEvents:UIControlEventTouchUpInside];
}
-(void)zidingyiAction
{
}
-(void)addAction
{
}
#pragma mark - UITableView
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 5;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row==0)
{
static NSString *strcell = @"PiLiangXiuGaiPGTableViewCell";
PiLiangXiuGaiPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
if(!cell)
{
cell = [[PiLiangXiuGaiPGTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundColor:[UIColor clearColor]];
}
return cell;
}
static NSString *strcell = @"PiLiangXiuGaiTableViewCell";
PiLiangXiuGaiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
if(!cell)
{
cell = [[PiLiangXiuGaiTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundColor:[UIColor clearColor]];
}
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 132;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
return [UIView new];
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
return [UIView new];
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
}
@end

View File

@ -0,0 +1,16 @@
//
// PiLiangXiuGaiPGTableViewCell.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface PiLiangXiuGaiPGTableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,87 @@
//
// PiLiangXiuGaiPGTableViewCell.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "PiLiangXiuGaiPGTableViewCell.h"
@interface PiLiangXiuGaiPGTableViewCell ()
@end
@implementation PiLiangXiuGaiPGTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
{
UIView *viewback = [[UIView alloc] init];
[viewback setBackgroundColor:[UIColor whiteColor]];
[self.contentView addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.right.equalTo(self).offset(-16);
make.top.offset(0);
make.bottom.equalTo(self).offset(-10);
}];
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
UIImageView *imgvback = [[UIImageView alloc] init];
// [imgvback setImage:[UIImage imageNamed:@""]];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.offset(14);
make.bottom.equalTo(viewback).offset(-14);
make.width.offset(72);
}];
[imgvback.layer setMasksToBounds:YES];
[imgvback.layer setCornerRadius:6];
[imgvback.layer setBorderWidth:1];
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
// _imgvback = imgvback;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
});
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"批改中..."];
[lbname setTextColor:RGBCOLOR(255, 59, 55)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont boldSystemFontOfSize:14]];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(viewback);
make.left.equalTo(imgvback.mas_right).offset(12);
make.right.equalTo(viewback).offset(-90);
}];
}
return self;
}
///
-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end
{
// CAGradientLayer
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = myView.bounds; // layerview
//
gradientLayer.colors = colors;
//
gradientLayer.startPoint = start;
gradientLayer.endPoint = end;
// layerviewlayer
CALayer *borderLayer = [CALayer layer];
borderLayer.frame = CGRectInset(myView.bounds, 1, 1); //
borderLayer.masksToBounds = YES;
borderLayer.contents = (__bridge id)([UIImage new].CGImage);
// layerborderLayermask
borderLayer.mask = gradientLayer;
// borderLayerviewlayer
[myView.layer addSublayer:borderLayer];
}
@end

View File

@ -0,0 +1,16 @@
//
// PiLiangXiuGaiTableViewCell.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface PiLiangXiuGaiTableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,215 @@
//
// PiLiangXiuGaiTableViewCell.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "PiLiangXiuGaiTableViewCell.h"
@interface PiLiangXiuGaiTableViewCell ()
@end
@implementation PiLiangXiuGaiTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
{
UIView *viewback = [[UIView alloc] init];
[viewback setBackgroundColor:[UIColor whiteColor]];
[self.contentView addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.right.equalTo(self).offset(-16);
make.top.offset(0);
make.bottom.equalTo(self).offset(-10);
}];
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
UIImageView *imgvback = [[UIImageView alloc] init];
// [imgvback setImage:[UIImage imageNamed:@""]];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.offset(14);
make.bottom.equalTo(viewback).offset(-14);
make.width.offset(72);
}];
[imgvback.layer setMasksToBounds:YES];
[imgvback.layer setCornerRadius:6];
[imgvback.layer setBorderWidth:1];
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
// _imgvback = imgvback;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
});
UIView *viewfen = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 16)];
[imgvback addSubview:viewfen];
[viewfen mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.equalTo(imgvback);
make.width.offset(30);
make.height.offset(16);
}];
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: viewfen.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(4,4)];
// layer
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = viewfen.bounds;
//
maskLayer.path = maskPath.CGPath;
viewfen.layer.mask = maskLayer;
[Tools changedView:viewfen colors:@[(id)RGBCOLOR(255, 113, 110).CGColor,(id)RGBCOLOR(242, 61, 79).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 1)];
UILabel *lbfen = [[UILabel alloc] init];
[lbfen setText:@"86分"];
[lbfen setTextColor:[UIColor whiteColor]];
[lbfen setTextAlignment:NSTextAlignmentCenter];
[lbfen setFont:[UIFont systemFontOfSize:10]];
[viewfen addSubview:lbfen];
[lbfen mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewfen);
}];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"抓星星的奇妙瞬间"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont boldSystemFontOfSize:14]];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(14);
make.left.equalTo(imgvback.mas_right).offset(12);
make.right.equalTo(viewback).offset(-90);
}];
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:@"评语:请加强语句结构化,静态事物描述不够仔细,其中有错别字..."];
[lbinfo setTextColor:RGBCOLOR(153, 153, 153)];
[lbinfo setTextAlignment:NSTextAlignmentLeft];
[lbinfo setFont:[UIFont systemFontOfSize:12]];
[lbinfo setNumberOfLines:2];
[viewback addSubview:lbinfo];
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(6);
make.right.equalTo(viewback).offset(-12);
}];
UILabel *lbtime = [[UILabel alloc] init];
[lbtime setText:@"2024-10-17 14:10:23"];
[lbtime setTextColor:RGBCOLOR(153, 153, 153)];
[lbtime setTextAlignment:NSTextAlignmentLeft];
[lbtime setFont:[UIFont systemFontOfSize:10]];
[viewback addSubview:lbtime];
[lbtime mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.bottom.equalTo(imgvback).offset(-5);
}];
UIButton *btxq = [[UIButton alloc] init];
[btxq setTitle:@"查看详情" forState:UIControlStateNormal];
[btxq setTitleColor:RGBCOLOR(153, 153, 153) forState:UIControlStateNormal];
[btxq.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btxq setImage:[UIImage imageNamed:@"plpj_next"] forState:UIControlStateNormal];
[viewback addSubview:btxq];
[btxq mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(viewback).offset(-12);
make.centerY.equalTo(lbname);
make.height.offset(30);
make.width.offset(80);
}];
[btxq setIconInRight];
[btxq setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];
[btxq setUserInteractionEnabled:NO];
UIButton *btcheck = [[UIButton alloc] init];
[btcheck setTitle:@"查看评语" forState:UIControlStateNormal];
[btcheck setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal];
[btcheck.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btcheck.layer setMasksToBounds:YES];
[btcheck.layer setCornerRadius:4];
[btcheck setBackgroundColor:RGBCOLOR(239, 240, 255)];
[viewback addSubview:btcheck];
[btcheck mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(lbinfo);
make.centerY.equalTo(lbtime);
make.size.sizeOffset(CGSizeMake(60, 24));
}];
[btcheck addTarget:self action:@selector(chakanAction) forControlEvents:UIControlEventTouchUpInside];
UIButton *btsave = [[UIButton alloc] init];
[btsave setTitle:@"保存" forState:UIControlStateNormal];
[btsave setTitleColor:RGBCOLOR(255, 119, 29) forState:UIControlStateNormal];
[btsave.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btsave.layer setMasksToBounds:YES];
[btsave.layer setCornerRadius:4];
[btsave setBackgroundColor:RGBCOLOR(255, 241, 232)];
[viewback addSubview:btsave];
[btsave mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(btcheck.mas_left).offset(-10);
make.centerY.equalTo(lbtime);
make.width.offset(44);
make.height.offset(24);
}];
[btsave addTarget:self action:@selector(saveAction) forControlEvents:UIControlEventTouchUpInside];
UIView *viewpoint = [[UIView alloc] init];
[viewpoint setBackgroundColor:RGBCOLOR(12, 219, 199)];
[btsave addSubview:viewpoint];
[viewpoint mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.offset(5);
make.left.offset(0);
make.centerY.equalTo(btsave);
}];
[viewpoint.layer setMasksToBounds:YES];
[viewpoint.layer setCornerRadius:2.5];
[viewpoint setHidden:YES];
[btsave setTitle:@"已保存" forState:UIControlStateNormal];
[btsave setTitleColor:RGBCOLOR(12, 219, 199) forState:UIControlStateNormal];
[btsave mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.offset(47);
}];
[btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];///UIControlContentHorizontalAlignmentCenter
[viewpoint setHidden:NO];
[btsave setBackgroundColor:[UIColor clearColor]];
}
return self;
}
///
-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end
{
// CAGradientLayer
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = myView.bounds; // layerview
//
gradientLayer.colors = colors;
//
gradientLayer.startPoint = start;
gradientLayer.endPoint = end;
// layerviewlayer
CALayer *borderLayer = [CALayer layer];
borderLayer.frame = CGRectInset(myView.bounds, 1, 1); //
borderLayer.masksToBounds = YES;
borderLayer.contents = (__bridge id)([UIImage new].CGImage);
// layerborderLayermask
borderLayer.mask = gradientLayer;
// borderLayerviewlayer
[myView.layer addSublayer:borderLayer];
}
-(void)chakanAction
{
}
-(void)saveAction
{
}
@end

View File

@ -0,0 +1,16 @@
//
// PiLiangXiuGaiLiShiViewController.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface PiLiangXiuGaiLiShiViewController : BaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,92 @@
//
// PiLiangXiuGaiLiShiViewController.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "PiLiangXiuGaiLiShiViewController.h"
#import "PiLiangXiuGaiLiShiTableViewCell.h"
@interface PiLiangXiuGaiLiShiViewController ()<UITableViewDelegate,UITableViewDataSource>
///
@property (nonatomic , strong) UITableView *tableView;
@end
@implementation PiLiangXiuGaiLiShiViewController
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"历史记录" titleColor:RGBCOLOR(60, 60, 60)];
[self.navigationView setBackgroundColor:[UIColor whiteColor]];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:RGBCOLOR(246, 249, 250)];
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
[tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
[tableView setBackgroundColor:[UIColor clearColor]];
[tableView setDelegate:self];
[tableView setDataSource:self];
[self.view addSubview:tableView];
[tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.top.offset(NavHeight);
make.bottom.equalTo(self.view);
}];
_tableView = tableView;
}
#pragma mark - UITableView
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 5;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *strcell = @"PiLiangXiuGaiLiShiTableViewCell";
PiLiangXiuGaiLiShiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
if(!cell)
{
cell = [[PiLiangXiuGaiLiShiTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[cell setBackgroundColor:[UIColor clearColor]];
}
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 132;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
return [UIView new];
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
return [UIView new];
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
}
@end

View File

@ -0,0 +1,16 @@
//
// PiLiangXiuGaiLiShiTableViewCell.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface PiLiangXiuGaiLiShiTableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,174 @@
//
// PiLiangXiuGaiLiShiTableViewCell.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "PiLiangXiuGaiLiShiTableViewCell.h"
@interface PiLiangXiuGaiLiShiTableViewCell ()
@end
@implementation PiLiangXiuGaiLiShiTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
{
UIView *viewback = [[UIView alloc] init];
[viewback setBackgroundColor:[UIColor whiteColor]];
[self.contentView addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(16);
make.right.equalTo(self).offset(-16);
make.top.offset(0);
make.bottom.equalTo(self).offset(-10);
}];
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
UIImageView *imgvback = [[UIImageView alloc] init];
// [imgvback setImage:[UIImage imageNamed:@""]];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.offset(14);
make.bottom.equalTo(viewback).offset(-14);
make.width.offset(72);
}];
[imgvback.layer setMasksToBounds:YES];
[imgvback.layer setCornerRadius:6];
[imgvback.layer setBorderWidth:1];
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
// _imgvback = imgvback;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
});
UIView *viewfen = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 16)];
[imgvback addSubview:viewfen];
[viewfen mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.equalTo(imgvback);
make.width.offset(30);
make.height.offset(16);
}];
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: viewfen.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(4,4)];
// layer
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = viewfen.bounds;
//
maskLayer.path = maskPath.CGPath;
viewfen.layer.mask = maskLayer;
[Tools changedView:viewfen colors:@[(id)RGBCOLOR(255, 113, 110).CGColor,(id)RGBCOLOR(242, 61, 79).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 1)];
UILabel *lbfen = [[UILabel alloc] init];
[lbfen setText:@"86分"];
[lbfen setTextColor:[UIColor whiteColor]];
[lbfen setTextAlignment:NSTextAlignmentCenter];
[lbfen setFont:[UIFont systemFontOfSize:10]];
[viewfen addSubview:lbfen];
[lbfen mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewfen);
}];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"抓星星的奇妙瞬间"];
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont boldSystemFontOfSize:14]];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(14);
make.left.equalTo(imgvback.mas_right).offset(12);
make.right.equalTo(viewback).offset(-90);
}];
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:@"评语:请加强语句结构化,静态事物描述不够仔细,其中有错别字..."];
[lbinfo setTextColor:RGBCOLOR(153, 153, 153)];
[lbinfo setTextAlignment:NSTextAlignmentLeft];
[lbinfo setFont:[UIFont systemFontOfSize:12]];
[lbinfo setNumberOfLines:2];
[viewback addSubview:lbinfo];
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(6);
make.right.equalTo(viewback).offset(-12);
}];
UILabel *lbtime = [[UILabel alloc] init];
[lbtime setText:@"2024-10-17 14:10:23"];
[lbtime setTextColor:RGBCOLOR(153, 153, 153)];
[lbtime setTextAlignment:NSTextAlignmentLeft];
[lbtime setFont:[UIFont systemFontOfSize:10]];
[viewback addSubview:lbtime];
[lbtime mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.bottom.equalTo(imgvback).offset(-5);
}];
UIButton *btxq = [[UIButton alloc] init];
[btxq setTitle:@"查看详情" forState:UIControlStateNormal];
[btxq setTitleColor:RGBCOLOR(153, 153, 153) forState:UIControlStateNormal];
[btxq.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btxq setImage:[UIImage imageNamed:@"plpj_next"] forState:UIControlStateNormal];
[viewback addSubview:btxq];
[btxq mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(viewback).offset(-12);
make.centerY.equalTo(lbname);
make.height.offset(30);
make.width.offset(80);
}];
[btxq setIconInRight];
[btxq setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];
[btxq setUserInteractionEnabled:NO];
UIButton *btcheck = [[UIButton alloc] init];
[btcheck setTitle:@"查看评语" forState:UIControlStateNormal];
[btcheck setTitleColor:RGBCOLOR(108, 119, 246) forState:UIControlStateNormal];
[btcheck.titleLabel setFont:[UIFont systemFontOfSize:12]];
[btcheck.layer setMasksToBounds:YES];
[btcheck.layer setCornerRadius:4];
[btcheck setBackgroundColor:RGBCOLOR(239, 240, 255)];
[viewback addSubview:btcheck];
[btcheck mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(lbinfo);
make.centerY.equalTo(lbtime);
make.size.sizeOffset(CGSizeMake(60, 24));
}];
[btcheck addTarget:self action:@selector(chakanAction) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
///
-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end
{
// CAGradientLayer
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = myView.bounds; // layerview
//
gradientLayer.colors = colors;
//
gradientLayer.startPoint = start;
gradientLayer.endPoint = end;
// layerviewlayer
CALayer *borderLayer = [CALayer layer];
borderLayer.frame = CGRectInset(myView.bounds, 1, 1); //
borderLayer.masksToBounds = YES;
borderLayer.contents = (__bridge id)([UIImage new].CGImage);
// layerborderLayermask
borderLayer.mask = gradientLayer;
// borderLayerviewlayer
[myView.layer addSublayer:borderLayer];
}
-(void)chakanAction
{
}
@end

View File

@ -0,0 +1,19 @@
//
// CamreImageEditViewController.h
// ProductApp
//
// Created by 工作 on 2024/11/15.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface CamreImageEditViewController : BaseViewController
///
@property (nonatomic , strong) NSMutableArray *arrImages;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,36 @@
//
// CamreImageEditViewController.m
// ProductApp
//
// Created by on 2024/11/15.
//
#import "CamreImageEditViewController.h"
@interface CamreImageEditViewController ()
@end
@implementation CamreImageEditViewController
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
-(void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.navigationController setNavigationBarHidden:YES animated:NO];
[self.navigationView setHidden:YES];
[self.navigationView setTitle:@"图片编辑器" titleColor:RGBACOLOR(0, 0, 0, 0.1)];
[self.view setBackgroundColor:[UIColor blackColor]];
}
@end

View File

@ -0,0 +1,19 @@
//
// ImageEditDrawViewController.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^ImageEditDrawViewControllerBack)(NSMutableArray *arrimages);
@interface ImageEditDrawViewController : BaseViewController
///
@property (nonatomic , strong) NSArray *arrImages;
///
@property (nonatomic , strong) ImageEditDrawViewControllerBack backValue;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,57 @@
//
// ImageEditDrawViewController.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "ImageEditDrawViewController.h"
#import "ImageEditDrawView.h"
@interface ImageEditDrawViewController ()
///
@property (nonatomic , strong) ImageEditDrawView *viewShow;
@end
@implementation ImageEditDrawViewController
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
[self showNaviGationView:YES];
[self.navigationView setTitle:@"" titleColor:[UIColor blackColor]];
[self.navigationView setBackgroundColor:[UIColor clearColor]];
[self.navigationView setMuenTitle:@"全部完成" titleColor:[UIColor whiteColor]];
[self.navigationView.muenButton setBackgroundColor:RGBCOLOR(0, 184, 156)];
[self.navigationView.muenButton.layer setMasksToBounds:YES];
[self.navigationView.muenButton.layer setCornerRadius:6];
self.navigationView.muenBtnWidth.constant = 80;
}
-(void)navMuenButtonAction
{
if(self.backValue)
{
NSMutableArray *arrback = [self.viewShow getAllEditImages];
self.backValue(arrback);
}
[self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor blackColor]];
ImageEditDrawView *view = [ImageEditDrawView new];
[self.view addSubview:view];
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
view.arrImages = self.arrImages;
_viewShow = view;
}
@end

View File

@ -0,0 +1,34 @@
//
// MosaiManager.h
// YJMosaiDemo
//
// Created by yangjian on 2019/1/28.
// Copyright © 2019 zhangshuyue. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface MosaiManager : NSObject
-(instancetype)initWithOriImage:(UIImage*)originalImage;
//重做
-(UIImage*)redo;
//撤销
-(UIImage*)undo;
//当前操作数index
@property(nonatomic,assign)NSInteger currentIndex;
//操作数
@property(nonatomic,assign)NSInteger operationCount;
-(void)writeImageToCache:(UIImage*)image;
-(void)releaseAllImage;
@end

View File

@ -0,0 +1,63 @@
//
// MosaiManager.m
// YJMosaiDemo
//
// Created by yangjian on 2019/1/28.
// Copyright © 2019 zhangshuyue. All rights reserved.
//
#import "MosaiManager.h"
@interface MosaiManager()
@property(nonatomic,strong)NSMutableArray *cacheArray;
@property(nonatomic,strong)UIImage *originalImage;
@end
@implementation MosaiManager
-(instancetype)initWithOriImage:(UIImage *)originalImage{
if (!originalImage) return nil;
if (self = [super init]) {
_currentIndex = 0;
_cacheArray = [[NSMutableArray alloc]init];
[_cacheArray addObject:originalImage];
_originalImage = originalImage;
}
return self;
}
-(UIImage *)redo{
if (_currentIndex + 1 < _cacheArray.count) {
_currentIndex++;
return _cacheArray[_currentIndex];
}
return nil;
}
-(UIImage*)undo{
if (_currentIndex - 1 >= 0) {
_currentIndex--;
return _cacheArray[_currentIndex];
}
return nil;
}
-(void)writeImageToCache:(UIImage *)image{
if (!image) return;
if (_currentIndex < _cacheArray.count -1) {
[_cacheArray removeObjectsInRange:NSMakeRange(_currentIndex+1 , _cacheArray.count - 1 - _currentIndex)];
}
[_cacheArray addObject:image];
_currentIndex++;
_operationCount = _currentIndex;
}
-(void)releaseAllImage{
[self.cacheArray removeAllObjects];
_currentIndex = 0;
}
@end

View File

@ -0,0 +1,29 @@
//
// MosaiPath.h
// YJMosaiDemo
//
// Created by yangjian on 2019/1/28.
// Copyright © 2019 zhangshuyue. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface PathPoint:NSObject
@property(nonatomic)float xPoint;
@property(nonatomic)float yPoint;
@end
@interface MosaiPath : NSObject
@property(nonatomic)CGPoint startPoint;
@property(nonatomic)NSMutableArray *pathPointArray;
@property(nonatomic)CGPoint endPoint;
-(void)resetStatus;
@end

View File

@ -0,0 +1,70 @@
//
// MosaiPath.m
// YJMosaiDemo
//
// Created by yangjian on 2019/1/28.
// Copyright © 2019 zhangshuyue. All rights reserved.
//
#import "MosaiPath.h"
@interface MosaiPath()<NSCopying,NSMutableCopying>
@end
@implementation MosaiPath
- (instancetype)init
{
self = [super init];
if (self) {
_startPoint = CGPointZero;
_endPoint = CGPointZero;
_pathPointArray = [[NSMutableArray alloc]init];
}
return self;
}
-(void)resetStatus{
_startPoint = CGPointZero;
_endPoint = CGPointZero;
[_pathPointArray removeAllObjects];
}
- (id)copyWithZone:(NSZone *)zone
{
MosaiPath *obj = [[[self class] allocWithZone:zone] init];
obj.pathPointArray = [self.pathPointArray copyWithZone:zone];
obj.startPoint = self.startPoint;
obj.endPoint = self.endPoint;
return obj;
}
- (id)mutableCopyWithZone:(NSZone *)zone
{
MosaiPath *obj = [[[self class] allocWithZone:zone] init];
obj.pathPointArray = [self.pathPointArray copyWithZone:zone];
obj.startPoint = self.startPoint;
obj.endPoint = self.endPoint;
return obj;
}
@end
@implementation PathPoint
- (instancetype)init
{
self = [super init];
if (self) {
_xPoint = _yPoint = 0;
}
return self;
}
@end

View File

@ -0,0 +1,52 @@
//
// MosaiView.h
// YJMosaiDemo
//
// Created by yangjian on 2019/1/28.
// Copyright © 2019 zhangshuyue. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol MosaiViewDelegate;
@interface MosaiView : UIView
//底图为马赛克图
@property (nonatomic, strong) UIImage *mosaicImage;
//表图为正常图片
@property (nonatomic, strong) UIImage *originalImage;
//OperationCount
@property (nonatomic, assign, readonly) NSInteger operationCount;
//CurrentIndex
@property (nonatomic, assign, readonly) NSInteger currentIndex;
//Delegate
@property (nonatomic, weak) id<MosaiViewDelegate> deleagate;
//ResetMosai
-(void)resetMosaiImage;
//下一步
-(void)redo;
//上一步
-(void)undo;
-(BOOL)canUndo;
-(BOOL)canRedo;
-(UIImage*)resultImage;
@end
@protocol MosaiViewDelegate<NSObject>
@optional
-(void)mosaiView:(MosaiView*)view TouchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
-(void)mosaiView:(MosaiView*)view TouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
-(void)mosaiView:(MosaiView*)view TouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
@end

View File

@ -0,0 +1,355 @@
//
// MosaiView.m
// YJMosaiDemo
//
// Created by yangjian on 2019/1/28.
// Copyright © 2019 zhangshuyue. All rights reserved.
//
#import "MosaiView.h"
#import "MosaiPath.h"
#import "MosaiManager.h"
@interface MosaiView()
//UIImageView
@property (nonatomic, strong) UIImageView *topImageView;
//
@property (nonatomic, strong) CALayer *mosaicImageLayer;
//
@property (nonatomic, strong) CAShapeLayer *shapeLayer;
//
@property (nonatomic, assign) CGMutablePathRef path;
//
@property (nonatomic, strong) MosaiPath *currentPath;
//
@property (nonatomic, strong) NSMutableArray *pathArray;
//
@property (nonatomic ,strong) UIImage *mosaiFinalImage;
//MosaiManager
@property(nonatomic ,strong) MosaiManager *mosaiManager;
@end
@implementation MosaiView
- (void)dealloc{
if (self.path) {
CGPathRelease(self.path);
}
[self.mosaiManager releaseAllImage];
}
- (instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
_currentPath = [[MosaiPath alloc]init];
_pathArray = [[NSMutableArray alloc]init];
_operationCount = 0;
//
self.topImageView = [[UIImageView alloc] initWithFrame:self.bounds];
[self addSubview:self.topImageView];
}
return self;
}
- (void)setOriginalImage:(UIImage *)originalImage{
_originalImage = originalImage;//
self.topImageView.image = originalImage;//
self.mosaiFinalImage = originalImage;
_mosaiManager = [[MosaiManager alloc]initWithOriImage:originalImage];
}
- (void)setMosaicImage:(UIImage *)mosaicImage{
mosaicImage = [self mosaicImage:mosaicImage mosaicLevel:20];///???
_mosaicImage = mosaicImage;//
[self resetMosaiImage];
}
//
-(void)resetMosaiImage{
//LayerPath
if (self.path) {
CGPathRelease(self.path);
self.path = nil;
}
self.path = CGPathCreateMutable();
self.topImageView.image = _mosaiFinalImage;
//
[self.pathArray removeAllObjects];
[_currentPath resetStatus];
[self.shapeLayer removeFromSuperlayer];
self.shapeLayer = nil;
[self.mosaicImageLayer removeFromSuperlayer];
self.mosaicImageLayer = nil;
self.mosaicImageLayer = [CALayer layer];
self.mosaicImageLayer.frame = self.bounds;
[self.layer addSublayer:self.mosaicImageLayer];
// self.mosaicImageLayer.contents = (__bridge id _Nullable)([self.mosaicImage CGImage]);//
self.mosaicImageLayer.contents = (__bridge id _Nullable)([[UIImage imageNamed:@"writeback"] CGImage]);//
//
self.shapeLayer = [CAShapeLayer layer];
self.shapeLayer.frame = self.bounds;
self.shapeLayer.lineCap = kCALineCapRound;
self.shapeLayer.lineJoin = kCALineJoinRound;
self.shapeLayer.lineWidth = 15.0f;///
self.shapeLayer.strokeColor = [[UIColor blueColor] CGColor];
self.shapeLayer.fillColor = [UIColor whiteColor].CGColor;
[self.layer addSublayer:self.shapeLayer];
self.mosaicImageLayer.mask = self.shapeLayer;
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:self];
CGPathMoveToPoint(self.path, NULL, point.x, point.y);
CGMutablePathRef path = CGPathCreateMutableCopy(self.path);
self.shapeLayer.path = path;
CGPathRelease(path);
CGSize size = self.topImageView.image.size;
CGFloat rate = size.width/self.topImageView.bounds.size.width;
_currentPath.startPoint = CGPointMake(point.x * rate, point.y * rate);
if ([self.deleagate respondsToSelector:@selector(mosaiView:TouchesBegan:withEvent:)]) {
[self.deleagate mosaiView:self TouchesBegan:touches withEvent:event];
}
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:self];
CGPathAddLineToPoint(self.path, NULL, point.x, point.y);
CGMutablePathRef path = CGPathCreateMutableCopy(self.path);
self.shapeLayer.path = path;
CGPathRelease(path);
CGSize size = self.topImageView.image.size;
CGFloat rate = size.width/self.topImageView.bounds.size.width;
PathPoint *pointPath = [[PathPoint alloc]init];
pointPath.xPoint = point.x * rate;
pointPath.yPoint = point.y * rate;
[_currentPath.pathPointArray addObject:pointPath];
if ([self.deleagate respondsToSelector:@selector(mosaiView:TouchesMoved:withEvent:)]) {
[self.deleagate mosaiView:self TouchesMoved:touches withEvent:event];
}
}
-(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
[super touchesMoved:touches withEvent:event];
//,
UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:self];
CGSize size = self.topImageView.image.size;
CGFloat rate = size.width/self.topImageView.bounds.size.width;
_currentPath.endPoint = CGPointMake(point.x * rate, point.y * rate);
MosaiPath *path = [_currentPath copy];
[_pathArray addObject:path];
[_currentPath resetStatus];
UIGraphicsBeginImageContext(size);
[self.topImageView.image drawInRect:CGRectMake(0, 0, size.width, size.height)];
for (MosaiPath *path in _pathArray) {
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), path.startPoint.x, path.startPoint.y);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), path.startPoint.x, path.startPoint.y);
for (PathPoint *point in path.pathPointArray) {
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), point.xPoint, point.yPoint);
}
}
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 15.f * rate);
CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeClear);
CGContextStrokePath(UIGraphicsGetCurrentContext());
UIImage *finalPath = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIGraphicsBeginImageContextWithOptions(size, YES, 1.0);
CGContextSetRGBFillColor(UIGraphicsGetCurrentContext(), 255, 255, 255, 1);
[self.mosaicImage drawInRect:CGRectMake(0, 0, size.width, size.height)];
[finalPath drawInRect:CGRectMake(0, 0, size.width, size.height)];
_mosaiFinalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
//
[self.mosaiManager writeImageToCache:_mosaiFinalImage];
_operationCount = self.mosaiManager.operationCount;
if ([self.deleagate respondsToSelector:@selector(mosaiView:TouchesEnded:withEvent:)]) {
[self.deleagate mosaiView:self TouchesEnded:touches withEvent:event];
}
}
-(void)redo{
UIImage *image = [self.mosaiManager redo];
if (!image)return;
self.mosaiFinalImage = image;
[self resetMosaiImage];
}
-(void)undo{
UIImage *image = [self.mosaiManager undo];
if (!image)return;
self.mosaiFinalImage = image;
[self resetMosaiImage];
}
-(BOOL)canUndo{
if (self.mosaiManager.currentIndex > 0) {
return YES;
}
return NO;
}
-(NSInteger)currentIndex{
return self.mosaiManager.currentIndex;
}
-(BOOL)canRedo{
if (self.mosaiManager.currentIndex < self.mosaiManager.operationCount) {
return YES;
}
return NO;
}
-(UIImage*)resultImage{
return self.mosaiFinalImage;
}
//
-(UIImage *)mosaicImage:(UIImage *)sourceImage mosaicLevel:(NSUInteger)level{
// //1
// CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();//
// CGImageRef imageRef = sourceImage.CGImage;//
// CGFloat width = CGImageGetWidth(imageRef);//
// CGFloat height = CGImageGetHeight(imageRef);//
// CGContextRef context = CGBitmapContextCreate(nil, width, height, 8, width * 4, colorSpace, kCGImageAlphaPremultipliedLast);//
//
//
// CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef);//
// unsigned char *bitmapData = CGBitmapContextGetData(context);//
//
// //2
// NSUInteger index,preIndex;
// unsigned char pixel[4] = {0};
// for (int i = 0; i < height; i++) {//
// for (int j = 0; j < width; j++) {//
// index = i * width + j;
// if (i % level == 0) {
// if (j % level == 0) {
// //i=0j=0
// memcpy(pixel, bitmapData + index * 4, 4);
// }else{
// //
// memcpy(bitmapData +index * 4, pixel, 4);
// }
// }else{
// //
// preIndex = (i - 1) * width + j;
// memcpy(bitmapData + index * 4, bitmapData + preIndex * 4, 4);
// }
// }
// }
//
// //UIImage
// NSUInteger dataLength = width * height * 4;
// CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, bitmapData, dataLength, NULL);
//
// CGImageRef mosaicImageRef = CGImageCreate(width, height,
// 8,
// 32,
// width*4 ,
// colorSpace,
// kCGBitmapByteOrderDefault,
// provider,
// NULL, NO,
// kCGRenderingIntentDefault);
// CGContextRef outputContext = CGBitmapContextCreate(nil,
// width,
// height,
// 8,
// width*4,
// colorSpace,
// kCGImageAlphaPremultipliedLast);
// CGContextDrawImage(outputContext, CGRectMake(0.0f, 0.0f, width, height), mosaicImageRef);
// CGImageRef resultImageRef = CGBitmapContextCreateImage(outputContext);
// UIImage *resultImage = nil;
// if([UIImage respondsToSelector:@selector(imageWithCGImage:scale:orientation:)]) {
// float scale = [[UIScreen mainScreen] scale];
// resultImage = [UIImage imageWithCGImage:resultImageRef scale:scale orientation:UIImageOrientationUp];
// } else {
// resultImage = [UIImage imageWithCGImage:resultImageRef];
// }
// CFRelease(resultImageRef);
// CFRelease(mosaicImageRef);
// CFRelease(colorSpace);
// CFRelease(provider);
// CFRelease(context);
// CFRelease(outputContext);
UIColor *pureColor = [UIColor whiteColor]; //
//
UIGraphicsBeginImageContextWithOptions(sourceImage.size, NO, 0.0);
// 使
[pureColor setFill];
UIRectFill(CGRectMake(0, 0, sourceImage.size.width, sourceImage.size.height));
//
UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
//
UIGraphicsEndImageContext();
return resultImage;
}
@end

View File

@ -0,0 +1,17 @@
//
// ImageEditDrawView.h
// ProductApp
//
// Created by 工作 on 2024/11/18.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ImageEditDrawView : UIView
@property (nonatomic , strong) NSArray *arrImages;
-(NSMutableArray *)getAllEditImages;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,234 @@
//
// ImageEditDrawView.m
// ProductApp
//
// Created by on 2024/11/18.
//
#import "ImageEditDrawView.h"
#import "MosaiView.h"
#define headerViewHeight 45
#define footViewHeight TabHeight+20
@interface ImageEditDrawView ()<UIScrollViewDelegate,MosaiViewDelegate>
///
@property (nonatomic , strong) UIScrollView *mainScrollView;;
@property (nonatomic,strong)MosaiView * mosaicView;
///
@property (nonatomic , strong) UIButton *btlast;
@property (nonatomic , strong) UIButton *btnext;
@property (nonatomic , assign) int ipage;
///
@property (nonatomic , strong) NSMutableArray *arrdata;
@end
@implementation ImageEditDrawView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
[self createwithFrame:CGRectMake(0, 0, UISCREEN_WIDTH, UISCREEN_HEIGHT - footViewHeight-NavHeight)];
UIView *viewbottom = [[UIView alloc] init];
[viewbottom setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewbottom];
[viewbottom mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self);
make.height.offset(footViewHeight);
}];
[self drawBottomView:viewbottom];
}
return self;
}
-(void)drawBottomView:(UIView *)view
{
UIButton *btlast = [[UIButton alloc] init];
[btlast setTitle:@"上一张" forState:UIControlStateNormal];
[btlast setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btlast.titleLabel setFont:[UIFont systemFontOfSize:15]];
[btlast.layer setMasksToBounds:YES];
[btlast.layer setCornerRadius:6];
[btlast setBackgroundColor:RGBCOLOR(0, 184, 156)];
[view addSubview:btlast];
[btlast mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.top.offset(10);
make.height.offset(45);
make.width.offset(80);
}];
[btlast addTarget:self action:@selector(lastAction) forControlEvents:UIControlEventTouchUpInside];
_btlast = btlast;
UIButton *btnext = [[UIButton alloc] init];
[btnext setTitle:@"下一张" forState:UIControlStateNormal];
[btnext setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[btnext.titleLabel setFont:[UIFont systemFontOfSize:15]];
[btnext.layer setMasksToBounds:YES];
[btnext.layer setCornerRadius:6];
[btnext setBackgroundColor:RGBCOLOR(0, 184, 156)];
[view addSubview:btnext];
[btnext mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(view).offset(-12);
make.top.width.height.equalTo(btlast);
}];
[btnext addTarget:self action:@selector(nextAction) forControlEvents:UIControlEventTouchUpInside];
_btnext = btnext;
UIButton *btcancle = [[UIButton alloc] init];
[btcancle setTitle:@"撤销" forState:UIControlStateNormal];
[btcancle setTitleColor:RGBCOLOR(51, 51, 51) forState:UIControlStateNormal];
[btcancle.titleLabel setFont:[UIFont systemFontOfSize:15]];
[view addSubview:btcancle];
[btcancle mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(view);
make.centerY.equalTo(btlast);
make.height.offset(40);
make.width.offset(60);
}];
[btcancle addTarget:self action:@selector(chexiaoAction) forControlEvents:UIControlEventTouchUpInside];
}
-(void)setArrImages:(NSArray *)arrImages
{
_arrImages = arrImages;
if(self.arrImages.count==0)return;
self.arrdata = [NSMutableArray new];
[self.arrdata addObjectsFromArray:self.arrImages];
if(self.arrdata.count>0)
{
[self.btlast setBackgroundColor:RGBCOLOR(200, 200, 200)];
self.ipage=0;
[self setMosaicsView:self.arrdata[0]];
}
if(self.arrImages.count==1)
{
[self.btlast setBackgroundColor:RGBCOLOR(200, 200, 200)];
[self.btnext setBackgroundColor:RGBCOLOR(200, 200, 200)];
}
}
-(void)lastAction
{
if(self.ipage<=0)return;
self.arrdata[self.ipage]=self.mosaicView.resultImage;
self.ipage-=1;
[self setMosaicsView:self.arrdata[self.ipage]];
if(self.ipage==0)
{
[self.btlast setBackgroundColor:RGBCOLOR(200, 200, 200)];
}
if(self.ipage<self.arrdata.count-1)
{
[self.btnext setBackgroundColor:RGBCOLOR(0, 184, 156)];
}
}
-(void)nextAction
{
if(self.ipage>=self.arrdata.count-1)return;
self.arrdata[self.ipage]=self.mosaicView.resultImage;
self.ipage+=1;
[self setMosaicsView:self.arrdata[self.ipage]];
if(self.ipage>=self.arrdata.count-1)
{
[self.btnext setBackgroundColor:RGBCOLOR(200, 200, 200)];
}
if(self.ipage>0)
{
[self.btlast setBackgroundColor:RGBCOLOR(0, 184, 156)];
}
}
-(void)chexiaoAction
{
[self.mosaicView undo];
}
/**
@param frame frame
*/
- (void)createwithFrame:(CGRect)frame {
if (self.mainScrollView != nil) {
[self.mainScrollView removeFromSuperview];
self.mainScrollView = nil;
}
self.mainScrollView = [[UIScrollView alloc] initWithFrame:frame];
// self.mainScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.mainScrollView.showsHorizontalScrollIndicator = NO;
self.mainScrollView.showsVerticalScrollIndicator = NO;
self.mainScrollView.delegate = self;
self.mainScrollView.clipsToBounds = NO;
// self.mainScrollView.y = frame.origin.y;
[self addSubview:self.mainScrollView];
self.mainScrollView.maximumZoomScale = 2.0;
self.mainScrollView.minimumZoomScale = 1;
self.mainScrollView.panGestureRecognizer.minimumNumberOfTouches = 2;
self.mainScrollView.panGestureRecognizer.delaysTouchesBegan = NO;
self.mainScrollView.pinchGestureRecognizer.delaysTouchesBegan = NO;
}
-(void)setMosaicsView:(UIImage *)image
{
if(self.mosaicView)
{
[self.mosaicView removeFromSuperview];
}
CGFloat img_Width = (image.size.width * self.mainScrollView.height)/image.size.height;
CGRect showRect = CGRectMake(0, 0, img_Width, self.mainScrollView.height);
if (image.size.width > image.size.height) {
CGFloat img_Height = (image.size.height * self.mainScrollView.width)/image.size.width;
showRect = CGRectMake(0, 0, self.mainScrollView.width,img_Height);
showRect.origin.y = (self.mainScrollView.height - img_Height)*0.5;
}
self.mosaicView = [[MosaiView alloc] initWithFrame:showRect];
self.mosaicView.centerX = self.mainScrollView.width * 0.5;
self.mosaicView.deleagate = self;
self.mosaicView.originalImage = image;//
self.mosaicView.mosaicImage = image;//
[self.mainScrollView addSubview:self.mosaicView];
}
#pragma mark -UIScrollViewDelegate
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
return self.mosaicView;
}
- (void)scrollViewDidZoom:(UIScrollView *)scrollView
{
CGFloat Ws = self.mainScrollView.frame.size.width - self.mainScrollView.contentInset.left - self.mainScrollView.contentInset.right;
CGFloat Hs = self.mainScrollView.frame.size.height - self.mainScrollView.contentInset.top - self.mainScrollView.contentInset.bottom;
CGFloat W = self.mainScrollView.frame.size.width;
CGFloat H = self.mainScrollView.frame.size.height;
CGRect rct = self.mosaicView.frame;
rct.origin.x = MAX((Ws-W)/2, (UISCREEN_WIDTH - self.mosaicView.width)*0.5);
rct.origin.y = MAX((Hs-H)/2, (self.mainScrollView.height - self.mosaicView.height)*0.5);
self.mosaicView.frame = rct;
}
-(NSMutableArray *)getAllEditImages
{
return self.arrdata;
}
@end