Commit 22c1d020ebe2e11b413d6c6c30c13018957d5063
1 parent
45812d8d
提交0.1.5
Showing
5 changed files
with
11 additions
and
53 deletions
CNLiveAVCamera.podspec
CNLiveAVCamera/Classes/XFCameraController.h
| ... | ... | @@ -31,7 +31,7 @@ typedef void(^ZXShootCompletionBlock)(PHAsset *asset,NSURL *videoUrl, CGFloat vi |
| 31 | 31 | @end |
| 32 | 32 | |
| 33 | 33 | @interface UIImage (XFCamera) |
| 34 | -+ (UIImage *)imageNamedFromMyBundle:(NSString *)name; | |
| 34 | ++ (UIImage *)xf_imageNamedFromMyBundle:(NSString *)name; | |
| 35 | 35 | @end |
| 36 | 36 | |
| 37 | 37 | ... | ... |
CNLiveAVCamera/Classes/XFCameraController.m
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | |
| 68 | 68 | @implementation UIImage (XFCamera) |
| 69 | 69 | |
| 70 | -+ (UIImage *)imageNamedFromMyBundle:(NSString *)name { | |
| 70 | ++ (UIImage *)xf_imageNamedFromMyBundle:(NSString *)name { | |
| 71 | 71 | NSBundle *imageBundle = [NSBundle xf_cameraBundle]; |
| 72 | 72 | name = [name stringByAppendingString:@"@2x"]; |
| 73 | 73 | NSString *imagePath = [imageBundle pathForResource:name ofType:@"png"]; |
| ... | ... | @@ -643,7 +643,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); |
| 643 | 643 | if (!_rotateCameraButton) |
| 644 | 644 | { |
| 645 | 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 | 647 | [_rotateCameraButton addTarget:self action:@selector(rotateCameraBtnFunc:) forControlEvents:UIControlEventTouchUpInside]; |
| 648 | 648 | } |
| 649 | 649 | return _rotateCameraButton; |
| ... | ... | @@ -654,8 +654,8 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); |
| 654 | 654 | if (!_flashButton) |
| 655 | 655 | { |
| 656 | 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 | 659 | [_flashButton addTarget:self action:@selector(flashBtnFunc:) forControlEvents:UIControlEventTouchUpInside]; |
| 660 | 660 | } |
| 661 | 661 | return _flashButton; |
| ... | ... | @@ -677,7 +677,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); |
| 677 | 677 | if (!_closeButton) |
| 678 | 678 | { |
| 679 | 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 | 681 | [_closeButton addTarget:self action:@selector(closeBtnFunc) forControlEvents:UIControlEventTouchUpInside]; |
| 682 | 682 | } |
| 683 | 683 | return _closeButton; |
| ... | ... | @@ -699,7 +699,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); |
| 699 | 699 | if (!_focusImageView) |
| 700 | 700 | { |
| 701 | 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 | 704 | return _focusImageView; |
| 705 | 705 | } |
| ... | ... | @@ -710,7 +710,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); |
| 710 | 710 | if (!_cancelButton) |
| 711 | 711 | { |
| 712 | 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 | 714 | [_cancelButton addTarget:self action:@selector(cancelBtnfunc) forControlEvents:UIControlEventTouchUpInside]; |
| 715 | 715 | } |
| 716 | 716 | return _cancelButton; |
| ... | ... | @@ -722,7 +722,7 @@ typedef void(^PropertyChangeBlock)(AVCaptureDevice *captureDevice); |
| 722 | 722 | if (!_confirmButton) |
| 723 | 723 | { |
| 724 | 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 | 726 | [_confirmButton addTarget:self action:@selector(confirmBtnFunc:) forControlEvents:UIControlEventTouchUpInside]; |
| 727 | 727 | // _confirmButton.cs_acceptEventInterval = 2.0f; |
| 728 | 728 | ... | ... |
Example/CNLiveAVCamera.xcodeproj/project.pbxproj
| ... | ... | @@ -226,7 +226,6 @@ |
| 226 | 226 | 6003F5AA195388D20070C39A /* Sources */, |
| 227 | 227 | 6003F5AB195388D20070C39A /* Frameworks */, |
| 228 | 228 | 6003F5AC195388D20070C39A /* Resources */, |
| 229 | - 9080C32D0AD68113F8131D42 /* [CP] Embed Pods Frameworks */, | |
| 230 | 229 | ); |
| 231 | 230 | buildRules = ( |
| 232 | 231 | ); |
| ... | ... | @@ -365,48 +364,6 @@ |
| 365 | 364 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveAVCamera_Example/Pods-CNLiveAVCamera_Example-frameworks.sh\"\n"; |
| 366 | 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 | 367 | CFC16709BBBEA2470565BEAB /* [CP] Check Pods Manifest.lock */ = { |
| 411 | 368 | isa = PBXShellScriptBuildPhase; |
| 412 | 369 | buildActionMask = 2147483647; | ... | ... |