新版首页

This commit is contained in:
PengGJ 2025-04-29 18:02:08 +08:00
parent 91e837c728
commit c7453a62d4
60 changed files with 1105 additions and 12 deletions

View File

@ -34,7 +34,6 @@
044893F92DBC8458006C7493 /* D-DIN-PRO-700-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 044893EF2DBC8458006C7493 /* D-DIN-PRO-700-Bold.otf */; };
044893FA2DBC8458006C7493 /* load_start.pag in Resources */ = {isa = PBXBuildFile; fileRef = 044893F02DBC8458006C7493 /* load_start.pag */; };
044893FB2DBC8458006C7493 /* AlimamaShuHeiTi.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 044893F12DBC8458006C7493 /* AlimamaShuHeiTi.ttf */; };
044893FC2DBC8458006C7493 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 044893F22DBC8458006C7493 /* PrivacyInfo.xcprivacy */; };
044893FD2DBC8458006C7493 /* qidonglog.png in Resources */ = {isa = PBXBuildFile; fileRef = 044893F32DBC8458006C7493 /* qidonglog.png */; };
044893FF2DBC8458006C7493 /* download_success.pag in Resources */ = {isa = PBXBuildFile; fileRef = 044893F52DBC8458006C7493 /* download_success.pag */; };
044894002DBC8458006C7493 /* D-DIN-PRO-500-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 044893F72DBC8458006C7493 /* D-DIN-PRO-500-Medium.otf */; };
@ -348,6 +347,9 @@
CA788A722DBF842400F97762 /* ZhiNengShiPingVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = CA788A712DBF842400F97762 /* ZhiNengShiPingVideoView.m */; };
CA788A752DBF871700F97762 /* VideoGenModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA788A742DBF871700F97762 /* VideoGenModel.m */; };
CA788A782DBF903A00F97762 /* VideoGenDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CA788A772DBF903A00F97762 /* VideoGenDetailModel.m */; };
CAED70F52DC05CFB00D9CD40 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = CAED70F42DC05CFB00D9CD40 /* PrivacyInfo.xcprivacy */; };
CAED76CC2DC0C76100D9CD40 /* ShouYeNewView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAED76CB2DC0C76100D9CD40 /* ShouYeNewView.m */; };
CAED76CF2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAED76CE2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.m */; };
F50841F4764C7ADD8D165098 /* Pods_KuaiCunShiPin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C87A8E9DF89F6450BFA48B3 /* Pods_KuaiCunShiPin.framework */; };
/* End PBXBuildFile section */
@ -384,7 +386,6 @@
044893EF2DBC8458006C7493 /* D-DIN-PRO-700-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "D-DIN-PRO-700-Bold.otf"; sourceTree = "<group>"; };
044893F02DBC8458006C7493 /* load_start.pag */ = {isa = PBXFileReference; lastKnownFileType = file; path = load_start.pag; sourceTree = "<group>"; };
044893F12DBC8458006C7493 /* AlimamaShuHeiTi.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = AlimamaShuHeiTi.ttf; sourceTree = "<group>"; };
044893F22DBC8458006C7493 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
044893F32DBC8458006C7493 /* qidonglog.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = qidonglog.png; sourceTree = "<group>"; };
044893F52DBC8458006C7493 /* download_success.pag */ = {isa = PBXFileReference; lastKnownFileType = file; path = download_success.pag; sourceTree = "<group>"; };
044893F62DBC8458006C7493 /* PrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
@ -1130,6 +1131,11 @@
CA788A742DBF871700F97762 /* VideoGenModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoGenModel.m; sourceTree = "<group>"; };
CA788A762DBF903A00F97762 /* VideoGenDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoGenDetailModel.h; sourceTree = "<group>"; };
CA788A772DBF903A00F97762 /* VideoGenDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoGenDetailModel.m; sourceTree = "<group>"; };
CAED70F42DC05CFB00D9CD40 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
CAED76CA2DC0C76100D9CD40 /* ShouYeNewView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShouYeNewView.h; sourceTree = "<group>"; };
CAED76CB2DC0C76100D9CD40 /* ShouYeNewView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShouYeNewView.m; sourceTree = "<group>"; };
CAED76CD2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShouYeNewCollectionViewCell.h; sourceTree = "<group>"; };
CAED76CE2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShouYeNewCollectionViewCell.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -1203,10 +1209,10 @@
044893F52DBC8458006C7493 /* download_success.pag */,
044893F02DBC8458006C7493 /* load_start.pag */,
044893F62DBC8458006C7493 /* PrefixHeader.pch */,
044893F22DBC8458006C7493 /* PrivacyInfo.xcprivacy */,
044893F32DBC8458006C7493 /* qidonglog.png */,
044893B22DBC7A44006C7493 /* AppDelegate.h */,
044893B32DBC7A44006C7493 /* AppDelegate.m */,
CAED70F42DC05CFB00D9CD40 /* PrivacyInfo.xcprivacy */,
044893B82DBC7A44006C7493 /* ViewController.h */,
044893B92DBC7A44006C7493 /* ViewController.m */,
044893CC2DBC7AC7006C7493 /* swiftpg.swift */,
@ -1962,6 +1968,8 @@
044895442DBC8491006C7493 /* ShouYeBigCollectionViewCell.m */,
044895462DBC8491006C7493 /* ShouYeViewCollectionViewCell.h */,
044895432DBC8491006C7493 /* ShouYeViewCollectionViewCell.m */,
CAED76CD2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.h */,
CAED76CE2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.m */,
);
path = cell;
sourceTree = "<group>";
@ -1984,6 +1992,8 @@
children = (
0448954F2DBC8491006C7493 /* ShouYeView.h */,
044895502DBC8491006C7493 /* ShouYeView.m */,
CAED76CA2DC0C76100D9CD40 /* ShouYeNewView.h */,
CAED76CB2DC0C76100D9CD40 /* ShouYeNewView.m */,
CA787DBB2DBF192300F97762 /* TongZhiTSView.h */,
CA787DBC2DBF192300F97762 /* TongZhiTSView.m */,
);
@ -3145,6 +3155,7 @@
0448983A2DBC849B006C7493 /* encry.txt in Resources */,
044893FD2DBC8458006C7493 /* qidonglog.png in Resources */,
044893C22DBC7A46006C7493 /* LaunchScreen.storyboard in Resources */,
CAED70F52DC05CFB00D9CD40 /* PrivacyInfo.xcprivacy in Resources */,
044893BF2DBC7A46006C7493 /* Assets.xcassets in Resources */,
044898AA2DBC84A0006C7493 /* slider_nomo.png in Resources */,
0448987E2DBC849C006C7493 /* loading1@3x.png in Resources */,
@ -3167,7 +3178,6 @@
044898432DBC849C006C7493 /* rsa_private_key.txt in Resources */,
0448987D2DBC849C006C7493 /* loading3@2x.png in Resources */,
044898802DBC849C006C7493 /* loading3@3x.png in Resources */,
044893FC2DBC8458006C7493 /* PrivacyInfo.xcprivacy in Resources */,
044898AE2DBC84A0006C7493 /* vedio_play_list.png in Resources */,
044898412DBC849C006C7493 /* LICENSE in Resources */,
0448986F2DBC849C006C7493 /* FSActionSheet_cancel@3x.png in Resources */,
@ -3428,6 +3438,7 @@
044896402DBC8493006C7493 /* SheZhiViewController.m in Sources */,
044893B42DBC7A44006C7493 /* AppDelegate.m in Sources */,
044896B92DBC8494006C7493 /* KCSPUserDengLuModel.m in Sources */,
CAED76CC2DC0C76100D9CD40 /* ShouYeNewView.m in Sources */,
0448982F2DBC849B006C7493 /* UIButton+EnlargeTouchArea.m in Sources */,
044896502DBC8493006C7493 /* MyFaBuShiPinDetailViewController.m in Sources */,
0448963C2DBC8493006C7493 /* ZhangHaoBDTableViewCell.m in Sources */,
@ -3515,6 +3526,7 @@
044896942DBC8493006C7493 /* XieYiAlterView.m in Sources */,
044898542DBC849C006C7493 /* WMPlayer.m in Sources */,
044896812DBC8493006C7493 /* IJKPlayerPlayViewController.m in Sources */,
CAED76CF2DC0D10600D9CD40 /* ShouYeNewCollectionViewCell.m in Sources */,
044896CB2DBC8494006C7493 /* KCSPUserModel.m in Sources */,
044896AF2DBC8494006C7493 /* KCSPUserMasModelOModel.swift in Sources */,
044894A12DBC8487006C7493 /* ffmpeg_videotoolbox.c in Sources */,
@ -3671,7 +3683,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = KuaiCunShiPin/KuaiCunShiPin.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 112;
CURRENT_PROJECT_VERSION = 113;
DEVELOPMENT_TEAM = B8MTNU3W9A;
GCC_PREFIX_HEADER = "$(SRCROOT)/KuaiCunShiPin/PrefixHeader.pch";
GENERATE_INFOPLIST_FILE = YES;
@ -3746,7 +3758,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = KuaiCunShiPin/KuaiCunShiPin.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 112;
CURRENT_PROJECT_VERSION = 113;
DEVELOPMENT_TEAM = B8MTNU3W9A;
GCC_PREFIX_HEADER = "$(SRCROOT)/KuaiCunShiPin/PrefixHeader.pch";
GENERATE_INFOPLIST_FILE = YES;

