Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
luolihao committed Dec 25, 2023
1 parent 3d1b261 commit 25e2c15
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
DC1F946C234ED6F400EDB465 /* Frameworks */,
DC1F946D234ED6F400EDB465 /* Resources */,
FCF4F7082E0DAF8F90EDAD89 /* [CP] Copy Pods Resources */,
65975CCEBD4261ACC2ADF5B8 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -308,6 +309,23 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
65975CCEBD4261ACC2ADF5B8 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-NTESLiveDetectPublicDemo/Pods-NTESLiveDetectPublicDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-NTESLiveDetectPublicDemo/Pods-NTESLiveDetectPublicDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NTESLiveDetectPublicDemo/Pods-NTESLiveDetectPublicDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
A1806712F627D0BAF961EFDF /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -510,10 +528,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
CLANG_CXX_LIBRARY = "compiler-default";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = XB333SWTAF;
ENABLE_BITCODE = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 79CE9GGQBE;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand All @@ -532,7 +550,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.netease.NTESLiveDetectPublicDemo;
PRODUCT_NAME = "活体检测Demo";
PROVISIONING_PROFILE_SPECIFIER = wildcardProfile;
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -544,10 +562,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
CLANG_CXX_LIBRARY = "compiler-default";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = XB333SWTAF;
ENABLE_BITCODE = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 79CE9GGQBE;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
Expand All @@ -566,7 +584,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.netease.NTESLiveDetectPublicDemo;
PRODUCT_NAME = "活体检测Demo";
PROVISIONING_PROFILE_SPECIFIER = wildcardProfile;
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,17 @@ - (void)__initActivityIndicator {

- (void)__initImageView {
self.cameraImage = [[UIImageView alloc] init];
self.cameraImage.layer.cornerRadius = imageViewWidth/2;
self.cameraImage.layer.masksToBounds = YES;
[self addSubview:self.cameraImage];
[self.cameraImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self);
make.top.equalTo(self).mas_offset(IS_IPHONE_X ? 50+statusBarHeight : 4+statusBarHeight);
make.top.equalTo(self).mas_offset(100);
make.width.equalTo(@(imageViewWidth));
make.height.equalTo(@(imageViewHeight));
make.height.equalTo(@(imageViewWidth));
}];

_progressView = [[NTESDottedLineProgress alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - imageViewWidth) / 2, IS_IPHONE_X ? 50+statusBarHeight + imageViewHeight/8 : 4+statusBarHeight + imageViewHeight/8, imageViewWidth, imageViewHeight) startColor:[UIColor ntes_colorWithHexString:@"#7C49F2"] endColor:[UIColor ntes_colorWithHexString:@"#7C49F2"] startAngle:90 strokeWidth:4 strokeLength:20];
_progressView = [[NTESDottedLineProgress alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - imageViewWidth) / 2 -20, 80, imageViewWidth + 40, imageViewWidth + 40) startColor:[UIColor ntes_colorWithHexString:@"#7C49F2"] endColor:[UIColor ntes_colorWithHexString:@"#7C49F2"] startAngle:90 strokeWidth:4 strokeLength:20];
// _progressView.backgroundColor = [UIColor blackColor];
_progressView.roundStyle = YES;
// _progressView.colorGradient = NO;
Expand Down Expand Up @@ -411,31 +413,6 @@ - (void)showFrontImage {
self.actionImage.hidden = YES;
}

//圆形裁剪区域
-(void)transparentCutRoundArea{

// 圆形透明区域
UIBezierPath *alphaPath = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, imageViewWidth, imageViewHeight)];
UIBezierPath *arcPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(imageViewWidth/2, imageViewHeight/2) radius:cameraViewRadius-1 startAngle:0 endAngle:2*M_PI clockwise:NO];
[alphaPath appendPath:arcPath];
CAShapeLayer *layer = [CAShapeLayer layer];
layer.fillColor = [UIColor whiteColor].CGColor;
layer.strokeColor = [UIColor whiteColor].CGColor;
layer.path = alphaPath.CGPath;
layer.fillRule = kCAFillRuleEvenOdd;
layer.zPosition = 1.0f;
[self.cameraImage.layer addSublayer:layer];

// 圆形裁剪框
UIBezierPath *cropPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(imageViewWidth/2, imageViewHeight/2) radius:cameraViewRadius startAngle:0 endAngle:2*M_PI clockwise:NO];
CAShapeLayer *cropLayer = [CAShapeLayer layer];
cropLayer.path = cropPath.CGPath;
cropLayer.strokeColor = [UIColor whiteColor].CGColor;
cropLayer.fillColor = [UIColor clearColor].CGColor;
cropLayer.zPosition = 2.0f;
[self.cameraImage.layer addSublayer:cropLayer];
}

- (void)openVoiceButton {
self.shouldPlay = !self.shouldPlay;
if (self.shouldPlay) {
Expand Down
4 changes: 3 additions & 1 deletion NTESLiveDetectPublicDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ source 'https://github.com/CocoaPods/Specs.git'
target 'NTESLiveDetectPublicDemo' do
pod 'Masonry', '~> 1.0.2'
pod 'WHToast'
pod 'NTESLiveDetect', '3.1.2'
pod 'NTESLiveDetect', '3.1.9'
pod 'AFNetworking'
pod 'MBProgressHUD'
#pod 'NERtcSDK', '4.2.147'
#pod 'NIMSDK_LITE', '~> 9.9.0'

end
20 changes: 13 additions & 7 deletions NTESLiveDetectPublicDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ PODS:
- AFNetworking/NSURLSession
- Masonry (1.0.2)
- MBProgressHUD (1.2.0)
- NTESBaseComponent (1.7)
- NTESLiveDetect (3.1.2):
- NTESBaseComponent (1.8)
- NTESLiveDetect (3.1.9):
- NTESBaseComponent
- NTESLiveDetect/Basic (= 3.1.9)
- NTESLiveDetect/Nenn (= 3.1.9)
- NTESLiveDetect/Basic (3.1.9):
- NTESBaseComponent
- NTESLiveDetect/Nenn (3.1.9):
- NTESBaseComponent
- WHToast (0.0.7)

DEPENDENCIES:
- AFNetworking
- Masonry (~> 1.0.2)
- MBProgressHUD
- NTESLiveDetect (= 3.1.2)
- NTESLiveDetect (= 3.1.9)
- WHToast

SPEC REPOS:
Expand All @@ -41,10 +47,10 @@ SPEC CHECKSUMS:
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
NTESBaseComponent: b1cdf3ac1e0b303dbba9d7099ddaff7960acdb03
NTESLiveDetect: 11d03f95eb9f72b476ab3a0c6aab6eca55b8eda9
NTESBaseComponent: 7b310e7e80bb6c27183176188b98356d200dbbc5
NTESLiveDetect: 6adbb0fa0ca052de04226ad609b0832b87372fb3
WHToast: 11a17a3f09f5f733e32bd6f3338919a448cbb719

PODFILE CHECKSUM: 7c7bc272c60b6bd668dd25b91a2485713ff01271
PODFILE CHECKSUM: c93f5f8035535a30a9075ff4495c99cf8c13622a

COCOAPODS: 1.11.3
COCOAPODS: 1.13.0

0 comments on commit 25e2c15

Please sign in to comment.