Commit 22c1d020ebe2e11b413d6c6c30c13018957d5063

Authored by 梁星国
1 parent 45812d8d

提交0.1.5

CNLiveAVCamera.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveAVCamera' 10 s.name = 'CNLiveAVCamera'
11 - s.version = '0.1.4' 11 + s.version = '0.1.5'
12 s.summary = '自定义相机' 12 s.summary = '自定义相机'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveAVCamera/Classes/XFCameraController.h
@@ -31,7 +31,7 @@ typedef void(^ZXShootCompletionBlock)(PHAsset *asset,NSURL *videoUrl, CGFloat vi @@ -31,7 +31,7 @@ typedef void(^ZXShootCompletionBlock)(PHAsset *asset,NSURL *videoUrl, CGFloat vi
31 @end 31 @end
32 32
33 @interface UIImage (XFCamera) 33 @interface UIImage (XFCamera)
34 -+ (UIImage *)imageNamedFromMyBundle:(NSString *)name; 34 ++ (UIImage *)xf_imageNamedFromMyBundle:(NSString *)name;
35 @end 35 @end
36 36
37 37
CNLiveAVCamera/Classes/XFCameraController.m
@@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
67 67
68 @implementation UIImage (XFCamera) 68 @implementation UIImage (XFCamera)
69 69
70 -+ (UIImage *)imageNamedFromMyBundle:(NSString *)name { 70 ++ (UIImage *)xf_imageNamedFromMyBundle:(NSString *)name {
71 NSBundle *imageBundle = [NSBundle xf_cameraBundle]; 71 NSBundle *imageBundle = [NSBundle xf_cameraBundle];
72 name = [name stringByAppendingString:@"@2x"]; 72 name = [name stringByAppendingString:@"@2x"];
73 NSString *imagePath = [imageBundle pathForResource:name ofType:@"png"]; 73 NSString *imagePath = [imageBundle pathForResource:name ofType:@"png"];
@@ -643,7 +643,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); @@ -643,7 +643,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice);
643 if (!_rotateCameraButton) 643 if (!_rotateCameraButton)
644 { 644 {
645 _rotateCameraButton = [[UIButton alloc] init]; 645 _rotateCameraButton = [[UIButton alloc] init];
646 - [_rotateCameraButton setImage:[UIImage imageNamedFromMyBundle:@"fb_xiangji"] forState:UIControlStateNormal]; 646 + [_rotateCameraButton setImage:[UIImage xf_imageNamedFromMyBundle:@"fb_xiangji"] forState:UIControlStateNormal];
647 [_rotateCameraButton addTarget:self action:@selector(rotateCameraBtnFunc:) forControlEvents:UIControlEventTouchUpInside]; 647 [_rotateCameraButton addTarget:self action:@selector(rotateCameraBtnFunc:) forControlEvents:UIControlEventTouchUpInside];
648 } 648 }
649 return _rotateCameraButton; 649 return _rotateCameraButton;
@@ -654,8 +654,8 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); @@ -654,8 +654,8 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice);
654 if (!_flashButton) 654 if (!_flashButton)
655 { 655 {
656 _flashButton = [[UIButton alloc] init]; 656 _flashButton = [[UIButton alloc] init];
657 - [_flashButton setImage:[UIImage imageNamedFromMyBundle:@"gz_shoudian"] forState:UIControlStateNormal];  
658 - [_flashButton setImage:[UIImage imageNamedFromMyBundle:@"gz_shoudian2"] forState:UIControlStateSelected]; 657 + [_flashButton setImage:[UIImage xf_imageNamedFromMyBundle:@"gz_shoudian"] forState:UIControlStateNormal];
  658 + [_flashButton setImage:[UIImage xf_imageNamedFromMyBundle:@"gz_shoudian2"] forState:UIControlStateSelected];
659 [_flashButton addTarget:self action:@selector(flashBtnFunc:) forControlEvents:UIControlEventTouchUpInside]; 659 [_flashButton addTarget:self action:@selector(flashBtnFunc:) forControlEvents:UIControlEventTouchUpInside];
660 } 660 }
661 return _flashButton; 661 return _flashButton;
@@ -677,7 +677,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); @@ -677,7 +677,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice);
677 if (!_closeButton) 677 if (!_closeButton)
678 { 678 {
679 _closeButton = [[UIButton alloc] init]; 679 _closeButton = [[UIButton alloc] init];
680 - [_closeButton setImage:[UIImage imageNamedFromMyBundle:@"fb_quxiaoxia"] forState:UIControlStateNormal]; 680 + [_closeButton setImage:[UIImage xf_imageNamedFromMyBundle:@"fb_quxiaoxia"] forState:UIControlStateNormal];
681 [_closeButton addTarget:self action:@selector(closeBtnFunc) forControlEvents:UIControlEventTouchUpInside]; 681 [_closeButton addTarget:self action:@selector(closeBtnFunc) forControlEvents:UIControlEventTouchUpInside];
682 } 682 }
683 return _closeButton; 683 return _closeButton;
@@ -699,7 +699,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); @@ -699,7 +699,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice);
699 if (!_focusImageView) 699 if (!_focusImageView)
700 { 700 {
701 _focusImageView = [[UIImageView alloc] init]; 701 _focusImageView = [[UIImageView alloc] init];
702 - _focusImageView.image = [UIImage imageNamedFromMyBundle:@"sight_video_focus"]; 702 + _focusImageView.image = [UIImage xf_imageNamedFromMyBundle:@"sight_video_focus"];
703 } 703 }
704 return _focusImageView; 704 return _focusImageView;
705 } 705 }
@@ -710,7 +710,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); @@ -710,7 +710,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice);
710 if (!_cancelButton) 710 if (!_cancelButton)
711 { 711 {
712 _cancelButton = [[UIButton alloc] init]; 712 _cancelButton = [[UIButton alloc] init];
713 - [_cancelButton setImage:[UIImage imageNamedFromMyBundle:@"fb_chongpai"] forState:UIControlStateNormal]; 713 + [_cancelButton setImage:[UIImage xf_imageNamedFromMyBundle:@"fb_chongpai"] forState:UIControlStateNormal];
714 [_cancelButton addTarget:self action:@selector(cancelBtnfunc) forControlEvents:UIControlEventTouchUpInside]; 714 [_cancelButton addTarget:self action:@selector(cancelBtnfunc) forControlEvents:UIControlEventTouchUpInside];
715 } 715 }
716 return _cancelButton; 716 return _cancelButton;
@@ -722,7 +722,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); @@ -722,7 +722,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice);
722 if (!_confirmButton) 722 if (!_confirmButton)
723 { 723 {
724 _confirmButton = [[UIButton alloc] init]; 724 _confirmButton = [[UIButton alloc] init];
725 - [_confirmButton setImage:[UIImage imageNamedFromMyBundle:@"fb_wancheng"] forState:UIControlStateNormal]; 725 + [_confirmButton setImage:[UIImage xf_imageNamedFromMyBundle:@"fb_wancheng"] forState:UIControlStateNormal];
726 [_confirmButton addTarget:self action:@selector(confirmBtnFunc:) forControlEvents:UIControlEventTouchUpInside]; 726 [_confirmButton addTarget:self action:@selector(confirmBtnFunc:) forControlEvents:UIControlEventTouchUpInside];
727 // _confirmButton.cs_acceptEventInterval = 2.0f; 727 // _confirmButton.cs_acceptEventInterval = 2.0f;
728 728
Example/CNLiveAVCamera.xcodeproj/project.pbxproj
@@ -226,7 +226,6 @@ @@ -226,7 +226,6 @@
226 6003F5AA195388D20070C39A /* Sources */, 226 6003F5AA195388D20070C39A /* Sources */,
227 6003F5AB195388D20070C39A /* Frameworks */, 227 6003F5AB195388D20070C39A /* Frameworks */,
228 6003F5AC195388D20070C39A /* Resources */, 228 6003F5AC195388D20070C39A /* Resources */,
229 - 9080C32D0AD68113F8131D42 /* [CP] Embed Pods Frameworks */,  
230 ); 229 );
231 buildRules = ( 230 buildRules = (
232 ); 231 );
@@ -365,48 +364,6 @@ @@ -365,48 +364,6 @@
365 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveAVCamera_Example/Pods-CNLiveAVCamera_Example-frameworks.sh\"\n"; 364 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveAVCamera_Example/Pods-CNLiveAVCamera_Example-frameworks.sh\"\n";
366 showEnvVarsInLog = 0; 365 showEnvVarsInLog = 0;
367 }; 366 };
368 - 9080C32D0AD68113F8131D42 /* [CP] Embed Pods Frameworks */ = {  
369 - isa = PBXShellScriptBuildPhase;  
370 - buildActionMask = 2147483647;  
371 - files = (  
372 - );  
373 - inputPaths = (  
374 - "${PODS_ROOT}/Target Support Files/Pods-CNLiveAVCamera_Tests/Pods-CNLiveAVCamera_Tests-frameworks.sh",  
375 - "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",  
376 - "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",  
377 - "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework",  
378 - "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework",  
379 - "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",  
380 - "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",  
381 - "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework",  
382 - "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework",  
383 - "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",  
384 - "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",  
385 - "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework",  
386 - "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",  
387 - "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework",  
388 - );  
389 - name = "[CP] Embed Pods Frameworks";  
390 - outputPaths = (  
391 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",  
392 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",  
393 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework",  
394 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework",  
395 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",  
396 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",  
397 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework",  
398 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework",  
399 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",  
400 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",  
401 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework",  
402 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",  
403 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework",  
404 - );  
405 - runOnlyForDeploymentPostprocessing = 0;  
406 - shellPath = /bin/sh;  
407 - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveAVCamera_Tests/Pods-CNLiveAVCamera_Tests-frameworks.sh\"\n";  
408 - showEnvVarsInLog = 0;  
409 - };  
410 CFC16709BBBEA2470565BEAB /* [CP] Check Pods Manifest.lock */ = { 367 CFC16709BBBEA2470565BEAB /* [CP] Check Pods Manifest.lock */ = {
411 isa = PBXShellScriptBuildPhase; 368 isa = PBXShellScriptBuildPhase;
412 buildActionMask = 2147483647; 369 buildActionMask = 2147483647;
Example/Podfile
1 #source 'https://github.com/CocoaPods/Specs.git' 1 #source 'https://github.com/CocoaPods/Specs.git'
  2 +source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
2 source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git' 3 source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git'
3 4
4 use_frameworks! 5 use_frameworks!