View File

@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "容器@2x.png",
"filename" : "容器 278@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "容器@3x.png",
"filename" : "容器 278@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -27,6 +27,8 @@
#import "TabBarController.h"
#import "NavgationController.h"
#import "ShouYeNewView.h"
@interface ShouYeViewController ()
@property (nonatomic , assign) BOOL isnetwork;
@property (nonatomic , assign) BOOL isgedata;

View File

@ -0,0 +1,19 @@
//
// ShouYeNewCollectionViewCell.h
// KuaiCunShiPin
//
// Created by 工作 on 2025/4/29.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ShouYeNewCollectionViewCell : UICollectionViewCell
///
@property (nonatomic , strong) UIImageView *imgvback ;
///
@property (nonatomic , strong) UILabel *lbname;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,45 @@
//
// ShouYeNewCollectionViewCell.m
// KuaiCunShiPin
//
// Created by on 2025/4/29.
//
#import "ShouYeNewCollectionViewCell.h"
@implementation ShouYeNewCollectionViewCell
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
UIView *viewback = [[UIView alloc] init];
[self.contentView addSubview:viewback];
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
}];
UIImageView *imgvback = [[UIImageView alloc] init];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.offset(40);
make.centerX.equalTo(viewback);
make.centerY.equalTo(viewback).offset(-10);
}];
_imgvback = imgvback;
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@""];
[lbname setTextColor:RGBCOLOR(238, 238, 238)];
[lbname setTextAlignment:NSTextAlignmentCenter];
[lbname setFont:[UIFont systemFontOfSize:12]];
[viewback addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewback);
make.top.equalTo(imgvback.mas_bottom).offset(5);
}];
_lbname = lbname;
}
return self;
}
@end

View File

@ -0,0 +1,18 @@
//
// ShouYeNewView.h
// KuaiCunShiPin
//
// Created by 工作 on 2025/4/29.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ShouYeNewView : UIView
-(void)refShowBanner;
-(void)refShowData;
-(void)showTSData:(NSArray *)arr;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,653 @@
//
// ShouYeNewView.m
// KuaiCunShiPin
//
// Created by on 2025/4/29.
//
#import "ShouYeNewView.h"
#import "TongZhiTSView.h"
#import "ShouYeNewCollectionViewCell.h"
#import "WYCamaImageTools.h"
#import "HuiYuanZXViewController.h"
#import "TZImagePickerController.h"
#import "XZM3SaveManager.h"
#import "ShiPingEditJGViewController.h"
#import "ShiPingEditHomeViewController.h"
@interface ShouYeNewView ()<UICollectionViewDelegate,UICollectionViewDataSource,SDCycleScrollViewDelegate,WYCamaImageToolsDelegate>
///
@property (nonatomic , strong) TongZhiTSView *viewtz;
///
@property (nonatomic , strong) UIView *viewfunctq;
///
@property (nonatomic , strong) UICollectionView *collect;
///
@property (nonatomic , strong) NSArray *arrdata;
//
@property (nonatomic, strong) SDCycleScrollView *cleScrollView;
@property (nonatomic, strong) WYCamaImageTools *tools;
@property (nonatomic , assign) int typefunction;
@end
@implementation ShouYeNewView
-(id)initWithFrame:(CGRect)frame
{
if(self = [super initWithFrame:frame])
{
[self setBackgroundColor:RGBCOLOR(20, 20, 20)];
UIScrollView *scvback = [[UIScrollView alloc] init];
[self addSubview:scvback];
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(0);
make.width.height.equalTo(self);
}];
if (@available(iOS 11.0, *)) {
scvback.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}else{
self.viewController.automaticallyAdjustsScrollViewInsets =NO;
}
TongZhiTSView *viewtz = [[TongZhiTSView alloc] initWithFrame:CGRectMake(12, 0, UISCREEN_WIDTH-24, 36)];
[scvback addSubview:viewtz];
[viewtz mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.width.offset(UISCREEN_WIDTH-24);
make.top.offset(KMagrinTop+5);
make.height.offset(36);
}];
_viewtz = viewtz;
[viewtz setHidden:YES];
// viewtz.arrdata = @[@" 阿斯蒂芬阿斯蒂芬",@" 撒旦法萨芬",@"水岸东方阿萨德发送"];
UIView *viewfunctq = [[UIView alloc] init];
[scvback addSubview:viewfunctq];
[viewfunctq mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
make.right.equalTo(viewtz).offset(-12);
make.top.equalTo(viewtz.mas_bottom).offset(15);
make.height.offset(130);
}];
[self drawFuncTQView:viewfunctq];
_viewfunctq = viewfunctq;
UIView *viewvideo = [[UIView alloc] init];
[viewvideo setBackgroundColor:RGBCOLOR(27, 29, 33)];
[scvback addSubview:viewvideo];
[viewvideo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(viewfunctq);
make.top.equalTo(viewfunctq.mas_bottom).offset(20);
make.height.offset(188);
}];
[viewvideo.layer setMasksToBounds:YES];
[viewvideo.layer setCornerRadius:10];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
UICollectionView *collect = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[collect setScrollEnabled:NO];
[collect setDelegate:self];
[collect setDataSource:self];
[collect setBackgroundColor:[UIColor clearColor]];
[viewvideo addSubview:collect];
[collect mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewvideo);
}];
[collect registerClass:[ShouYeNewCollectionViewCell class] forCellWithReuseIdentifier:@"ShouYeNewCollectionViewCell"];
_collect = collect;
self.arrdata = @[@"加水印",@"MD5去重",@"视频倒放",@"视频裁剪",@"去音乐",@"加音乐",@"视频转音频",@"视频拼接",@"时长剪切"];
SDCycleScrollView *cleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero imageNamesGroup:@[]];
cleScrollView.scrollDirection = UICollectionViewScrollDirectionHorizontal;
cleScrollView.delegate = self;
cleScrollView.backgroundColor = [UIColor clearColor];
cleScrollView.titleLabelBackgroundColor = [UIColor clearColor];
cleScrollView.titleLabelTextColor = [UIColor darkGrayColor];
cleScrollView.titleLabelTextFont = [UIFont systemFontOfSize:[Tools sizeFont:14]];
cleScrollView.autoScrollTimeInterval = 3.0;
cleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
[cleScrollView setShowPageControl:NO];
[scvback addSubview:cleScrollView];
[cleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.width.equalTo(collect);
make.top.equalTo(viewvideo.mas_bottom).offset(20);
make.height.offset(100*(UISCREEN_WIDTH-24)/351.0);
}];
[cleScrollView.layer setMasksToBounds:YES];
[cleScrollView.layer setCornerRadius:10];
_cleScrollView = cleScrollView;
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(cleScrollView).offset(20);
}];
[self refShowBanner];
}
return self;
}
-(void)drawFuncTQView:(UIView *)view
{
for(UIView *viewitem in view.subviews)
{
[viewitem removeFromSuperview];
}
if([UserDetailModel zhiFuState])
{
UIView *viewlj = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-147, 106)];
[view addSubview:viewlj];
[viewlj mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(0);
make.height.offset(106);
make.width.offset(UISCREEN_WIDTH-147);
}];
[self drawItemView:viewlj title:@"链接提取" info:@"涵盖绝大大多数平台" img:@"newhome_ljtq"];
UIView *viewznsp = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 114, 106)];
[view addSubview:viewznsp];
[viewznsp mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.height.equalTo(viewlj);
make.left.equalTo(viewlj.mas_right).offset(9);
make.right.equalTo(view);
}];
[self drawItemView:viewznsp title:@"智能视频" info:@" " img:@"newhome_znsp"];
UIView *viewsph = [[UIView alloc] initWithFrame:CGRectMake(0, 0, (UISCREEN_WIDTH-33)/2.0, 106)];
[view addSubview:viewsph];
[viewsph mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(viewlj.mas_bottom).offset(9);
make.left.height.equalTo(viewlj);
make.width.offset((UISCREEN_WIDTH-33)/2.0);
}];
[self drawItemView:viewsph title:@"视频号" info:@"支持微信视频号" img:@"newhome_sph"];
UIView *viewzbhf = [[UIView alloc] initWithFrame:CGRectMake(0, 0, (UISCREEN_WIDTH-33)/2.0, 106)];
[view addSubview:viewzbhf];
[viewzbhf mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.height.equalTo(viewsph);
make.left.equalTo(viewsph.mas_right).offset(9);
make.right.equalTo(view);
}];
[self drawItemView:viewzbhf title:@"直播回放" info:@"支持微信直播回放" img:@"newhome_zbhf"];
[view mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(221);
}];
}
else
{
UIView *viewlj = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-24, 130)];
[view addSubview:viewlj];
[viewlj mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(0);
make.height.offset(130);
make.width.offset(UISCREEN_WIDTH-24);
}];
[self drawItemZNSPView:viewlj];
}
}
-(void)drawItemZNSPView:(UIView *)view
{
[view.layer setMasksToBounds:YES];
[view.layer setCornerRadius:10];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"智能视频"];
[lbname setTextColor:[UIColor whiteColor]];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont fontWithName:@"AlimamaShuHeiTi-Bold" size:24]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(18);
make.top.offset(14);
}];
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:@"视频素材智能生成"];
[lbinfo setTextColor:[UIColor whiteColor]];
[lbinfo setTextAlignment:NSTextAlignmentLeft];
[lbinfo setFont:[UIFont fontWithName:@"PingFangSC-Regular" size:14]];
[view addSubview:lbinfo];
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom).offset(2);
}];
UIButton *btstart = [[UIButton alloc] init];
[btstart setTitle:@"开始生成 >" forState:UIControlStateNormal];
[btstart setTitleColor:RGBCOLOR(70, 120, 253) forState:UIControlStateNormal];
[btstart.titleLabel setFont:[UIFont systemFontOfSize:14]];
[btstart.layer setMasksToBounds:YES];
[btstart.layer setCornerRadius:16];
[btstart setBackgroundColor:[UIColor whiteColor]];
[view addSubview:btstart];
[btstart mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.sizeOffset(CGSizeMake(94, 32));
make.left.equalTo(lbname);
make.bottom.equalTo(view).offset(-14);
}];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"newhome_znsp1"]];
[imgvback setContentMode:UIViewContentModeScaleAspectFit];
[view addSubview:imgvback];
[view sendSubviewToBack:imgvback];
UIButton *btitem = [[UIButton alloc] init];
[view addSubview:btitem];
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(view);
}];
[btitem addTarget:self action:@selector(tqAction:) forControlEvents:UIControlEventTouchUpInside];
[btitem setTag:1];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(view).offset(-16);
make.bottom.equalTo(view).offset(-3);
make.size.sizeOffset(CGSizeMake(122, 114));
}];
[Tools changedView:view colors:@[(id)RGBCOLOR(73, 170, 255).CGColor,(id)RGBCOLOR(69, 113, 252).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
-(void)drawItemView:(UIView *)view title:(NSString *)title info:(NSString *)info img:(NSString *)img
{
[view.layer setMasksToBounds:YES];
[view.layer setCornerRadius:10];
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:title];
[lbname setTextColor:[UIColor whiteColor]];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont fontWithName:@"AlimamaShuHeiTi-Bold" size:18]];
[view addSubview:lbname];
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.offset(12);
}];
UILabel *lbinfo = [[UILabel alloc] init];
[lbinfo setText:info];
[lbinfo setTextColor:[UIColor whiteColor]];
[lbinfo setTextAlignment:NSTextAlignmentLeft];
[lbinfo setFont:[UIFont systemFontOfSize:14]];
[view addSubview:lbinfo];
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(lbname);
make.top.equalTo(lbname.mas_bottom);
}];
UIImageView *imgvnext = [[UIImageView alloc] init];
[imgvnext setImage:[UIImage imageNamed:@"newhome_next"]];
[view addSubview:imgvnext];
[imgvnext mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.offset(20);
make.left.equalTo(lbname);
make.bottom.equalTo(view).offset(-12);
}];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:img]];
[imgvback setContentMode:UIViewContentModeScaleAspectFit];
[view addSubview:imgvback];
[view sendSubviewToBack:imgvback];
UIButton *btitem = [[UIButton alloc] init];
[view addSubview:btitem];
[btitem mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(view);
}];
[btitem addTarget:self action:@selector(tqAction:) forControlEvents:UIControlEventTouchUpInside];
if([title isEqualToString:@"链接提取"])
{
[btitem setTag:0];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(view).offset(-6);
make.bottom.equalTo(view).offset(-4);
make.size.sizeOffset(CGSizeMake(74, 88));
}];
[Tools changedView:view colors:@[(id)RGBCOLOR(143, 148, 255).CGColor,(id)RGBCOLOR(181, 114, 251).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
else if([title isEqualToString:@"智能视频"])
{
[btitem setTag:1];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(view).offset(-5);
make.bottom.equalTo(view).offset(0);
make.size.sizeOffset(CGSizeMake(60, 68));
}];
[Tools changedView:view colors:@[(id)RGBCOLOR(73, 170, 255).CGColor,(id)RGBCOLOR(69, 113, 252).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
else if([title isEqualToString:@"视频号"])
{
[btitem setTag:2];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(view).offset(-6);
make.bottom.equalTo(view).offset(-5);
make.size.sizeOffset(CGSizeMake(64, 77));
}];
[Tools changedView:view colors:@[(id)RGBCOLOR(162, 227, 88).CGColor,(id)RGBCOLOR(45, 199, 106).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
else if([title isEqualToString:@"直播回放"])
{
[btitem setTag:3];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(view).offset(-5);
make.bottom.equalTo(view).offset(0);
make.size.sizeOffset(CGSizeMake(68, 70));
}];
[Tools changedView:view colors:@[(id)RGBCOLOR(255, 149, 255).CGColor,(id)RGBCOLOR(176, 77, 252).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
}
}
-(void)tqAction:(UIButton *)sender
{
switch (sender.tag) {
case 0:
{//
UIViewController *vc = [NSClassFromString(@"UrlXiaZaiViewController") new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
break;
case 1:
{
UIViewController *vc = [NSClassFromString(@"ZhiNengShiPingViewController") new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
break;
case 2:
{//
UIViewController *vc = [NSClassFromString(@"ShiPingHaoViewController") new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
break;
case 3:
{//
UIViewController *vc = [NSClassFromString(@"ZhiBoHuiFangViewController") new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
break;
default:
break;
}
}
-(void)refShowBanner
{
NSArray *arrbanner = [[UserDetailModel shareModel].config objectForKey:@"client.banner.urls"];
NSMutableArray *arrurl = [NSMutableArray new];
if([arrbanner isKindOfClass:[NSArray class]])
{
for(NSDictionary *dic in arrbanner)
{
if([[dic objectForKey:@"page"] isEqualToString:@"Cash_Task"])
{
if([UserDetailModel zhiFuState]==YES && [[[[UserDetailModel shareModel] config] objectForKey:@"client.cashtask.enable"] intValue] == 1)
{
[arrurl addObject:[Tools isStringnil:[dic objectForKey:@"image"]]];
}
}
else if([[dic objectForKey:@"page"] containsString:@"recharge"])
{
NSString *str = [[UserDetailModel shareModel].config objectForKey:@"client.pay.enable"];
if([str intValue] != 0 && [UserDetailModel shareModel].vip.intValue != 3)
{
[arrurl addObject:[Tools isStringnil:[dic objectForKey:@"image"]]];
}
}
else if([[dic objectForKey:@"page"] isEqualToString:@"check_Task"])
{
// [arrurl addObject:[Tools isStringnil:[dic objectForKey:@"image"]]];
}
else
{
[arrurl addObject:[Tools isStringnil:[dic objectForKey:@"image"]]];
}
}
}
self.cleScrollView.imageURLStringsGroup = arrurl;
}
-(void)refShowData
{
[self drawFuncTQView:self.viewfunctq];
}
-(void)showTSData:(NSArray *)arr
{
[self.viewtz setHidden:YES];
if([arr isKindOfClass:[NSArray class]])
{
if(arr.count>0)
{
[self.viewtz setHidden:NO];
self.viewtz.arrdata = arr;
}
}
}
#pragma mark - SDCycleScrollViewDelegate
/** */
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didScrollToIndex:(NSInteger)index
{
}
/** */
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
{
NSArray *arrbanner = [[UserDetailModel shareModel].config objectForKey:@"client.banner.urls"];
NSDictionary *dic = arrbanner[index];
if([[dic objectForKey:@"page"] containsString:@"recharge"])
{
NSString *str = [[UserDetailModel shareModel].config objectForKey:@"client.pay.enable"];
if([str intValue] == 0 || [UserDetailModel shareModel].vip.intValue == 3)
{
return;
}
if([UserDetailModel pushDengLuVC:self.viewController ispush:YES]==NO)return;;
HuiYuanZXViewController *vc = [[HuiYuanZXViewController alloc] init];
vc.source = @"banner";
[self.viewController.navigationController pushViewController:vc animated:YES];
[UserDetailModel pushActionInfo:0 key:@"client.jump.to.member.recharge" value:@"banner" extra:@""];
}
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.arrdata.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ShouYeNewCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ShouYeNewCollectionViewCell" forIndexPath:indexPath];
cell.lbname.text = self.arrdata[indexPath.row];
cell.imgvback.image = [UIImage imageNamed:[NSString stringWithFormat:@"newhome_%@",self.arrdata[indexPath.row]]];
return cell;
}
//section
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{
return UIEdgeInsetsMake(10, 0, 10, 0);
}
//cell
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section{
return 0;
}
//cell
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout ForSectionAtIndex:(NSInteger)section{
return 0;
}
// UICollectionViewCell
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return CGSizeMake((UISCREEN_WIDTH-24)/5.0, 84);
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
///[@"加水印",@"MD5去重",@"视频倒放",@"视频裁剪",@"去音乐",@"加音乐",@"视频转音频",@"视频拼接",@"时长剪切"];
NSString *strtitle = self.arrdata[indexPath.row];
[UserDetailModel pushActionInfo:0 key:@"click.go.to.vc" value:strtitle extra:@""];
if([strtitle isEqualToString:@"视频转音频"])
{
UIViewController *vc = [NSClassFromString(@"ShiPingTiQuYinPingViewController") new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
else if([strtitle isEqualToString:@"视频拼接"])
{
[self pinJieVideoSelect];
}
else
{
self.typefunction = [self getFunctionTag:strtitle];
self.tools.isvideo = YES;
[self.tools choosePicWithViewController:self.viewController chooseType:ChooseTypeAlbum];
}
}
-(void)pinJieVideoSelect
{
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:4 columnNumber:4 delegate:nil pushPhotoPickerVc:YES];
imagePickerVc.isSelectOriginalPhoto = NO;
imagePickerVc.allowTakePicture = YES; //
imagePickerVc.navigationBar.barTintColor = [UIColor blackColor];
imagePickerVc.minImagesCount = 2;
imagePickerVc.maxImagesCount = 4;
imagePickerVc.oKButtonTitleColorDisabled = [UIColor lightGrayColor];
imagePickerVc.oKButtonTitleColorNormal = [UIColor greenColor];
imagePickerVc.navigationBar.translucent = NO;
// 3. //
imagePickerVc.allowPickingVideo = YES;
imagePickerVc.presetName=AVAssetExportPresetHighestQuality;
imagePickerVc.allowPickingImage = NO;
imagePickerVc.allowPickingMultipleVideo = YES;
imagePickerVc.maxCropVideoDuration = 600;
imagePickerVc.allowPickingOriginalPhoto = NO;
// 4.
imagePickerVc.sortAscendingByModificationDate = NO;
// block.
[imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
if(assets.count>1)
{
[KCSPHUDAlterView showView];
NSMutableArray *arrtemp = [NSMutableArray new];
__block int icc = 0;
for(PHAsset *aset in assets)
{
[self getVideoUrl:aset back:^(NSURL *url) {
icc+=1;
if(url)
{
[arrtemp addObject:url];
}
if(icc == assets.count)
{
if(arrtemp.count!=icc)
{
[KCSPHUDAlterView dismis];
[HXHud showMessage:@"视频合并失败,请重新选择视频" afterDelayType:0];
return;
}
NSString *outputPath = [Tools audioRecordingPath:[NSString stringWithFormat:@"%@.mp4",[Tools getCurrentTime:@"yyyyMMddHHmmss"]]];
[[XZM3SaveManager shareManager] MergeToValue:arrtemp outUrl:[NSURL fileURLWithPath:outputPath] back:^(NSURL * _Nonnull backurl) {
dispatch_async(dispatch_get_main_queue(), ^{
[KCSPHUDAlterView dismis];
if(backurl)
{
ShiPingEditJGViewController *vc = [[ShiPingEditJGViewController alloc] init];
vc.urlvideo = backurl;
[self.viewController.navigationController pushViewController:vc animated:NO];
}
else
{
[HXHud showMessage:@"视频合并失败,请重新选择视频" afterDelayType:0];
}
});
} progess:^(float progress) {
}];
}
}];
}
}
}];
[self.viewController presentViewController:imagePickerVc animated:YES completion:^{
}];
}
///
-(void)getVideoUrl:(PHAsset *)phAsset back:(void(^)(NSURL *url))backValue
{
PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
options.version = PHVideoRequestOptionsVersionCurrent;
options.deliveryMode = PHVideoRequestOptionsDeliveryModeAutomatic;
options.networkAccessAllowed = true;
PHImageManager *manager = [PHImageManager defaultManager];
[manager requestAVAssetForVideo:phAsset options:options resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
AVURLAsset *urlAsset = (AVURLAsset *)asset;
NSURL *url = urlAsset.URL;
backValue(url);
}];
}
-(int)getFunctionTag:(NSString *)name
{
///1 2MD5 3 5
int back = 1;
if([name isEqualToString:@"加水印"])
{
back = 1;
}
else if([name isEqualToString:@"MD5去重"])
{
back = 2;
}
else if([name isEqualToString:@"视频裁剪"])
{
back = 3;
}
else if([name isEqualToString:@"去音乐"])
{
back = 5;
}
else if([name isEqualToString:@"时长剪切"])
{
back = 6;
}
else if([name isEqualToString:@"加音乐"])
{
back = 7;
}
else if([name isEqualToString:@"视频倒放"])
{
back = 8;
}
else if([name isEqualToString:@"视频拼接"])
{
back = 9;
}
return back;
}
- (void)didEndChooseVideo:(NSURL *)videourl
{
ShiPingEditHomeViewController *vc = [ShiPingEditHomeViewController new];
vc.urlvideo = videourl;
vc.type = self.typefunction;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
- (WYCamaImageTools *)tools {
if (!_tools) {
_tools = [[WYCamaImageTools alloc] init];
_tools.delegate = self;
}return _tools;
}
@end

View File

@ -29,13 +29,22 @@
{
if(self = [super initWithFrame:frame])
{//
[self setClipsToBounds:NO];
UIView *viewsub = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height)];
[viewsub setBackgroundColor:[UIColor whiteColor]];
[self addSubview:viewsub];
[viewsub.layer setMasksToBounds:YES];
[viewsub.layer setCornerRadius:6];
[Tools changedView:viewsub colors:@[(id)RGBCOLOR(255, 237, 208).CGColor,(id)RGBCOLOR(255, 217, 155).CGColor] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"tz_tz"]];
[self addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.offset(18);
make.width.height.offset(54);
make.centerY.equalTo(self);
make.left.offset(11);
make.left.offset(-7);
}];
UIView *viewback = [[UIView alloc] init];
@ -59,7 +68,7 @@
{
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:self.arrdata[tag]];
[lbname setTextColor:RGBCOLOR(255, 33, 35)];
[lbname setTextColor:RGBCOLOR(188, 108, 22)];
[lbname setTextAlignment:NSTextAlignmentLeft];
[lbname setFont:[UIFont systemFontOfSize:13]];
[view addSubview:lbname];

View File

@ -45,4 +45,3 @@
</array>
</dict>
</plist>
a