├── Demo ├── Pods │ ├── Headers │ │ ├── Private │ │ │ ├── Masonry │ │ │ │ ├── Masonry.h │ │ │ │ ├── MASUtilities.h │ │ │ │ ├── MASConstraint.h │ │ │ │ ├── MASViewAttribute.h │ │ │ │ ├── MASViewConstraint.h │ │ │ │ ├── View+MASAdditions.h │ │ │ │ ├── MASConstraintMaker.h │ │ │ │ ├── MASLayoutConstraint.h │ │ │ │ ├── NSArray+MASAdditions.h │ │ │ │ ├── MASCompositeConstraint.h │ │ │ │ ├── MASConstraint+Private.h │ │ │ │ ├── View+MASShorthandAdditions.h │ │ │ │ ├── ViewController+MASAdditions.h │ │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── JGProgressHUD │ │ │ │ ├── JGProgressHUD.h │ │ │ │ ├── JGProgressHUDShadow.h │ │ │ │ ├── JGProgressHUD-Defines.h │ │ │ │ ├── JGProgressHUDAnimation.h │ │ │ │ ├── JGProgressHUDFadeAnimation.h │ │ │ │ ├── JGProgressHUDIndicatorView.h │ │ │ │ ├── JGProgressHUDPieIndicatorView.h │ │ │ │ ├── JGProgressHUDErrorIndicatorView.h │ │ │ │ ├── JGProgressHUDFadeZoomAnimation.h │ │ │ │ ├── JGProgressHUDImageIndicatorView.h │ │ │ │ ├── JGProgressHUDRingIndicatorView.h │ │ │ │ ├── JGProgressHUDSuccessIndicatorView.h │ │ │ │ └── JGProgressHUDIndeterminateIndicatorView.h │ │ │ ├── UIVIewMasonryLayout │ │ │ │ ├── UIViewLayoutItem.h │ │ │ │ ├── UIView+MansonryLayout.h │ │ │ │ └── UIViewLayoutItemMaker.h │ │ │ └── WKCFansyCameraView │ │ │ │ ├── WKCFansyCameraView.h │ │ │ │ ├── WKCFansyCameraLightView.h │ │ │ │ └── WKCFansyCameraRecordEncoder.h │ │ └── Public │ │ │ ├── Masonry │ │ │ ├── Masonry.h │ │ │ ├── MASConstraint.h │ │ │ ├── MASUtilities.h │ │ │ ├── MASConstraintMaker.h │ │ │ ├── MASViewAttribute.h │ │ │ ├── MASViewConstraint.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ └── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── JGProgressHUD │ │ │ ├── JGProgressHUD.h │ │ │ ├── JGProgressHUDShadow.h │ │ │ ├── JGProgressHUD-Defines.h │ │ │ ├── JGProgressHUDAnimation.h │ │ │ ├── JGProgressHUDFadeAnimation.h │ │ │ ├── JGProgressHUDIndicatorView.h │ │ │ ├── JGProgressHUDPieIndicatorView.h │ │ │ ├── JGProgressHUDErrorIndicatorView.h │ │ │ ├── JGProgressHUDFadeZoomAnimation.h │ │ │ ├── JGProgressHUDImageIndicatorView.h │ │ │ ├── JGProgressHUDRingIndicatorView.h │ │ │ ├── JGProgressHUDSuccessIndicatorView.h │ │ │ └── JGProgressHUDIndeterminateIndicatorView.h │ │ │ ├── UIVIewMasonryLayout │ │ │ ├── UIViewLayoutItem.h │ │ │ ├── UIView+MansonryLayout.h │ │ │ └── UIViewLayoutItemMaker.h │ │ │ └── WKCFansyCameraView │ │ │ ├── WKCFansyCameraView.h │ │ │ ├── WKCFansyCameraLightView.h │ │ │ └── WKCFansyCameraRecordEncoder.h │ ├── UIVIewMasonryLayout │ │ ├── README.md │ │ ├── UIVIewMasonryLayout │ │ │ ├── UIViewLayoutItem.m │ │ │ ├── UIViewLayoutItem.h │ │ │ ├── UIView+MansonryLayout.h │ │ │ └── UIViewLayoutItemMaker.h │ │ └── LICENSE │ ├── Target Support Files │ │ ├── Masonry │ │ │ ├── Masonry-dummy.m │ │ │ ├── Masonry-prefix.pch │ │ │ └── Masonry.xcconfig │ │ ├── JGProgressHUD │ │ │ ├── JGProgressHUD-dummy.m │ │ │ ├── JGProgressHUD-prefix.pch │ │ │ ├── JGProgressHUD.xcconfig │ │ │ └── ResourceBundle-JGProgressHUD-JGProgressHUD-Info.plist │ │ ├── Pods-default-Demo │ │ │ ├── Pods-default-Demo-dummy.m │ │ │ ├── Pods-default-Demo-resources-Debug-output-files.xcfilelist │ │ │ ├── Pods-default-Demo-resources-Release-output-files.xcfilelist │ │ │ ├── Pods-default-Demo-resources-Debug-input-files.xcfilelist │ │ │ ├── Pods-default-Demo-resources-Release-input-files.xcfilelist │ │ │ ├── Pods-default-Demo.debug.xcconfig │ │ │ ├── Pods-default-Demo.release.xcconfig │ │ │ └── Pods-default-Demo-acknowledgements.markdown │ │ ├── WKCFansyCameraView │ │ │ ├── WKCFansyCameraView-dummy.m │ │ │ ├── WKCFansyCameraView-prefix.pch │ │ │ └── WKCFansyCameraView.xcconfig │ │ └── UIVIewMasonryLayout │ │ │ ├── UIVIewMasonryLayout-dummy.m │ │ │ ├── UIVIewMasonryLayout-prefix.pch │ │ │ └── UIVIewMasonryLayout.xcconfig │ ├── JGProgressHUD │ │ ├── JGProgressHUD │ │ │ ├── Resources │ │ │ │ ├── jg_hud_error.png │ │ │ │ ├── jg_hud_success.png │ │ │ │ ├── jg_hud_error@2x.png │ │ │ │ ├── jg_hud_error@3x.png │ │ │ │ ├── jg_hud_success@2x.png │ │ │ │ └── jg_hud_success@3x.png │ │ │ └── JGProgressHUD │ │ │ │ ├── JGProgressHUDErrorIndicatorView.h │ │ │ │ ├── JGProgressHUDSuccessIndicatorView.h │ │ │ │ ├── JGProgressHUDFadeAnimation.h │ │ │ │ ├── JGProgressHUDImageIndicatorView.h │ │ │ │ ├── JGProgressHUDShadow.m │ │ │ │ ├── JGProgressHUDIndeterminateIndicatorView.h │ │ │ │ ├── JGProgressHUDAnimation.m │ │ │ │ ├── JGProgressHUDFadeZoomAnimation.h │ │ │ │ ├── JGProgressHUDImageIndicatorView.m │ │ │ │ ├── JGProgressHUDShadow.h │ │ │ │ ├── JGProgressHUDErrorIndicatorView.m │ │ │ │ ├── JGProgressHUDSuccessIndicatorView.m │ │ │ │ ├── JGProgressHUDPieIndicatorView.h │ │ │ │ ├── JGProgressHUDIndeterminateIndicatorView.m │ │ │ │ ├── JGProgressHUDFadeAnimation.m │ │ │ │ ├── JGProgressHUDAnimation.h │ │ │ │ ├── JGProgressHUDRingIndicatorView.h │ │ │ │ ├── JGProgressHUDIndicatorView.h │ │ │ │ ├── JGProgressHUD-Defines.h │ │ │ │ ├── JGProgressHUDIndicatorView.m │ │ │ │ ├── JGProgressHUDFadeZoomAnimation.m │ │ │ │ ├── JGProgressHUDPieIndicatorView.m │ │ │ │ └── JGProgressHUDRingIndicatorView.m │ │ ├── LICENSE.txt │ │ └── README.md │ ├── WKCFansyCameraView │ │ ├── WKCFansyCameraView │ │ │ ├── Resource │ │ │ │ ├── camera_focus.png │ │ │ │ └── camera_light.png │ │ │ ├── WKCFansyCameraLightView.h │ │ │ ├── WKCFansyCameraRecordEncoder.h │ │ │ ├── WKCFansyCameraLightView.m │ │ │ └── WKCFansyCameraView.h │ │ ├── LICENSE │ │ └── README.md │ ├── Masonry │ │ ├── Masonry │ │ │ ├── MASLayoutConstraint.m │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ ├── MASLayoutConstraint.h │ │ │ ├── MASCompositeConstraint.h │ │ │ ├── Masonry.h │ │ │ ├── ViewController+MASAdditions.h │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ ├── MASViewAttribute.m │ │ │ ├── MASViewAttribute.h │ │ │ ├── ViewController+MASAdditions.m │ │ │ ├── MASViewConstraint.h │ │ │ ├── MASConstraint+Private.h │ │ │ ├── NSArray+MASAdditions.h │ │ │ ├── View+MASAdditions.h │ │ │ ├── View+MASShorthandAdditions.h │ │ │ ├── MASCompositeConstraint.m │ │ │ ├── MASConstraintMaker.h │ │ │ └── NSLayoutConstraint+MASDebugAdditions.m │ │ └── LICENSE │ └── Manifest.lock ├── .DS_Store ├── Demo │ ├── .DS_Store │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── camrea_swicth.imageset │ │ │ ├── camrea_swicth@2x.png │ │ │ ├── camrea_swicth@3x.png │ │ │ └── Contents.json │ │ ├── camera_flash_on.imageset │ │ │ ├── camera_flash_on@2x.png │ │ │ ├── camera_flash_on@3x.png │ │ │ └── Contents.json │ │ ├── camera_frame_11.imageset │ │ │ ├── camera_frame_11@2x.png │ │ │ ├── camera_frame_11@3x.png │ │ │ └── Contents.json │ │ ├── camera_frame_43.imageset │ │ │ ├── camera_frame_43@2x.png │ │ │ ├── camera_frame_43@3x.png │ │ │ └── Contents.json │ │ ├── camera_flash_off.imageset │ │ │ ├── camera_flash_off@2x.png │ │ │ ├── camera_flash_off@3x.png │ │ │ └── Contents.json │ │ ├── camera_flash_auto.imageset │ │ │ ├── camera_flash_auto@2x.png │ │ │ ├── camera_flash_auto@3x.png │ │ │ └── Contents.json │ │ ├── camera_frame_full.imageset │ │ │ ├── camera_frame_full@2x.png │ │ │ ├── camera_frame_full@3x.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.h │ ├── Manager │ │ ├── HUD.h │ │ └── HUD.m │ ├── AppDelegate.h │ ├── main.m │ ├── View │ │ ├── WKCFansyCameraPhotoButton.h │ │ ├── WKCWeakProxy.h │ │ ├── WKCCircleProgressView.h │ │ ├── WKCWeakProxy.m │ │ ├── WKCCircleProgressView.m │ │ └── WKCFansyCameraPhotoButton.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ ├── Category │ │ ├── UIDevice+Common.h │ │ └── UIDevice+Common.m │ ├── Info.plist │ └── AppDelegate.m ├── Demo.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Podfile ├── Demo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Podfile.lock ├── .DS_Store ├── Source ├── .DS_Store └── photo.png ├── WKCFansyCameraView ├── .DS_Store ├── Resource │ ├── .DS_Store │ ├── camera_focus.png │ └── camera_light.png ├── WKCFansyCameraLightView.h ├── WKCFansyCameraRecordEncoder.h ├── WKCFansyCameraView.h └── WKCFansyCameraLightView.m ├── WKCFansyCameraView.podspec ├── LICENSE ├── .gitignore └── README.md /Demo/Pods/Headers/Private/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/Masonry.h -------------------------------------------------------------------------------- /Demo/Pods/UIVIewMasonryLayout/README.md: -------------------------------------------------------------------------------- 1 | # UIVIewMasonryLayout 2 | Masonry封装 3 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/.DS_Store -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASUtilities.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint.h -------------------------------------------------------------------------------- /Demo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/.DS_Store -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewAttribute.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASViewConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASAdditions.h -------------------------------------------------------------------------------- /Source/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Source/.DS_Store -------------------------------------------------------------------------------- /Source/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Source/photo.png -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraintMaker.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASLayoutConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASAdditions.h -------------------------------------------------------------------------------- /Demo/Demo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/.DS_Store -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASCompositeConstraint.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/MASConstraint+Private.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/View+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/ViewController+MASAdditions.h -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUD.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUD.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSArray+MASShorthandAdditions.h -------------------------------------------------------------------------------- /WKCFansyCameraView/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/WKCFansyCameraView/.DS_Store -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDShadow.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDShadow.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/UIVIewMasonryLayout/UIViewLayoutItem.h: -------------------------------------------------------------------------------- 1 | ../../../UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItem.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/WKCFansyCameraView/WKCFansyCameraView.h: -------------------------------------------------------------------------------- 1 | ../../../WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDShadow.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDShadow.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/UIVIewMasonryLayout/UIViewLayoutItem.h: -------------------------------------------------------------------------------- 1 | ../../../UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItem.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/WKCFansyCameraView/WKCFansyCameraView.h: -------------------------------------------------------------------------------- 1 | ../../../WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUD-Defines.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD-Defines.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUD-Defines.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD-Defines.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDAnimation.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDAnimation.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/UIVIewMasonryLayout/UIView+MansonryLayout.h: -------------------------------------------------------------------------------- 1 | ../../../UIVIewMasonryLayout/UIVIewMasonryLayout/UIView+MansonryLayout.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/UIVIewMasonryLayout/UIViewLayoutItemMaker.h: -------------------------------------------------------------------------------- 1 | ../../../UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItemMaker.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/WKCFansyCameraView/WKCFansyCameraLightView.h: -------------------------------------------------------------------------------- 1 | ../../../WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraLightView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/UIVIewMasonryLayout/UIView+MansonryLayout.h: -------------------------------------------------------------------------------- 1 | ../../../UIVIewMasonryLayout/UIVIewMasonryLayout/UIView+MansonryLayout.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/UIVIewMasonryLayout/UIViewLayoutItemMaker.h: -------------------------------------------------------------------------------- 1 | ../../../UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItemMaker.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/WKCFansyCameraView/WKCFansyCameraLightView.h: -------------------------------------------------------------------------------- 1 | ../../../WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraLightView.h -------------------------------------------------------------------------------- /WKCFansyCameraView/Resource/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/WKCFansyCameraView/Resource/.DS_Store -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDFadeAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDFadeAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDPieIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/WKCFansyCameraView/WKCFansyCameraRecordEncoder.h: -------------------------------------------------------------------------------- 1 | ../../../WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraRecordEncoder.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDPieIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/WKCFansyCameraView/WKCFansyCameraRecordEncoder.h: -------------------------------------------------------------------------------- 1 | ../../../WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraRecordEncoder.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDErrorIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDFadeZoomAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDImageIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDImageIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDRingIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDErrorIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDFadeZoomAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDImageIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDImageIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDRingIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.h -------------------------------------------------------------------------------- /WKCFansyCameraView/Resource/camera_focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/WKCFansyCameraView/Resource/camera_focus.png -------------------------------------------------------------------------------- /WKCFansyCameraView/Resource/camera_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/WKCFansyCameraView/Resource/camera_light.png -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDSuccessIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDSuccessIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Private/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Headers/Public/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.h: -------------------------------------------------------------------------------- 1 | ../../../JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.h -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Masonry/Masonry-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Masonry : NSObject 3 | @end 4 | @implementation PodsDummy_Masonry 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_error.png -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_success.png -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_error@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_error@2x.png -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_error@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_error@3x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camrea_swicth.imageset/camrea_swicth@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camrea_swicth.imageset/camrea_swicth@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camrea_swicth.imageset/camrea_swicth@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camrea_swicth.imageset/camrea_swicth@3x.png -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_success@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_success@2x.png -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_success@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/JGProgressHUD/JGProgressHUD/Resources/jg_hud_success@3x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_on.imageset/camera_flash_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_flash_on.imageset/camera_flash_on@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_on.imageset/camera_flash_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_flash_on.imageset/camera_flash_on@3x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_11.imageset/camera_frame_11@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_frame_11.imageset/camera_frame_11@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_11.imageset/camera_frame_11@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_frame_11.imageset/camera_frame_11@3x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_43.imageset/camera_frame_43@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_frame_43.imageset/camera_frame_43@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_43.imageset/camera_frame_43@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_frame_43.imageset/camera_frame_43@3x.png -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_focus.png -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_light.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_off.imageset/camera_flash_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_flash_off.imageset/camera_flash_off@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_off.imageset/camera_flash_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_flash_off.imageset/camera_flash_off@3x.png -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/JGProgressHUD/JGProgressHUD-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JGProgressHUD : NSObject 3 | @end 4 | @implementation PodsDummy_JGProgressHUD 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_auto.imageset/camera_flash_auto@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_flash_auto.imageset/camera_flash_auto@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_auto.imageset/camera_flash_auto@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_flash_auto.imageset/camera_flash_auto@3x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_full.imageset/camera_frame_full@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_frame_full.imageset/camera_frame_full@2x.png -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_full.imageset/camera_frame_full@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WKCLoveYang/WKCFansyCameraView/HEAD/Demo/Demo/Assets.xcassets/camera_frame_full.imageset/camera_frame_full@3x.png -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_default_Demo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_default_Demo 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/WKCFansyCameraView/WKCFansyCameraView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_WKCFansyCameraView : NSObject 3 | @end 4 | @implementation PodsDummy_WKCFansyCameraView 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/UIVIewMasonryLayout/UIVIewMasonryLayout-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_UIVIewMasonryLayout : NSObject 3 | @end 4 | @implementation PodsDummy_UIVIewMasonryLayout 5 | @end 6 | -------------------------------------------------------------------------------- /Demo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '10.0' 2 | 3 | inhibit_all_warnings! 4 | 5 | def shared_pods 6 | 7 | pod 'WKCFansyCameraView' 8 | pod 'UIVIewMasonryLayout' 9 | pod 'JGProgressHUD' 10 | 11 | end 12 | 13 | abstract_target 'default' do 14 | shared_pods 15 | target 'Demo' 16 | end 17 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Masonry/Masonry-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/Demo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/26. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Demo/Demo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/JGProgressHUD/JGProgressHUD-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/UIVIewMasonryLayout/UIVIewMasonryLayout-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/WKCFansyCameraView/WKCFansyCameraView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo-resources-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/JGProgressHUD.bundle 2 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/camera_focus.png 3 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/camera_light.png -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo-resources-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/JGProgressHUD.bundle 2 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/camera_focus.png 3 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/camera_light.png -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/Demo/Manager/HUD.h: -------------------------------------------------------------------------------- 1 | // 2 | // HUD.h 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/27. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HUD : NSObject 12 | 13 | + (void)showIndicatorWithTitle:(NSString *)title; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/26. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo-resources-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-default-Demo/Pods-default-Demo-resources.sh 2 | ${PODS_CONFIGURATION_BUILD_DIR}/JGProgressHUD/JGProgressHUD.bundle 3 | ${PODS_ROOT}/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_focus.png 4 | ${PODS_ROOT}/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_light.png -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo-resources-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-default-Demo/Pods-default-Demo-resources.sh 2 | ${PODS_CONFIGURATION_BUILD_DIR}/JGProgressHUD/JGProgressHUD.bundle 3 | ${PODS_ROOT}/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_focus.png 4 | ${PODS_ROOT}/WKCFansyCameraView/WKCFansyCameraView/Resource/camera_light.png -------------------------------------------------------------------------------- /Demo/Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/26. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WKCFansyCameraView/WKCFansyCameraLightView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FaceSDKLittleCameraLightView.h 3 | // PhotoFace 4 | // 5 | // Created by wkcloveYang on 2019/7/13. 6 | // Copyright © 2019 PhotoFace. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WKCFansyCameraLightView : UIView 12 | 13 | 14 | @property (nonatomic, assign) CGFloat progress; 15 | 16 | + (CGSize)itemSize; 17 | 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraLightView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FaceSDKLittleCameraLightView.h 3 | // PhotoFace 4 | // 5 | // Created by wkcloveYang on 2019/7/13. 6 | // Copyright © 2019 PhotoFace. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WKCFansyCameraLightView : UIView 12 | 13 | 14 | @property (nonatomic, assign) CGFloat progress; 15 | 16 | + (CGSize)itemSize; 17 | 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camrea_swicth.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camrea_swicth@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camrea_swicth@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camera_flash_off@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camera_flash_off@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camera_flash_on@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camera_flash_on@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camera_frame_11@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camera_frame_11@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_43.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camera_frame_43@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camera_frame_43@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Demo/View/WKCFansyCameraPhotoButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCFansyCameraPhotoButton.h 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/27. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WKCFansyCameraPhotoButton : UIView 12 | 13 | @property (nonatomic, copy) void(^takePhotoBlock)(void); 14 | @property (nonatomic, copy) void(^startRecordBlock)(void); 15 | @property (nonatomic, copy) void(^endRecordBlock)(void); 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_flash_auto.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camera_flash_auto@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camera_flash_auto@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/camera_frame_full.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "camera_frame_full@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "camera_frame_full@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/Pods/UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewLayoutItem.m 3 | // ABC 4 | // 5 | // Created by wkcloveYang on 2019/8/9. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import "UIViewLayoutItem.h" 10 | 11 | @implementation UIViewLayoutItem 12 | 13 | - (instancetype)init 14 | { 15 | if (self = [super init]) { 16 | _offSet = 0; 17 | _insert = UIEdgeInsetsZero; 18 | _mutil = 0; 19 | _size = CGSizeZero; 20 | _value = 0; 21 | } 22 | 23 | return self; 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDErrorIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDImageIndicatorView.h" 10 | 11 | /** 12 | An image indicator showing a cross, representing a failed operation. 13 | */ 14 | @interface JGProgressHUDErrorIndicatorView : JGProgressHUDImageIndicatorView 15 | 16 | /** 17 | Default initializer for this class. 18 | */ 19 | - (instancetype __nonnull)init; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDSuccessIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDImageIndicatorView.h" 10 | 11 | /** 12 | An image indicator showing a checkmark, representing a failed operation. 13 | */ 14 | @interface JGProgressHUDSuccessIndicatorView : JGProgressHUDImageIndicatorView 15 | 16 | /** 17 | Default initializer for this class. 18 | */ 19 | - (instancetype __nonnull)init; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Masonry/Masonry.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Demo/Demo/View/WKCWeakProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCWeakProxy.h 3 | // ABC 4 | // 5 | // Created by wkcloveYang on 2019/8/8. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // 应用场景 12 | // NSTimer或者CADisplayLink 添加target self, 强引用; 13 | // _timer = [NSTimer timerWithTimeInterval:0.1 target:[WKCWeakProxy proxyWithTarget:self] selector:@selector(tick:) userInfo:nil repeats:YES]; 14 | 15 | @interface WKCWeakProxy : NSProxy 16 | 17 | @property (nonatomic, weak, readonly) id target; 18 | 19 | - (instancetype)initWithTarget:(id)target; 20 | 21 | + (instancetype)proxyWithTarget:(id)target; 22 | 23 | @end 24 | 25 | 26 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/JGProgressHUD/JGProgressHUD.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JGProgressHUD 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JGProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JGProgressHUD" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/JGProgressHUD 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/WKCFansyCameraView/WKCFansyCameraView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/WKCFansyCameraView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/WKCFansyCameraView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/WKCFansyCameraView" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/WKCFansyCameraView 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /WKCFansyCameraView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "WKCFansyCameraView" 3 | s.version = "2.0.1" 4 | s.summary = "自定义相机视图" 5 | s.homepage = "https://github.com/WKCLoveYang/WKCFansyCameraView.git" 6 | s.license = { :type => "MIT", :file => "LICENSE" } 7 | s.author = { "WKCLoveYang" => "wkcloveyang@gmail.com" } 8 | s.platform = :ios, "10.0" 9 | s.source = { :git => "https://github.com/WKCLoveYang/WKCFansyCameraView.git", :tag => "2.0.1" } 10 | 11 | s.frameworks = "Foundation", "UIKit" 12 | s.requires_arc = true 13 | s.source_files = "WKCFansyCameraView/**/*.{h,m,mm}" 14 | s.public_header_files = "WKCFansyCameraView/**/*.h" 15 | s.resources = "WKCFansyCameraView/Resource/*.png" 16 | 17 | end 18 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/UIVIewMasonryLayout/UIVIewMasonryLayout.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/UIVIewMasonryLayout 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UIVIewMasonryLayout" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/UIVIewMasonryLayout" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/UIVIewMasonryLayout 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Demo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JGProgressHUD (2.0.4) 3 | - Masonry (1.1.0) 4 | - UIVIewMasonryLayout (1.5.0): 5 | - Masonry 6 | - WKCFansyCameraView (2.0.0) 7 | 8 | DEPENDENCIES: 9 | - JGProgressHUD 10 | - UIVIewMasonryLayout 11 | - WKCFansyCameraView 12 | 13 | SPEC REPOS: 14 | https://github.com/cocoapods/specs.git: 15 | - JGProgressHUD 16 | - Masonry 17 | - UIVIewMasonryLayout 18 | - WKCFansyCameraView 19 | 20 | SPEC CHECKSUMS: 21 | JGProgressHUD: 62658b14e72cccf179efc7a13bcb54d30b92fc22 22 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 23 | UIVIewMasonryLayout: 64f6810d3bd432062df44c1cd554360bcbb0535c 24 | WKCFansyCameraView: 9fa9b702a740abb4e5ebf8d88b2040832de468a4 25 | 26 | PODFILE CHECKSUM: 3b74b81d43a8e571e7f21397d57e1984f8c052ed 27 | 28 | COCOAPODS: 1.7.5 29 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeAnimation.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDAnimation.h" 10 | 11 | /** 12 | A simple fade animation that fades the HUD from alpha @c 0.0 to alpha @c 1.0. 13 | */ 14 | @interface JGProgressHUDFadeAnimation : JGProgressHUDAnimation 15 | 16 | /** 17 | Duration of the animation. 18 | 19 | @b Default: 0.4. 20 | */ 21 | @property (nonatomic, assign) NSTimeInterval duration; 22 | 23 | /** 24 | Animation options 25 | 26 | @b Default: UIViewAnimationOptionCurveEaseInOut. 27 | */ 28 | @property (nonatomic, assign) UIViewAnimationOptions animationOptions; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Demo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JGProgressHUD (2.0.4) 3 | - Masonry (1.1.0) 4 | - UIVIewMasonryLayout (1.5.0): 5 | - Masonry 6 | - WKCFansyCameraView (2.0.0) 7 | 8 | DEPENDENCIES: 9 | - JGProgressHUD 10 | - UIVIewMasonryLayout 11 | - WKCFansyCameraView 12 | 13 | SPEC REPOS: 14 | https://github.com/cocoapods/specs.git: 15 | - JGProgressHUD 16 | - Masonry 17 | - UIVIewMasonryLayout 18 | - WKCFansyCameraView 19 | 20 | SPEC CHECKSUMS: 21 | JGProgressHUD: 62658b14e72cccf179efc7a13bcb54d30b92fc22 22 | Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 23 | UIVIewMasonryLayout: 64f6810d3bd432062df44c1cd554360bcbb0535c 24 | WKCFansyCameraView: 9fa9b702a740abb4e5ebf8d88b2040832de468a4 25 | 26 | PODFILE CHECKSUM: 3b74b81d43a8e571e7f21397d57e1984f8c052ed 27 | 28 | COCOAPODS: 1.7.5 29 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDImageIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDImageIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 05.08.15. 6 | // Copyright (c) 2015 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDIndicatorView.h" 10 | 11 | /** 12 | An indicator for displaying custom images. Supports animated images. 13 | 14 | You may subclass this class to create a custom image indicator view. 15 | */ 16 | @interface JGProgressHUDImageIndicatorView : JGProgressHUDIndicatorView 17 | 18 | /** 19 | Initializes the indicator view with an UIImageView showing the @c image. 20 | 21 | @param image The image to show in the indicator view. 22 | */ 23 | - (instancetype __nonnull)initWithImage:(UIImage *__nonnull)image; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Demo/Pods/UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewLayoutItem.h 3 | // ABC 4 | // 5 | // Created by wkcloveYang on 2019/8/9. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | typedef NS_ENUM(NSInteger, LayoutType) { 13 | LayoutTypeEqual = 0, 14 | LayoutTypeGreat = 1, 15 | LayoutTypeLess = 2 16 | }; 17 | 18 | 19 | @interface UIViewLayoutItem : NSObject 20 | 21 | @property (nonatomic, strong) id object; 22 | @property (nonatomic, assign) LayoutType layoutType; 23 | @property (nonatomic, assign) CGFloat offSet; 24 | @property (nonatomic, assign) UIEdgeInsets insert; 25 | @property (nonatomic, assign) CGFloat mutil; 26 | @property (nonatomic, assign) CGSize size; 27 | @property (nonatomic, assign) CGFloat value; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /Demo/Demo/Manager/HUD.m: -------------------------------------------------------------------------------- 1 | // 2 | // HUD.m 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/27. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import "HUD.h" 10 | #import 11 | #import 12 | 13 | @implementation HUD 14 | 15 | + (void)showIndicatorWithTitle:(NSString *)title 16 | { 17 | [self showIndicatorWithTitle:title 18 | duration:2.0]; 19 | } 20 | 21 | + (void)showIndicatorWithTitle:(NSString *)title 22 | duration:(NSTimeInterval)duration 23 | { 24 | JGProgressHUD * hud = [[JGProgressHUD alloc] initWithStyle:JGProgressHUDStyleLight]; 25 | hud.textLabel.text = title; 26 | UIWindow * window = UIApplication.sharedApplication.windows.firstObject; 27 | [hud showInView:window animated:YES]; 28 | [hud dismissAfterDelay:duration animated:YES]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/JGProgressHUD/ResourceBundle-JGProgressHUD-JGProgressHUD-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 2.0.4 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDShadow.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDShadow.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 25.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDShadow.h" 10 | 11 | @implementation JGProgressHUDShadow 12 | 13 | + (instancetype)shadowWithColor:(UIColor *)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity { 14 | return [[self alloc] initWithColor:color offset:offset radius:radius opacity:opacity]; 15 | } 16 | 17 | - (instancetype)initWithColor:(UIColor *)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity { 18 | self = [super init]; 19 | 20 | if (self) { 21 | _color = color; 22 | _offset = offset; 23 | _radius = radius; 24 | _opacity = opacity; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndeterminateIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUD-Defines.h" 10 | #import "JGProgressHUDIndicatorView.h" 11 | 12 | /** 13 | An indeterminate progress indicator showing a @c UIActivityIndicatorView. 14 | */ 15 | @interface JGProgressHUDIndeterminateIndicatorView : JGProgressHUDIndicatorView 16 | 17 | /** 18 | Initializes the indicator view and sets the correct color to match the HUD style. 19 | */ 20 | - (instancetype __nonnull)initWithHUDStyle:(JGProgressHUDStyle)style __attribute((deprecated(("This initializer is no longer needed. Use the init initializer method.")))); 21 | 22 | /** 23 | Set the color of the activity indicator view. 24 | @param color The color to apply to the activity indicator view. 25 | */ 26 | - (void)setColor:(UIColor *__nonnull)color; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDAnimation.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDAnimation.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @interface JGProgressHUD (Private) 13 | 14 | - (void)animationDidFinish:(BOOL)presenting; 15 | 16 | @end 17 | 18 | @interface JGProgressHUDAnimation () { 19 | BOOL _presenting; 20 | } 21 | 22 | @property (nonatomic, weak) JGProgressHUD *progressHUD; 23 | 24 | @end 25 | 26 | @implementation JGProgressHUDAnimation 27 | 28 | #pragma mark - Initializers 29 | 30 | + (instancetype)animation { 31 | return [[self alloc] init]; 32 | } 33 | 34 | #pragma mark - Public methods 35 | 36 | - (void)show { 37 | _presenting = YES; 38 | } 39 | 40 | - (void)hide { 41 | _presenting = NO; 42 | } 43 | 44 | - (void)animationFinished { 45 | [self.progressHUD animationDidFinish:_presenting]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILayoutGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideTop; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuideBottom; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideTop; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuideBottom; 26 | 27 | 28 | @end 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeZoomAnimation.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDAnimation.h" 10 | 11 | /** 12 | An animation that fades in the HUD and expands the HUD from scale @c (0, 0) to a customizable scale, and finally to scale @c (1, 1), creating a bouncing effect. 13 | */ 14 | @interface JGProgressHUDFadeZoomAnimation : JGProgressHUDAnimation 15 | 16 | /** 17 | Duration of the animation from or to the shrinked state. 18 | 19 | @b Default: 0.2. 20 | */ 21 | @property (nonatomic, assign) NSTimeInterval shrinkAnimationDuaration; 22 | 23 | /** 24 | Duration of the animation from or to the expanded state. 25 | 26 | @b Default: 0.1. 27 | */ 28 | @property (nonatomic, assign) NSTimeInterval expandAnimationDuaration; 29 | 30 | /** 31 | The scale to apply to the HUD when expanding. 32 | 33 | @b Default: (1.1, 1.1). 34 | */ 35 | @property (nonatomic, assign) CGSize expandScale; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 WeiKunChao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Demo/Pods/UIVIewMasonryLayout/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 WeiKunChao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 WeiKunChao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018 Jonas Gessner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Demo/Demo/View/WKCCircleProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCCircleProgressView.h 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/27. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WKCCircleProgressView : UIView 12 | 13 | /** 14 | 进度条颜色 默认红色 15 | */ 16 | @property (nonatomic, strong) UIColor *progressColor; 17 | 18 | /** 19 | 进度条背景色 默认灰色 20 | */ 21 | @property (nonatomic, strong) UIColor *progressBackgroundColor; 22 | 23 | /** 24 | 进度条宽度 默认5 25 | */ 26 | @property (nonatomic, assign) CGFloat progressWidth; 27 | 28 | /** 29 | 进度条进度 0-1 30 | */ 31 | @property (nonatomic, assign) float percent; 32 | 33 | /** 34 | 0顺时针 1逆时针 35 | */ 36 | @property (nonatomic, assign) BOOL clockwise; 37 | 38 | /** 39 | 记录进度的Label 40 | */ 41 | @property (nonatomic, strong) UILabel *centerLabel; 42 | 43 | /** 44 | Label的背景色 默认clearColor 45 | */ 46 | @property (nonatomic, strong) UIColor *labelbackgroundColor; 47 | 48 | /** 49 | Label的字体颜色 默认黑色 50 | */ 51 | @property (nonatomic, strong) UIColor *textColor; 52 | 53 | /** 54 | Label的字体大小 默认15 55 | */ 56 | @property (nonatomic, strong) UIFont *textFont; 57 | 58 | @end 59 | 60 | -------------------------------------------------------------------------------- /Demo/Pods/UIVIewMasonryLayout/UIVIewMasonryLayout/UIView+MansonryLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MansonryLayout.h 3 | // ABC 4 | // 5 | // Created by wkcloveYang on 2019/8/9. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import "UIViewLayoutItemMaker.h" 13 | 14 | @interface UIView (MansonryLayout) 15 | 16 | @property (nonatomic, weak) UIViewLayoutItem * wkc_left; 17 | @property (nonatomic, weak) UIViewLayoutItem * wkc_right; 18 | @property (nonatomic, weak) UIViewLayoutItem * wkc_top; 19 | @property (nonatomic, weak) UIViewLayoutItem * wkc_bottom; 20 | @property (nonatomic, weak) UIViewLayoutItem * wkc_center; 21 | @property (nonatomic, weak) UIViewLayoutItem * wkc_centerX; 22 | @property (nonatomic, weak) UIViewLayoutItem * wkc_centerY; 23 | @property (nonatomic, weak) UIViewLayoutItem * wkc_width; 24 | @property (nonatomic, weak) UIViewLayoutItem * wkc_height; 25 | @property (nonatomic, weak) UIViewLayoutItem * wkc_size; 26 | @property (nonatomic, weak) UIViewLayoutItem * wkc_edge; 27 | 28 | 29 | - (void)wkc_makeLayout; 30 | - (void)wkc_updateLayout; 31 | - (void)wkc_removeLayout; 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JGProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/UIVIewMasonryLayout" "${PODS_ROOT}/Headers/Public/WKCFansyCameraView" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JGProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/UIVIewMasonryLayout" "${PODS_CONFIGURATION_BUILD_DIR}/WKCFansyCameraView" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JGProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/UIVIewMasonryLayout" -isystem "${PODS_ROOT}/Headers/Public/WKCFansyCameraView" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"JGProgressHUD" -l"Masonry" -l"UIVIewMasonryLayout" -l"WKCFansyCameraView" -framework "Foundation" -framework "QuartzCore" -framework "UIKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JGProgressHUD" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/UIVIewMasonryLayout" "${PODS_ROOT}/Headers/Public/WKCFansyCameraView" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JGProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/UIVIewMasonryLayout" "${PODS_CONFIGURATION_BUILD_DIR}/WKCFansyCameraView" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JGProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/UIVIewMasonryLayout" -isystem "${PODS_ROOT}/Headers/Public/WKCFansyCameraView" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"JGProgressHUD" -l"Masonry" -l"UIVIewMasonryLayout" -l"WKCFansyCameraView" -framework "Foundation" -framework "QuartzCore" -framework "UIKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDImageIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDImageIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 05.08.15. 6 | // Copyright (c) 2015 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDImageIndicatorView.h" 10 | 11 | @implementation JGProgressHUDImageIndicatorView { 12 | BOOL _customizedTintColor; 13 | } 14 | 15 | - (instancetype)initWithImage:(UIImage *)image { 16 | UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; 17 | 18 | self = [super initWithContentView:imageView]; 19 | 20 | return self; 21 | } 22 | 23 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 24 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 25 | 26 | if (!_customizedTintColor) { 27 | if (style == JGProgressHUDStyleDark) { 28 | self.tintColor = [UIColor whiteColor]; 29 | } 30 | else { 31 | self.tintColor = [UIColor blackColor]; 32 | } 33 | _customizedTintColor = NO; 34 | } 35 | } 36 | 37 | - (void)setTintColor:(UIColor *)tintColor { 38 | [super setTintColor:tintColor]; 39 | _customizedTintColor = YES; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDShadow.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDShadow.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 25.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | A wrapper representing properties of a shadow. 13 | */ 14 | @interface JGProgressHUDShadow : NSObject 15 | 16 | - (instancetype __nonnull)initWithColor:(UIColor *__nonnull)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity; 17 | 18 | /** Convenience initializer. */ 19 | + (instancetype __nonnull)shadowWithColor:(UIColor *__nonnull)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity; 20 | 21 | /** 22 | The color of the shadow. Colors created from patterns are currently NOT supported. 23 | */ 24 | @property (nonatomic, strong, readonly, nonnull) UIColor *color; 25 | 26 | /** The shadow offset. */ 27 | @property (nonatomic, assign, readonly) CGSize offset; 28 | 29 | /** The blur radius used to create the shadow. */ 30 | @property (nonatomic, assign, readonly) CGFloat radius; 31 | 32 | /** 33 | The opacity of the shadow. Specifying a value outside the [0,1] range will give undefined results. 34 | */ 35 | @property (nonatomic, assign, readonly) float opacity; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDErrorIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDErrorIndicatorView.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @implementation JGProgressHUDErrorIndicatorView 13 | 14 | - (instancetype)initWithContentView:(UIView *__unused)contentView { 15 | NSBundle *currentBundle = [NSBundle bundleForClass:[self class]]; 16 | NSURL *resourceBundleURL = [currentBundle URLForResource:@"JGProgressHUD" withExtension:@"bundle"]; 17 | NSBundle *resourceBundle = currentBundle; 18 | if (resourceBundleURL) { 19 | resourceBundle = [NSBundle bundleWithURL:resourceBundleURL] ?: currentBundle; 20 | } 21 | 22 | NSString *imgPath = [resourceBundle pathForResource:@"jg_hud_error" ofType:@"png"]; 23 | self = [super initWithImage:[[UIImage imageWithContentsOfFile:imgPath] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; 24 | 25 | return self; 26 | } 27 | 28 | - (instancetype)init { 29 | return [self initWithContentView:nil]; 30 | } 31 | 32 | - (void)updateAccessibility { 33 | self.accessibilityLabel = NSLocalizedString(@"Error",); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDSuccessIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDSuccessIndicatorView.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @implementation JGProgressHUDSuccessIndicatorView 13 | 14 | - (instancetype)initWithContentView:(UIView *__unused)contentView { 15 | NSBundle *currentBundle = [NSBundle bundleForClass:[self class]]; 16 | NSURL *resourceBundleURL = [currentBundle URLForResource:@"JGProgressHUD" withExtension:@"bundle"]; 17 | NSBundle *resourceBundle = currentBundle; 18 | if (resourceBundleURL) { 19 | resourceBundle = [NSBundle bundleWithURL:resourceBundleURL] ?: currentBundle; 20 | } 21 | 22 | NSString *imgPath = [resourceBundle pathForResource:@"jg_hud_success" ofType:@"png"]; 23 | self = [super initWithImage:[[UIImage imageWithContentsOfFile:imgPath] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; 24 | 25 | return self; 26 | } 27 | 28 | - (instancetype)init { 29 | return [self initWithContentView:nil]; 30 | } 31 | 32 | - (void)updateAccessibility { 33 | self.accessibilityLabel = NSLocalizedString(@"Success",); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDPieIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUD-Defines.h" 10 | #import "JGProgressHUDIndicatorView.h" 11 | 12 | /** 13 | A pie shaped determinate progress indicator. 14 | */ 15 | @interface JGProgressHUDPieIndicatorView : JGProgressHUDIndicatorView 16 | 17 | /** 18 | Initializes the indicator view and sets the correct color to match the HUD style. 19 | */ 20 | - (instancetype __nonnull)initWithHUDStyle:(JGProgressHUDStyle)style __attribute((deprecated(("This initializer is no longer needed. Use the init initializer method.")))); 21 | 22 | /** 23 | Tint color of the Pie. 24 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 25 | 26 | @b Default: White for JGProgressHUDStyleDark, otherwise black. 27 | */ 28 | @property (nonatomic, strong, nonnull) UIColor *color; 29 | 30 | /** 31 | The background fill color inside the pie. 32 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 33 | 34 | @b Default: Dark gray for JGProgressHUDStyleDark, otherwise light gray. 35 | */ 36 | @property (nonatomic, strong, nonnull) UIColor *fillColor; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndeterminateIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDIndeterminateIndicatorView.h" 10 | 11 | @implementation JGProgressHUDIndeterminateIndicatorView 12 | 13 | - (instancetype)init { 14 | UIActivityIndicatorView *activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; 15 | [activityIndicatorView startAnimating]; 16 | 17 | self = [super initWithContentView:activityIndicatorView]; 18 | return self; 19 | } 20 | 21 | - (instancetype)initWithHUDStyle:(JGProgressHUDStyle)style { 22 | return [self init]; 23 | } 24 | 25 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 26 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 27 | 28 | if (style != JGProgressHUDStyleDark) { 29 | self.color = [UIColor blackColor]; 30 | } 31 | else { 32 | self.color = [UIColor whiteColor]; 33 | } 34 | } 35 | 36 | - (void)setColor:(UIColor *)color { 37 | [(UIActivityIndicatorView *)self.contentView setColor:color]; 38 | } 39 | 40 | - (void)updateAccessibility { 41 | self.accessibilityLabel = NSLocalizedString(@"Indeterminate progress",); 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/ViewController+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "ViewController+MASAdditions.h" 10 | 11 | #ifdef MAS_VIEW_CONTROLLER 12 | 13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions) 14 | 15 | - (MASViewAttribute *)mas_topLayoutGuide { 16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 17 | } 18 | - (MASViewAttribute *)mas_topLayoutGuideTop { 19 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 20 | } 21 | - (MASViewAttribute *)mas_topLayoutGuideBottom { 22 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 23 | } 24 | 25 | - (MASViewAttribute *)mas_bottomLayoutGuide { 26 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 27 | } 28 | - (MASViewAttribute *)mas_bottomLayoutGuideTop { 29 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 30 | } 31 | - (MASViewAttribute *)mas_bottomLayoutGuideBottom { 32 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 33 | } 34 | 35 | 36 | 37 | @end 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASViewConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | #import "MASUtilities.h" 13 | 14 | /** 15 | * A single constraint. 16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view 17 | */ 18 | @interface MASViewConstraint : MASConstraint 19 | 20 | /** 21 | * First item/view and first attribute of the NSLayoutConstraint 22 | */ 23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; 24 | 25 | /** 26 | * Second item/view and second attribute of the NSLayoutConstraint 27 | */ 28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; 29 | 30 | /** 31 | * initialises the MASViewConstraint with the first part of the equation 32 | * 33 | * @param firstViewAttribute view.mas_left, view.mas_width etc. 34 | * 35 | * @return a new view constraint 36 | */ 37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; 38 | 39 | /** 40 | * Returns all MASViewConstraints installed with this view as a first item. 41 | * 42 | * @param view A view to retrieve constraints for. 43 | * 44 | * @return An array of MASViewConstraints. 45 | */ 46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeAnimation.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDFadeAnimation.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @implementation JGProgressHUDFadeAnimation 13 | 14 | #pragma mark - Initializers 15 | 16 | - (instancetype)init { 17 | self = [super init]; 18 | if (self) { 19 | self.duration = 0.4; 20 | self.animationOptions = UIViewAnimationOptionCurveEaseInOut; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)setAnimationOptions:(UIViewAnimationOptions)animationOptions { 26 | _animationOptions = (animationOptions | UIViewAnimationOptionBeginFromCurrentState); 27 | } 28 | 29 | #pragma mark - Showing 30 | 31 | - (void)show { 32 | [super show]; 33 | 34 | self.progressHUD.alpha = 0.0; 35 | self.progressHUD.hidden = NO; 36 | 37 | [UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{ 38 | self.progressHUD.alpha = 1.0; 39 | } completion:^(BOOL __unused finished) { 40 | [self animationFinished]; 41 | }]; 42 | } 43 | 44 | #pragma mark - Hiding 45 | 46 | - (void)hide { 47 | [super hide]; 48 | 49 | [UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{ 50 | self.progressHUD.alpha = 0.0; 51 | } completion:^(BOOL __unused finished) { 52 | [self animationFinished]; 53 | }]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDAnimation.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class JGProgressHUD; 13 | 14 | /** 15 | You may subclass this class to create a custom progress indicator view. 16 | */ 17 | @interface JGProgressHUDAnimation : NSObject 18 | 19 | /** Convenience initializer. */ 20 | + (instancetype __nonnull)animation; 21 | 22 | /** The HUD using this animation. */ 23 | @property (nonatomic, weak, readonly, nullable) JGProgressHUD *progressHUD; 24 | 25 | /** 26 | The @c progressHUD is hidden from screen with @c alpha = 1 and @c hidden = @c YES. Ideally, you should prepare the HUD for presentation, then set @c hidden to @c NO on the @c progressHUD and then perform the animation. 27 | @post Call @c animationFinished. 28 | */ 29 | - (void)show NS_REQUIRES_SUPER; 30 | 31 | /** 32 | The @c progressHUD wis visible on screen with @c alpha = 1 and @c hidden = @c NO. You should only perform the animation in this method, the @c progressHUD itself will take care of hiding itself and removing itself from superview. 33 | @post Call @c animationFinished. 34 | */ 35 | - (void)hide NS_REQUIRES_SUPER; 36 | 37 | /** 38 | @pre This method should only be called at the end of a @c show or @c hide animaiton. 39 | @attention ALWAYS call this method after completing a @c show or @c hide animation. 40 | */ 41 | - (void)animationFinished NS_REQUIRES_SUPER; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 52 | 53 | fastlane/report.xml 54 | fastlane/Preview.html 55 | fastlane/screenshots/**/*.png 56 | fastlane/test_output 57 | 58 | # Code Injection 59 | # 60 | # After new code Injection tools there's a generated folder /iOSInjectionProject 61 | # https://github.com/johnno1962/injectionforxcode 62 | 63 | iOSInjectionProject/ 64 | -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/README.md: -------------------------------------------------------------------------------- 1 | # WKCFansyCameraView 2 | 自定义相机视图 3 | 4 | 5 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/WKCFansyCameraView?style=flat)](https://cocoapods.org/pods/WKCFansyCameraView) [![License: MIT](https://img.shields.io/cocoapods/l/WKCFansyCameraView?style=flat)](http://opensource.org/licenses/MIT) 6 | 7 | # 属性 8 | | 属性 | 含义 | 9 | | ---- | ---- | 10 | | delegate | 代理 | 11 | | premissionDeniedHandle | 权限没开时回调 | 12 | | flashMode | 闪光灯模式 | 13 | | position | 摄像头位置 | 14 | | captureOrientation | 捕捉方向 | 15 | | shouldScaleEnable | 是否捏合缩放,默认NO | 16 | | shouldFocusEnable | 是否点击为聚焦点, 默认YES | 17 | | shouldExposureEnable | 是否上下滑修改曝光值, 默认YES | 18 | | focusImage | 聚焦点图片, 如果需要设置的赋值, 否则使用默认 | 19 | 20 | # 方法 21 | ```swift 22 | 23 | /** 24 | 初始化 25 | @param frame 坐标 26 | @param mode 相机模式 27 | @param position 摄像头方向 28 | */ 29 | - (instancetype)initWithFrame:(CGRect)frame 30 | cameraMode:(WKCFansyCameraMode)mode 31 | position:(AVCaptureDevicePosition)position; 32 | 33 | /** 34 | 开始捕捉 35 | */ 36 | - (void)startCapture; 37 | 38 | /** 39 | 停止捕捉 40 | */ 41 | - (void)stopCapture; 42 | 43 | /** 44 | 开始拍摄(WKCFansyCameraModeImageAndVideo模式有效) 45 | */ 46 | - (void)startRecord; 47 | 48 | /** 49 | 停止拍摄(WKCFansyCameraModeImageAndVideo模式有效) 50 | */ 51 | - (void)stopRecord; 52 | 53 | /** 54 | 点击拍照 55 | */ 56 | - (void)takePhoto; 57 | 58 | /** 59 | 转换摄像头 60 | */ 61 | - (void)switchCamera; 62 | 63 | /** 64 | 切换闪光灯 65 | */ 66 | - (void)switchFlash; 67 | 68 | /** 69 | 重置坐标 70 | 重置时有动画, 并且有蒙层过度坐标转换 71 | */ 72 | - (void)resetCameraFrame:(CGRect)frame; 73 | 74 | 75 | ``` 76 | -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Demo/Demo/Category/UIDevice+Common.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+Common.h 3 | // abab 4 | // 5 | // Created by 魏昆超 on 2019/2/18. 6 | // Copyright © 2019 SecretLisa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | #pragma mark -通用部分 13 | @interface UIDevice (Common) 14 | 15 | @property (class, nonatomic, copy, readonly) NSString * appVersion; 16 | @property (class, nonatomic, copy, readonly) NSString * appName; 17 | @property (class, nonatomic, copy, readonly) NSString * appBuild; 18 | 19 | @property (class, nonatomic, copy, readonly) NSString * genarateUuidString; 20 | @property (class, nonatomic, copy, readonly) NSString * idfaString; 21 | @property (class, nonatomic, copy, readonly) NSString * deviceUUID; 22 | @property (class, nonatomic, copy, readonly) NSString * anonymousUserId; 23 | @property (class, nonatomic, copy, readonly) NSString * deviceId; 24 | 25 | @end 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | #pragma mark -UI 34 | @interface UIDevice (UI) 35 | 36 | @property (class, nonatomic, assign, readonly) BOOL is5OrSE; 37 | @property (class, nonatomic, assign, readonly) BOOL is6; 38 | @property (class, nonatomic, assign, readonly) BOOL is6P; 39 | @property (class, nonatomic, assign, readonly) BOOL isPad; 40 | @property (class, nonatomic, assign, readonly) BOOL isX; 41 | 42 | @property (class, nonatomic, assign, readonly) CGFloat XTopSpace; 43 | @property (class, nonatomic, assign, readonly) CGFloat XBottomSpace; 44 | @property (class, nonatomic, assign, readonly) CGFloat statusBarHeight; 45 | @property (class, nonatomic, assign, readonly) CGFloat tabBarHeight; 46 | @property (class, nonatomic, assign, readonly) CGFloat navigationBarHeight; 47 | @property (class, nonatomic, assign, readonly) CGFloat navigationHeight; 48 | 49 | @end 50 | 51 | 52 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDRingIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUD-Defines.h" 10 | #import "JGProgressHUDIndicatorView.h" 11 | 12 | /** 13 | A ring shaped determinate progress indicator. 14 | */ 15 | @interface JGProgressHUDRingIndicatorView : JGProgressHUDIndicatorView 16 | 17 | /** 18 | Initializes the indicator view and sets the correct color to match the HUD style. 19 | */ 20 | - (instancetype __nonnull)initWithHUDStyle:(JGProgressHUDStyle)style __attribute((deprecated(("This initializer is no longer needed. Use the init initializer method.")))); 21 | 22 | /** 23 | Background color of the ring. 24 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 25 | 26 | @b Default: Black for JGProgressHUDStyleDark, light gray otherwise. 27 | */ 28 | @property (nonatomic, strong, nonnull) UIColor *ringBackgroundColor; 29 | 30 | /** 31 | Progress color of the progress ring. 32 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 33 | 34 | @b Default: White for JGProgressHUDStyleDark, otherwise black. 35 | */ 36 | @property (nonatomic, strong, nonnull) UIColor *ringColor; 37 | 38 | /** 39 | Sets if the progress ring should have a rounded line cap. 40 | 41 | @b Default: NO. 42 | */ 43 | @property (nonatomic, assign) BOOL roundProgressLine; 44 | 45 | /** 46 | Width of the ring. 47 | 48 | @b Default: 3.0. 49 | */ 50 | @property (nonatomic, assign) CGFloat ringWidth; 51 | 52 | @end 53 | 54 | -------------------------------------------------------------------------------- /Demo/Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | NSCameraUsageDescription 45 | 需要相机权限 46 | NSMicrophoneUsageDescription 47 | 需要麦克风权限 48 | 49 | 50 | -------------------------------------------------------------------------------- /Demo/Demo/View/WKCWeakProxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // WKCWeakProxy.m 3 | // ABC 4 | // 5 | // Created by wkcloveYang on 2019/8/8. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import "WKCWeakProxy.h" 10 | 11 | @implementation WKCWeakProxy 12 | 13 | - (instancetype)initWithTarget:(id)target { 14 | _target = target; 15 | return self; 16 | } 17 | 18 | + (instancetype)proxyWithTarget:(id)target { 19 | return [[WKCWeakProxy alloc] initWithTarget:target]; 20 | } 21 | 22 | - (id)forwardingTargetForSelector:(SEL)selector { 23 | return _target; 24 | } 25 | 26 | - (void)forwardInvocation:(NSInvocation *)invocation { 27 | void *null = NULL; 28 | [invocation setReturnValue:&null]; 29 | } 30 | 31 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { 32 | return [NSObject instanceMethodSignatureForSelector:@selector(init)]; 33 | } 34 | 35 | - (BOOL)respondsToSelector:(SEL)aSelector { 36 | return [_target respondsToSelector:aSelector]; 37 | } 38 | 39 | - (BOOL)isEqual:(id)object { 40 | return [_target isEqual:object]; 41 | } 42 | 43 | - (NSUInteger)hash { 44 | return [_target hash]; 45 | } 46 | 47 | - (Class)superclass { 48 | return [_target superclass]; 49 | } 50 | 51 | - (Class)class { 52 | return [_target class]; 53 | } 54 | 55 | - (BOOL)isKindOfClass:(Class)aClass { 56 | return [_target isKindOfClass:aClass]; 57 | } 58 | 59 | - (BOOL)isMemberOfClass:(Class)aClass { 60 | return [_target isMemberOfClass:aClass]; 61 | } 62 | 63 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol { 64 | return [_target conformsToProtocol:aProtocol]; 65 | } 66 | 67 | - (BOOL)isProxy { 68 | return YES; 69 | } 70 | 71 | - (NSString *)description { 72 | return [_target description]; 73 | } 74 | 75 | - (NSString *)debugDescription { 76 | return [_target debugDescription]; 77 | } 78 | 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WKCFansyCameraView 2 | 自定义相机视图 3 | 4 | 5 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/WKCFansyCameraView?style=flat)](https://cocoapods.org/pods/WKCFansyCameraView) [![License: MIT](https://img.shields.io/cocoapods/l/WKCFansyCameraView?style=flat)](http://opensource.org/licenses/MIT) 6 | 7 | # 属性 8 | | 属性 | 含义 | 9 | | ---- | ---- | 10 | | delegate | 代理 | 11 | | premissionDeniedHandle | 权限没开时回调 | 12 | | flashMode | 闪光灯模式 | 13 | | position | 摄像头位置 | 14 | | captureOrientation | 捕捉方向 | 15 | | shouldScaleEnable | 是否捏合缩放,默认NO | 16 | | shouldFocusEnable | 是否点击为聚焦点, 默认YES | 17 | | shouldExposureEnable | 是否上下滑修改曝光值, 默认YES | 18 | | focusImage | 聚焦点图片, 如果需要设置的赋值, 否则使用默认 | 19 | 20 | # 方法 21 | ```swift 22 | 23 | /** 24 | 初始化 25 | @param frame 坐标 26 | @param mode 相机模式 27 | @param position 摄像头方向 28 | */ 29 | - (instancetype)initWithFrame:(CGRect)frame 30 | cameraMode:(WKCFansyCameraMode)mode 31 | position:(AVCaptureDevicePosition)position; 32 | 33 | /** 34 | 开始捕捉 35 | */ 36 | - (void)startCapture; 37 | 38 | /** 39 | 停止捕捉 40 | */ 41 | - (void)stopCapture; 42 | 43 | /** 44 | 开始拍摄(WKCFansyCameraModeImageAndVideo模式有效) 45 | */ 46 | - (void)startRecord; 47 | 48 | /** 49 | 停止拍摄(WKCFansyCameraModeImageAndVideo模式有效) 50 | */ 51 | - (void)stopRecord; 52 | 53 | /** 54 | 点击拍照 55 | */ 56 | - (void)takePhoto; 57 | 58 | /** 59 | 转换摄像头 60 | */ 61 | - (void)switchCamera; 62 | 63 | /** 64 | 切换闪光灯 65 | */ 66 | - (void)switchFlash; 67 | 68 | /** 69 | 重置坐标 70 | 重置时有动画, 并且有蒙层过度坐标转换 71 | */ 72 | - (void)resetCameraFrame:(CGRect)frame; 73 | 74 | 75 | ``` 76 | 77 | [swift](https://github.com/WKCLoveYang/WKCCoolCameraView) 78 | 79 | ![Alt text](https://github.com/WKCLoveYang/WKCFansyCameraView/raw/master/Source/photo.png). 80 | 81 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /WKCFansyCameraView/WKCFansyCameraRecordEncoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCFansyCameraRecordEncoder.h 3 | // WKCFansyCameraDemo 4 | // 5 | // Created by 魏昆超 on 2019/2/20. 6 | // Copyright © 2019 SecretLisa. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | /** 12 | 写入并编码视频的类 13 | */ 14 | @interface WKCFansyCameraRecordEncoder : NSObject 15 | 16 | @property (nonatomic, readonly) NSString *path; 17 | @property (nonatomic, strong) AVAssetWriter *writer;//媒体写入对象 18 | 19 | /** 20 | * WKCFansyCameraRecordEncoder遍历构造器的 21 | * 22 | * @param path 媒体存发路径 23 | * @param cy 视频分辨率的高 24 | * @param cx 视频分辨率的宽 25 | * @param ch 音频通道 26 | * @param rate 音频的采样比率 27 | * 28 | * @return WKCFansyCameraRecordEncoder的实体 29 | */ 30 | + (WKCFansyCameraRecordEncoder *)encoderForPath:(NSString*)path 31 | Height:(NSInteger)cy 32 | width:(NSInteger)cx 33 | channels:(int)ch 34 | samples:(Float64)rate; 35 | 36 | /** 37 | * 初始化方法 38 | * 39 | * @param path 媒体存发路径 40 | * @param cy 视频分辨率的高 41 | * @param cx 视频分辨率的宽 42 | * @param ch 音频通道 43 | * @param rate 音频的采样率 44 | * 45 | * @return WCLRecordEncoder的实体 46 | */ 47 | - (instancetype)initPath:(NSString*)path 48 | Height:(NSInteger)cy 49 | width:(NSInteger)cx 50 | channels:(int)ch 51 | samples:(Float64)rate; 52 | 53 | /** 54 | * 完成视频录制时调用 55 | * 56 | * @param handler 完成的回掉block 57 | */ 58 | - (void)finishWithCompletionHandler:(void (^)(void))handler; 59 | 60 | /** 61 | * 通过这个方法写入数据 62 | * 63 | * @param sampleBuffer 写入的数据 64 | * @param isRecord 是否写入的是视频 65 | * 66 | * @return 写入是否成功 67 | */ 68 | - (BOOL)encodeFrame:(CMSampleBufferRef)sampleBuffer 69 | pixelBuffer:(CVPixelBufferRef)buffer 70 | isRecord:(BOOL)isRecord; 71 | 72 | - (void)initAudioInputChannels:(int)ch 73 | samples:(Float64)rate; 74 | 75 | @end 76 | 77 | -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraRecordEncoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCFansyCameraRecordEncoder.h 3 | // WKCFansyCameraDemo 4 | // 5 | // Created by 魏昆超 on 2019/2/20. 6 | // Copyright © 2019 SecretLisa. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | /** 12 | 写入并编码视频的类 13 | */ 14 | @interface WKCFansyCameraRecordEncoder : NSObject 15 | 16 | @property (nonatomic, readonly) NSString *path; 17 | @property (nonatomic, strong) AVAssetWriter *writer;//媒体写入对象 18 | 19 | /** 20 | * WKCFansyCameraRecordEncoder遍历构造器的 21 | * 22 | * @param path 媒体存发路径 23 | * @param cy 视频分辨率的高 24 | * @param cx 视频分辨率的宽 25 | * @param ch 音频通道 26 | * @param rate 音频的采样比率 27 | * 28 | * @return WKCFansyCameraRecordEncoder的实体 29 | */ 30 | + (WKCFansyCameraRecordEncoder *)encoderForPath:(NSString*)path 31 | Height:(NSInteger)cy 32 | width:(NSInteger)cx 33 | channels:(int)ch 34 | samples:(Float64)rate; 35 | 36 | /** 37 | * 初始化方法 38 | * 39 | * @param path 媒体存发路径 40 | * @param cy 视频分辨率的高 41 | * @param cx 视频分辨率的宽 42 | * @param ch 音频通道 43 | * @param rate 音频的采样率 44 | * 45 | * @return WCLRecordEncoder的实体 46 | */ 47 | - (instancetype)initPath:(NSString*)path 48 | Height:(NSInteger)cy 49 | width:(NSInteger)cx 50 | channels:(int)ch 51 | samples:(Float64)rate; 52 | 53 | /** 54 | * 完成视频录制时调用 55 | * 56 | * @param handler 完成的回掉block 57 | */ 58 | - (void)finishWithCompletionHandler:(void (^)(void))handler; 59 | 60 | /** 61 | * 通过这个方法写入数据 62 | * 63 | * @param sampleBuffer 写入的数据 64 | * @param isRecord 是否写入的是视频 65 | * 66 | * @return 写入是否成功 67 | */ 68 | - (BOOL)encodeFrame:(CMSampleBufferRef)sampleBuffer 69 | pixelBuffer:(CVPixelBufferRef)buffer 70 | isRecord:(BOOL)isRecord; 71 | 72 | - (void)initAudioInputChannels:(int)ch 73 | samples:(Float64)rate; 74 | 75 | @end 76 | 77 | -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/26. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "JGProgressHUD-Defines.h" 12 | 13 | /** You may subclass this class to create a custom progress indicator view. */ 14 | @interface JGProgressHUDIndicatorView : UIView 15 | 16 | /** 17 | Designated initializer for this class. 18 | 19 | @param contentView The content view to place on the container view (the container is the JGProgressHUDIndicatorView). 20 | */ 21 | - (instancetype __nonnull)initWithContentView:(UIView *__nullable)contentView; 22 | 23 | /** Use this method to set up the indicator view to fit the HUD style and vibrancy setting. This method is called by @c JGProgressHUD when the indicator view is added to the HUD and when the HUD's @c vibrancyEnabled property changes. This method may be called multiple times with different values. The default implementation does nothing. */ 24 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled; 25 | 26 | /** Ranges from 0.0 to 1.0. */ 27 | @property (nonatomic, assign) float progress; 28 | 29 | /** 30 | Adjusts the current progress shown by the receiver, optionally animating the change. 31 | 32 | The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits. 33 | 34 | @param progress The new progress value. 35 | @param animated YES if the change should be animated, NO if the change should happen immediately. 36 | */ 37 | - (void)setProgress:(float)progress animated:(BOOL)animated; 38 | 39 | /** 40 | The content view which displays the progress. 41 | */ 42 | @property (nonatomic, strong, readonly, nullable) UIView *contentView; 43 | 44 | /** Schedules an accessibility update on the next run loop. */ 45 | - (void)setNeedsAccessibilityUpdate; 46 | 47 | /** 48 | Runs @c updateAccessibility immediately if an accessibility update has been scheduled (through @c setNeedsAccessibilityUpdate) but has not executed yet. 49 | */ 50 | - (void)updateAccessibilityIfNeeded; 51 | 52 | /** 53 | Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate. 54 | */ 55 | - (void)updateAccessibility; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD-Defines.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUD-Defines.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 28.04.15. 6 | // Copyright (c) 2015 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | Positions of the HUD. 13 | */ 14 | typedef NS_ENUM(NSUInteger, JGProgressHUDPosition) { 15 | /** Center position. */ 16 | JGProgressHUDPositionCenter = 0, 17 | /** Top left position. */ 18 | JGProgressHUDPositionTopLeft, 19 | /** Top center position. */ 20 | JGProgressHUDPositionTopCenter, 21 | /** Top right position. */ 22 | JGProgressHUDPositionTopRight, 23 | /** Center left position. */ 24 | JGProgressHUDPositionCenterLeft, 25 | /** Center right position. */ 26 | JGProgressHUDPositionCenterRight, 27 | /** Bottom left position. */ 28 | JGProgressHUDPositionBottomLeft, 29 | /** Bottom center position. */ 30 | JGProgressHUDPositionBottomCenter, 31 | /** Bottom right position. */ 32 | JGProgressHUDPositionBottomRight 33 | }; 34 | 35 | /** 36 | Appearance styles of the HUD. 37 | */ 38 | typedef NS_ENUM(NSUInteger, JGProgressHUDStyle) { 39 | /** Extra light HUD with dark elements. */ 40 | JGProgressHUDStyleExtraLight = 0, 41 | /** Light HUD with dark elemets. */ 42 | JGProgressHUDStyleLight, 43 | /** Dark HUD with light elements. */ 44 | JGProgressHUDStyleDark 45 | }; 46 | 47 | #if TARGET_OS_IOS 48 | /** 49 | Interaction types. 50 | */ 51 | typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { 52 | /** Block all touches. No interaction behin the HUD is possible. */ 53 | JGProgressHUDInteractionTypeBlockAllTouches = 0, 54 | /** Block touches on the HUD view. */ 55 | JGProgressHUDInteractionTypeBlockTouchesOnHUDView, 56 | /** Block no touches. */ 57 | JGProgressHUDInteractionTypeBlockNoTouches 58 | }; 59 | #endif 60 | 61 | /** 62 | Parallax Modes. 63 | */ 64 | typedef NS_ENUM(NSUInteger, JGProgressHUDParallaxMode) { 65 | /** Follows the device setting for parallax. If "Reduce Motion" is enabled, no parallax effect is added to the HUD, if "Reduce Motion" is disabled the HUD will have a parallax effect. This behaviour is only supported on iOS 8 and higher. */ 66 | JGProgressHUDParallaxModeDevice = 0, 67 | /** Always adds a parallax effect to the HUD. Parallax is only supported on iOS 7 and higher. */ 68 | JGProgressHUDParallaxModeAlwaysOn, 69 | /** Never adds a parallax effect to the HUD. */ 70 | JGProgressHUDParallaxModeAlwaysOff 71 | }; 72 | 73 | #ifndef fequal 74 | /** 75 | Macro for safe floating point comparison (for internal use in JGProgressHUD). 76 | */ 77 | #define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON) 78 | #endif 79 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDIndicatorView.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @interface JGProgressHUDIndicatorView () { 13 | BOOL _accessibilityUpdateScheduled; 14 | } 15 | 16 | + (void)runBlock:(void (^)(void))block; 17 | 18 | @end 19 | 20 | static void runOnNextRunLoop(void (^block)(void)) { 21 | [[NSRunLoop currentRunLoop] performSelector:@selector(runBlock:) target:[JGProgressHUDIndicatorView class] argument:(id)block order:0 modes:@[NSRunLoopCommonModes]]; 22 | } 23 | 24 | @implementation JGProgressHUDIndicatorView 25 | 26 | #pragma mark - Initializers 27 | 28 | - (instancetype)initWithFrame:(CGRect __unused)frame { 29 | return [self init]; 30 | } 31 | 32 | - (instancetype)init { 33 | return [self initWithContentView:nil]; 34 | } 35 | 36 | - (instancetype)initWithContentView:(UIView *)contentView { 37 | self = [super initWithFrame:(contentView ? contentView.frame : CGRectMake(0.0, 0.0, 50.0, 50.0))]; 38 | if (self) { 39 | self.opaque = NO; 40 | self.backgroundColor = [UIColor clearColor]; 41 | 42 | self.isAccessibilityElement = YES; 43 | [self setNeedsAccessibilityUpdate]; 44 | 45 | if (contentView) { 46 | _contentView = contentView; 47 | 48 | [self addSubview:self.contentView]; 49 | } 50 | } 51 | return self; 52 | } 53 | 54 | #pragma mark - Setup 55 | 56 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled {} 57 | 58 | #pragma mark - Accessibility 59 | 60 | + (void)runBlock:(void (^)(void))block { 61 | if (block != nil) { 62 | block(); 63 | } 64 | } 65 | 66 | - (void)setNeedsAccessibilityUpdate { 67 | if (!_accessibilityUpdateScheduled) { 68 | _accessibilityUpdateScheduled = YES; 69 | 70 | runOnNextRunLoop(^{ 71 | [self updateAccessibilityIfNeeded]; 72 | }); 73 | } 74 | } 75 | 76 | - (void)updateAccessibilityIfNeeded { 77 | if (_accessibilityUpdateScheduled) { 78 | [self updateAccessibility]; 79 | _accessibilityUpdateScheduled = NO; 80 | } 81 | } 82 | 83 | - (void)updateAccessibility { 84 | self.accessibilityLabel = [NSLocalizedString(@"Loading",) stringByAppendingFormat:@" %.f %%", self.progress]; 85 | } 86 | 87 | #pragma mark - Getters & Setters 88 | 89 | - (void)setProgress:(float)progress { 90 | [self setProgress:progress animated:NO]; 91 | } 92 | 93 | - (void)setProgress:(float)progress animated:(__unused BOOL)animated { 94 | if (fequal(self.progress, progress)) { 95 | return; 96 | } 97 | 98 | _progress = progress; 99 | 100 | [self setNeedsAccessibilityUpdate]; 101 | } 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | typedef NS_ENUM(NSUInteger, MASAxisType) { 14 | MASAxisTypeHorizontal, 15 | MASAxisTypeVertical 16 | }; 17 | 18 | @interface NSArray (MASAdditions) 19 | 20 | /** 21 | * Creates a MASConstraintMaker with each view in the callee. 22 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 23 | * 24 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 25 | * 26 | * @return Array of created MASConstraints 27 | */ 28 | - (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 29 | 30 | /** 31 | * Creates a MASConstraintMaker with each view in the callee. 32 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 33 | * If an existing constraint exists then it will be updated instead. 34 | * 35 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 36 | * 37 | * @return Array of created/updated MASConstraints 38 | */ 39 | - (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 40 | 41 | /** 42 | * Creates a MASConstraintMaker with each view in the callee. 43 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 44 | * All constraints previously installed for the views will be removed. 45 | * 46 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 47 | * 48 | * @return Array of created/updated MASConstraints 49 | */ 50 | - (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; 51 | 52 | /** 53 | * distribute with fixed spacing 54 | * 55 | * @param axisType which axis to distribute items along 56 | * @param fixedSpacing the spacing between each item 57 | * @param leadSpacing the spacing before the first item and the container 58 | * @param tailSpacing the spacing after the last item and the container 59 | */ 60 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 61 | 62 | /** 63 | * distribute with fixed item size 64 | * 65 | * @param axisType which axis to distribute items along 66 | * @param fixedItemLength the fixed length of each item 67 | * @param leadSpacing the spacing before the first item and the container 68 | * @param tailSpacing the spacing after the last item and the container 69 | */ 70 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /WKCFansyCameraView/WKCFansyCameraView.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCFansyCameraView.h 3 | // BBC 4 | // 5 | // Created by wkcloveYang on 2019/8/23. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class WKCFansyCameraView; 13 | 14 | @protocol WKCFansyCameraViewDelegate 15 | 16 | @optional 17 | /// 相机采集流 18 | /// @param fansyCamera camera 19 | /// @param sampleBuffer 流 20 | - (void)fansyCamera:(WKCFansyCameraView *)fansyCamera didOutputVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; 21 | 22 | /// 拍照回调 23 | /// @param fansyCamera camera 24 | /// @param photo 照片 25 | - (void)fansyCamera:(WKCFansyCameraView *)fansyCamera didTakePhoto:(UIImage *)photo; 26 | 27 | /// 录像 28 | /// @param fansyCamera camera 29 | /// @param videoPath 视频缓存地址 30 | - (void)fansyCamera:(WKCFansyCameraView *)fansyCamera didTakeVideo:(NSString *)videoPath; 31 | 32 | @end 33 | 34 | /** 35 | 相机模式 36 | @enum WKCFansyCameraModeImage 拍照 37 | @enum WKCFansyCameraModeImageAndVideo 拍照和拍视频 38 | */ 39 | typedef NS_ENUM(NSInteger, WKCFansyCameraMode) { 40 | WKCFansyCameraModeImage = 0, 41 | WKCFansyCameraModeImageAndVideo = 1 42 | }; 43 | 44 | typedef void(^WKCFansyCameraBlock)(void); 45 | 46 | // 1.初始化时会自动请求相机权限, 同意权限后自动开始捕捉画面 47 | // 2.如果需要没开权限时做一些处理, 可以使用premissionDeniedHandle回调 48 | // 3.Info.plist需要填入 Privacy - Camera Usage Description键 49 | // 4.如果使用拍视频,还需 Privacy - Microphone Usage Description 键 50 | 51 | @interface WKCFansyCameraView : UIView 52 | 53 | /// 代理 54 | @property (nonatomic, weak) id delegate; 55 | 56 | /// 权限没开时回调 57 | @property (nonatomic, copy) WKCFansyCameraBlock premissionDeniedHandle; 58 | 59 | /// 闪光灯模式 60 | @property (nonatomic, assign, readonly) AVCaptureTorchMode flashMode; 61 | 62 | /// 摄像头位置 63 | @property (nonatomic, assign, readonly) AVCaptureDevicePosition position; 64 | 65 | /// 捕捉方向 66 | @property (nonatomic, assign) AVCaptureVideoOrientation captureOrientation; 67 | 68 | /// 是否捏合缩放,默认NO 69 | @property (nonatomic, assign) BOOL shouldScaleEnable; 70 | 71 | /// 是否点击为聚焦点, 默认YES 72 | @property (nonatomic, assign) BOOL shouldFocusEnable; 73 | 74 | /// 是否上下滑修改曝光值, 默认YES 75 | @property (nonatomic, assign) BOOL shouldExposureEnable; 76 | 77 | 78 | /// 聚焦点图片, 如果需要设置的赋值, 否则使用默认 79 | @property (nonatomic, strong) UIImage * focusImage; 80 | 81 | /// 初始化 82 | /// @param frame 坐标 83 | /// @param mode 相机模式 84 | /// @param position 摄像头方向 85 | - (instancetype)initWithFrame:(CGRect)frame 86 | cameraMode:(WKCFansyCameraMode)mode 87 | position:(AVCaptureDevicePosition)position; 88 | 89 | /// 开始捕捉 90 | - (void)startCapture; 91 | 92 | /// 停止捕捉 93 | - (void)stopCapture; 94 | 95 | /// 开始拍摄(WKCFansyCameraModeImageAndVideo模式有效) 96 | - (void)startRecord; 97 | 98 | /// 停止拍摄(WKCFansyCameraModeImageAndVideo模式有效) 99 | - (void)stopRecord; 100 | 101 | /// 点击拍照 102 | - (void)takePhoto; 103 | 104 | /// 转换摄像头 105 | - (void)switchCamera; 106 | 107 | /// 切换闪光灯 108 | - (void)switchFlash; 109 | 110 | /// 重置坐标. 重置时有动画, 并且有蒙层过度坐标转换 111 | - (void)resetCameraFrame:(CGRect)frame; 112 | 113 | 114 | @end 115 | 116 | -------------------------------------------------------------------------------- /WKCFansyCameraView/WKCFansyCameraLightView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FaceSDKLittleCameraLightView.m 3 | // PhotoFace 4 | // 5 | // Created by wkcloveYang on 2019/7/13. 6 | // Copyright © 2019 PhotoFace. All rights reserved. 7 | // 8 | 9 | #import "WKCFansyCameraLightView.h" 10 | 11 | @interface WKCFansyCameraLightView() 12 | 13 | @property (nonatomic, strong) UIView * upView; 14 | @property (nonatomic, strong) UIView * downView; 15 | @property (nonatomic, strong) UIImageView * iconImageView; 16 | 17 | @end 18 | 19 | @implementation WKCFansyCameraLightView 20 | 21 | + (CGSize)itemSize 22 | { 23 | return CGSizeMake(27, 145); 24 | } 25 | 26 | - (instancetype)initWithFrame:(CGRect)frame 27 | { 28 | if (self = [super initWithFrame:frame]) { 29 | 30 | self.layer.opacity = 0.0; 31 | 32 | [self setupSubviews]; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | - (void)setupSubviews 39 | { 40 | [self addSubview:self.upView]; 41 | [self addSubview:self.downView]; 42 | [self addSubview:self.iconImageView]; 43 | } 44 | 45 | #pragma mark - Proeprty 46 | - (UIView *)upView 47 | { 48 | if (!_upView) { 49 | _upView = [[UIView alloc] initWithFrame:CGRectMake(12, 0, 3, self.maxProgressHeight * 0.5)]; 50 | _upView.backgroundColor = UIColor.whiteColor; 51 | _upView.layer.cornerRadius = 1.5; 52 | _upView.layer.masksToBounds = YES; 53 | } 54 | 55 | return _upView; 56 | } 57 | 58 | - (UIView *)downView 59 | { 60 | if (!_downView) { 61 | _downView = [[UIView alloc] initWithFrame:CGRectMake(12, CGRectGetMaxY(self.iconImageView.frame) + 6, 3, self.maxProgressHeight * 0.5)]; 62 | _downView.backgroundColor = UIColor.whiteColor; 63 | _downView.layer.cornerRadius = 1.5; 64 | _downView.layer.masksToBounds = YES; 65 | } 66 | 67 | return _downView; 68 | } 69 | 70 | - (UIImageView *)iconImageView 71 | { 72 | if (!_iconImageView) { 73 | _iconImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"camera_light"]]; 74 | _iconImageView.frame = CGRectMake(0, CGRectGetMaxY(self.upView.frame) + 6, 27, 27); 75 | } 76 | 77 | return _iconImageView; 78 | } 79 | 80 | 81 | - (void)setProgress:(CGFloat)progress 82 | { 83 | _progress = progress; 84 | 85 | self.layer.opacity = 1.0; 86 | 87 | self.upView.frame = [self upFrameWithProgress:progress]; 88 | self.iconImageView.frame = [self iconFrame]; 89 | self.downView.frame = [self downFrame]; 90 | } 91 | 92 | 93 | // progress为1时最大高度 94 | - (CGFloat)maxProgressHeight 95 | { 96 | return WKCFansyCameraLightView.itemSize.height - 27 - 12; 97 | } 98 | 99 | - (CGRect)upFrameWithProgress:(CGFloat)progress 100 | { 101 | CGFloat x = 12, y = 0, width = 3, height = self.maxProgressHeight * progress; 102 | return CGRectMake(x, y, width, height); 103 | } 104 | 105 | - (CGRect)iconFrame 106 | { 107 | return CGRectMake(0, CGRectGetMaxY(self.upView.frame) + 6, 27, 27); 108 | } 109 | 110 | - (CGRect)downFrame 111 | { 112 | CGFloat x = 12, y = CGRectGetMaxY(self.iconImageView.frame) + 6, width = 3, height = WKCFansyCameraLightView.itemSize.height - y; 113 | return CGRectMake(x, y, width, height); 114 | } 115 | 116 | @end 117 | -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraLightView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FaceSDKLittleCameraLightView.m 3 | // PhotoFace 4 | // 5 | // Created by wkcloveYang on 2019/7/13. 6 | // Copyright © 2019 PhotoFace. All rights reserved. 7 | // 8 | 9 | #import "WKCFansyCameraLightView.h" 10 | 11 | @interface WKCFansyCameraLightView() 12 | 13 | @property (nonatomic, strong) UIView * upView; 14 | @property (nonatomic, strong) UIView * downView; 15 | @property (nonatomic, strong) UIImageView * iconImageView; 16 | 17 | @end 18 | 19 | @implementation WKCFansyCameraLightView 20 | 21 | + (CGSize)itemSize 22 | { 23 | return CGSizeMake(27, 145); 24 | } 25 | 26 | - (instancetype)initWithFrame:(CGRect)frame 27 | { 28 | if (self = [super initWithFrame:frame]) { 29 | 30 | self.layer.opacity = 0.0; 31 | 32 | [self setupSubviews]; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | - (void)setupSubviews 39 | { 40 | [self addSubview:self.upView]; 41 | [self addSubview:self.downView]; 42 | [self addSubview:self.iconImageView]; 43 | } 44 | 45 | #pragma mark - Proeprty 46 | - (UIView *)upView 47 | { 48 | if (!_upView) { 49 | _upView = [[UIView alloc] initWithFrame:CGRectMake(12, 0, 3, self.maxProgressHeight * 0.5)]; 50 | _upView.backgroundColor = UIColor.whiteColor; 51 | _upView.layer.cornerRadius = 1.5; 52 | _upView.layer.masksToBounds = YES; 53 | } 54 | 55 | return _upView; 56 | } 57 | 58 | - (UIView *)downView 59 | { 60 | if (!_downView) { 61 | _downView = [[UIView alloc] initWithFrame:CGRectMake(12, CGRectGetMaxY(self.iconImageView.frame) + 6, 3, self.maxProgressHeight * 0.5)]; 62 | _downView.backgroundColor = UIColor.whiteColor; 63 | _downView.layer.cornerRadius = 1.5; 64 | _downView.layer.masksToBounds = YES; 65 | } 66 | 67 | return _downView; 68 | } 69 | 70 | - (UIImageView *)iconImageView 71 | { 72 | if (!_iconImageView) { 73 | _iconImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"camera_light"]]; 74 | _iconImageView.frame = CGRectMake(0, CGRectGetMaxY(self.upView.frame) + 6, 27, 27); 75 | } 76 | 77 | return _iconImageView; 78 | } 79 | 80 | 81 | - (void)setProgress:(CGFloat)progress 82 | { 83 | _progress = progress; 84 | 85 | self.layer.opacity = 1.0; 86 | 87 | self.upView.frame = [self upFrameWithProgress:progress]; 88 | self.iconImageView.frame = [self iconFrame]; 89 | self.downView.frame = [self downFrame]; 90 | } 91 | 92 | 93 | // progress为1时最大高度 94 | - (CGFloat)maxProgressHeight 95 | { 96 | return WKCFansyCameraLightView.itemSize.height - 27 - 12; 97 | } 98 | 99 | - (CGRect)upFrameWithProgress:(CGFloat)progress 100 | { 101 | CGFloat x = 12, y = 0, width = 3, height = self.maxProgressHeight * progress; 102 | return CGRectMake(x, y, width, height); 103 | } 104 | 105 | - (CGRect)iconFrame 106 | { 107 | return CGRectMake(0, CGRectGetMaxY(self.upView.frame) + 6, 27, 27); 108 | } 109 | 110 | - (CGRect)downFrame 111 | { 112 | CGFloat x = 12, y = CGRectGetMaxY(self.iconImageView.frame) + 6, width = 3, height = WKCFansyCameraLightView.itemSize.height - y; 113 | return CGRectMake(x, y, width, height); 114 | } 115 | 116 | @end 117 | -------------------------------------------------------------------------------- /Demo/Demo/View/WKCCircleProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // WKCCircleProgressView.m 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/27. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import "WKCCircleProgressView.h" 10 | 11 | #define WIDTH self.frame.size.width 12 | #define HEIGHT self.frame.size.height 13 | 14 | @implementation WKCCircleProgressView 15 | 16 | - (instancetype)initWithFrame:(CGRect)frame 17 | { 18 | if([super initWithFrame:frame]) { 19 | [self initData]; 20 | } 21 | 22 | return self; 23 | } 24 | 25 | - (instancetype)init 26 | { 27 | if([super init]) { 28 | [self initData]; 29 | } 30 | 31 | return self; 32 | } 33 | 34 | - (instancetype)initWithCoder:(NSCoder *)aDecoder 35 | { 36 | if([super initWithCoder:aDecoder]) { 37 | [self initData]; 38 | } 39 | 40 | return self; 41 | } 42 | 43 | /** 初始化数据*/ 44 | - (void)initData 45 | { 46 | self.backgroundColor = [UIColor clearColor]; 47 | self.progressWidth = 5.0; 48 | self.progressColor = [UIColor redColor]; 49 | self.progressBackgroundColor = [UIColor whiteColor]; 50 | self.percent = 0.0; 51 | self.clockwise = 0; 52 | 53 | self.labelbackgroundColor = [UIColor clearColor]; 54 | self.textColor = [UIColor blackColor]; 55 | self.textFont = [UIFont systemFontOfSize:15]; 56 | } 57 | 58 | - (void)layoutSubviews 59 | { 60 | [super addSubview:self.centerLabel]; 61 | self.centerLabel.backgroundColor = self.labelbackgroundColor; 62 | self.centerLabel.textColor = self.textColor; 63 | self.centerLabel.font = self.textFont; 64 | [self addSubview:self.centerLabel]; 65 | } 66 | 67 | #pragma mark -- 画进度条 68 | 69 | - (void)drawRect:(CGRect)rect 70 | { 71 | //获取当前画布 72 | CGContextRef context = UIGraphicsGetCurrentContext(); 73 | 74 | CGContextSetShouldAntialias(context, YES); 75 | CGContextAddArc(context, WIDTH/2, HEIGHT/2, (WIDTH-self.progressWidth)/2, 0, M_PI*2, 0); 76 | [self.progressBackgroundColor setStroke];//设置圆描边背景的颜色 77 | //画线的宽度 78 | CGContextSetLineWidth(context, self.progressWidth); 79 | //绘制路径 80 | CGContextStrokePath(context); 81 | 82 | if(self.percent) 83 | { 84 | CGFloat angle = 2 * self.percent * M_PI - M_PI_2; 85 | if(self.clockwise) {//反方向 86 | CGContextAddArc(context, WIDTH/2, HEIGHT/2, (WIDTH-self.progressWidth)/2, ((int)self.percent == 1 ? -M_PI_2 : angle), -M_PI_2, 0); 87 | } 88 | else {//正方向 89 | CGContextAddArc(context, WIDTH/2, HEIGHT/2, (WIDTH-self.progressWidth)/2, -M_PI_2, angle, 0); 90 | } 91 | [self.progressColor setStroke];//设置圆描边的颜色 92 | CGContextSetLineWidth(context, self.progressWidth); 93 | CGContextStrokePath(context); 94 | } 95 | } 96 | 97 | - (void)setPercent:(float)percent 98 | { 99 | if(self.percent < 0) return; 100 | 101 | _percent = percent; 102 | 103 | [self setNeedsDisplay]; 104 | } 105 | 106 | - (UILabel *)centerLabel 107 | { 108 | if(!_centerLabel) 109 | { 110 | _centerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT/2)]; 111 | _centerLabel.center = CGPointMake(WIDTH/2, HEIGHT/2); 112 | _centerLabel.textAlignment = NSTextAlignmentCenter; 113 | } 114 | return _centerLabel; 115 | } 116 | 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeZoomAnimation.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDFadeZoomAnimation.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @implementation JGProgressHUDFadeZoomAnimation 13 | 14 | #pragma mark - Initializers 15 | 16 | - (instancetype)init { 17 | self = [super init]; 18 | if (self) { 19 | self.shrinkAnimationDuaration = 0.2; 20 | self.expandAnimationDuaration = 0.1; 21 | self.expandScale = CGSizeMake(1.1, 1.1); 22 | } 23 | return self; 24 | } 25 | 26 | #pragma mark - Showing 27 | 28 | - (void)show { 29 | [super show]; 30 | 31 | self.progressHUD.alpha = 0.0; 32 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(0.1, 0.1); 33 | 34 | NSTimeInterval totalDuration = self.expandAnimationDuaration+self.shrinkAnimationDuaration; 35 | 36 | self.progressHUD.hidden = NO; 37 | 38 | [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ 39 | self.progressHUD.alpha = 1.0; 40 | } completion:nil]; 41 | 42 | [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 43 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(self.expandScale.width, self.expandScale.height); 44 | } completion:^(BOOL __unused _finished) { 45 | [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 46 | self.progressHUD.HUDView.transform = CGAffineTransformIdentity; 47 | } completion:^(BOOL __unused __finished) { 48 | [self animationFinished]; 49 | }]; 50 | }]; 51 | } 52 | 53 | #pragma mark - Hiding 54 | 55 | - (void)hide { 56 | [super hide]; 57 | 58 | NSTimeInterval totalDuration = self.expandAnimationDuaration+self.shrinkAnimationDuaration; 59 | 60 | [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ 61 | self.progressHUD.alpha = 0.0; 62 | } completion:nil]; 63 | 64 | [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 65 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(self.expandScale.width, self.expandScale.height); 66 | } completion:^(BOOL __unused _finished) { 67 | [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 68 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(0.1, 0.1); 69 | } completion:^(BOOL __unused __finished) { 70 | self.progressHUD.HUDView.transform = CGAffineTransformIdentity; 71 | 72 | [self animationFinished]; 73 | }]; 74 | }]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /Demo/Pods/WKCFansyCameraView/WKCFansyCameraView/WKCFansyCameraView.h: -------------------------------------------------------------------------------- 1 | // 2 | // WKCFansyCameraView.h 3 | // BBC 4 | // 5 | // Created by wkcloveYang on 2019/8/23. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class WKCFansyCameraView; 13 | 14 | @protocol WKCFansyCameraViewDelegate 15 | 16 | @optional 17 | /** 18 | 相机采集流 19 | @parma fansyCamera 当前对象 20 | @param sampleBuffer 流 21 | */ 22 | - (void)fansyCamera:(WKCFansyCameraView *)fansyCamera didOutputVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer; 23 | 24 | /** 25 | 拍照回调 26 | @param fansyCamera 当前对象 27 | @param photo 照片 28 | */ 29 | - (void)fansyCamera:(WKCFansyCameraView *)fansyCamera didTakePhoto:(UIImage *)photo; 30 | 31 | /** 32 | 拍视频 33 | @param fansyCamera 当前对象 34 | @param videoPath 视频缓存地址 35 | */ 36 | - (void)fansyCamera:(WKCFansyCameraView *)fansyCamera didTakeVideo:(NSString *)videoPath; 37 | 38 | @end 39 | 40 | /** 41 | 相机模式 42 | @enum WKCFansyCameraModeImage 拍照 43 | @enum WKCFansyCameraModeImageAndVideo 拍照和拍视频 44 | */ 45 | typedef NS_ENUM(NSInteger, WKCFansyCameraMode) { 46 | WKCFansyCameraModeImage = 0, 47 | WKCFansyCameraModeImageAndVideo = 1 48 | }; 49 | 50 | typedef void(^WKCFansyCameraBlock)(void); 51 | 52 | // 1.初始化时会自动请求相机权限, 同意权限后自动开始捕捉画面 53 | // 2.如果需要没开权限时做一些处理, 可以使用premissionDeniedHandle回调 54 | // 3.Info.plist需要填入 Privacy - Camera Usage Description键 55 | // 4.如果使用拍视频,还需 Privacy - Microphone Usage Description 键 56 | 57 | @interface WKCFansyCameraView : UIView 58 | 59 | /** 60 | 代理 61 | */ 62 | @property (nonatomic, weak) id delegate; 63 | 64 | /** 65 | 权限没开时回调 66 | */ 67 | @property (nonatomic, copy) WKCFansyCameraBlock premissionDeniedHandle; 68 | 69 | /** 70 | 闪光灯模式 71 | */ 72 | @property (nonatomic, assign, readonly) AVCaptureTorchMode flashMode; 73 | 74 | /** 75 | 摄像头位置 76 | */ 77 | @property (nonatomic, assign, readonly) AVCaptureDevicePosition position; 78 | 79 | /** 80 | 捕捉方向 81 | */ 82 | @property (nonatomic, assign) AVCaptureVideoOrientation captureOrientation; 83 | 84 | /** 85 | 是否捏合缩放,默认NO 86 | */ 87 | @property (nonatomic, assign) BOOL shouldScaleEnable; 88 | 89 | /** 90 | 是否点击为聚焦点, 默认YES 91 | */ 92 | @property (nonatomic, assign) BOOL shouldFocusEnable; 93 | 94 | /** 95 | 是否上下滑修改曝光值, 默认YES 96 | */ 97 | @property (nonatomic, assign) BOOL shouldExposureEnable; 98 | 99 | 100 | /** 101 | 聚焦点图片, 如果需要设置的赋值, 否则使用默认 102 | */ 103 | @property (nonatomic, strong) UIImage * focusImage; 104 | 105 | 106 | /** 107 | 初始化 108 | @param frame 坐标 109 | @param mode 相机模式 110 | @param position 摄像头方向 111 | */ 112 | - (instancetype)initWithFrame:(CGRect)frame 113 | cameraMode:(WKCFansyCameraMode)mode 114 | position:(AVCaptureDevicePosition)position; 115 | 116 | /** 117 | 开始捕捉 118 | */ 119 | - (void)startCapture; 120 | 121 | /** 122 | 停止捕捉 123 | */ 124 | - (void)stopCapture; 125 | 126 | /** 127 | 开始拍摄(WKCFansyCameraModeImageAndVideo模式有效) 128 | */ 129 | - (void)startRecord; 130 | 131 | /** 132 | 停止拍摄(WKCFansyCameraModeImageAndVideo模式有效) 133 | */ 134 | - (void)stopRecord; 135 | 136 | /** 137 | 点击拍照 138 | */ 139 | - (void)takePhoto; 140 | 141 | /** 142 | 转换摄像头 143 | */ 144 | - (void)switchCamera; 145 | 146 | /** 147 | 切换闪光灯 148 | */ 149 | - (void)switchFlash; 150 | 151 | /** 152 | 重置坐标 153 | 重置时有动画, 并且有蒙层过度坐标转换 154 | */ 155 | - (void)resetCameraFrame:(CGRect)frame; 156 | 157 | 158 | @end 159 | 160 | -------------------------------------------------------------------------------- /Demo/Demo/View/WKCFansyCameraPhotoButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // WKCFansyCameraPhotoButton.m 3 | // Demo 4 | // 5 | // Created by wkcloveYang on 2019/8/27. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import "WKCFansyCameraPhotoButton.h" 10 | #import 11 | #import "WKCCircleProgressView.h" 12 | #import "WKCWeakProxy.h" 13 | 14 | @interface WKCFansyCameraPhotoButton() 15 | { 16 | NSTimer * timer; 17 | NSInteger time; 18 | } 19 | 20 | @property (nonatomic, strong) UIView * contentView; 21 | @property (nonatomic, strong) WKCCircleProgressView * progressView; 22 | @property (nonatomic, strong) UILongPressGestureRecognizer *longPress; 23 | 24 | @end 25 | 26 | @implementation WKCFansyCameraPhotoButton 27 | 28 | - (instancetype)initWithFrame:(CGRect)frame 29 | { 30 | if (self = [super initWithFrame:frame]) { 31 | 32 | [self addSubview:self.contentView]; 33 | [self addSubview:self.progressView]; 34 | 35 | self.contentView.wkc_center = Equal(self); 36 | self.contentView.wkc_size = EqualSize(CGSizeMake(70, 70)); 37 | 38 | self.progressView.wkc_edge = Equal(self); 39 | 40 | [self.contentView wkc_makeLayout]; 41 | [self.progressView wkc_makeLayout]; 42 | 43 | self.userInteractionEnabled = YES; 44 | 45 | [self addGestureRecognizer:self.longPress]; 46 | 47 | } 48 | 49 | return self; 50 | } 51 | 52 | - (void)actionLongGesture:(UILongPressGestureRecognizer *)sender 53 | { 54 | if (sender.state == UIGestureRecognizerStateBegan) { 55 | timer = [NSTimer timerWithTimeInterval:0.1 target:[WKCWeakProxy proxyWithTarget:self] selector:@selector(updateTime) userInfo:nil repeats:YES]; 56 | [timer fire]; 57 | [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; 58 | } else if (sender.state == UIGestureRecognizerStateEnded) { 59 | if (timer) { 60 | if (time <= 3) { 61 | if (self.takePhotoBlock) { 62 | self.takePhotoBlock(); 63 | } 64 | } else { 65 | if (self.endRecordBlock) { 66 | self.endRecordBlock(); 67 | } 68 | } 69 | 70 | [timer invalidate]; 71 | timer = nil; 72 | time = 0; 73 | self.progressView.percent = 0; 74 | } 75 | } 76 | } 77 | 78 | - (void)updateTime 79 | { 80 | time ++; 81 | 82 | if (time - 4 >= 0) { 83 | if (time - 4 == 0) { 84 | if (self.startRecordBlock) { 85 | self.startRecordBlock(); 86 | } 87 | } 88 | self.progressView.percent += 0.01; 89 | } 90 | 91 | if (time - 4 >= 100) { 92 | if (self.endRecordBlock) { 93 | self.endRecordBlock(); 94 | } 95 | 96 | [timer invalidate]; 97 | timer = nil; 98 | time = 0; 99 | self.progressView.percent = 0; 100 | } 101 | } 102 | 103 | #pragma mark -Lazy 104 | - (UIView *)contentView 105 | { 106 | if (!_contentView) { 107 | _contentView = [[UIView alloc] init]; 108 | _contentView.backgroundColor = [UIColor whiteColor]; 109 | _contentView.layer.cornerRadius = 35; 110 | _contentView.layer.masksToBounds = YES; 111 | } 112 | 113 | return _contentView; 114 | } 115 | 116 | - (WKCCircleProgressView *)progressView 117 | { 118 | if (!_progressView) { 119 | _progressView = [[WKCCircleProgressView alloc] init]; 120 | } 121 | 122 | return _progressView; 123 | } 124 | 125 | - (UILongPressGestureRecognizer *)longPress 126 | { 127 | if (!_longPress) { 128 | _longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(actionLongGesture:)]; 129 | _longPress.minimumPressDuration = 0; 130 | } 131 | 132 | return _longPress; 133 | } 134 | 135 | @end 136 | -------------------------------------------------------------------------------- /Demo/Pods/UIVIewMasonryLayout/UIVIewMasonryLayout/UIViewLayoutItemMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewLayoutItemMaker.h 3 | // ABC 4 | // 5 | // Created by wkcloveYang on 2019/8/9. 6 | // Copyright © 2019 wkcloveYang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIViewLayoutItem.h" 11 | 12 | #define Equal(object) [UIViewLayoutItemMaker layoutEqualWithObject:object] 13 | #define Great(object) [UIViewLayoutItemMaker layoutGreatWithObject:object] 14 | #define Less(object) [UIViewLayoutItemMaker layoutLessWithObject:object] 15 | 16 | #define EqualOffset(object, offset) [UIViewLayoutItemMaker layoutEqualWithObject:object Offset:offset] 17 | #define GreatOffset(object, offset) [UIViewLayoutItemMaker layoutGreatWithObject:object Offset:offset] 18 | #define LessOffset(object, offset) [UIViewLayoutItemMaker layoutLessWithObject:object Offset:offset] 19 | 20 | #define EqualInsert(object, insert) [UIViewLayoutItemMaker layoutInsertEqualWithObject:object Insert:insert] 21 | #define GreatInsert(object, insert) [UIViewLayoutItemMaker layoutInsertGreatWithObject:object Insert:insert] 22 | #define LessInsert(object, insert) [UIViewLayoutItemMaker layoutInsertLessWithObject:object Insert:insert] 23 | 24 | #define EqualMutil(object, mutil) [UIViewLayoutItemMaker layoutMutilEqualWithObject:object Mutil:mutil] 25 | #define GreatMutil(object, mutil) [UIViewLayoutItemMaker layoutMutilGreatWithObject:object Mutil:mutil] 26 | #define LessMutil(object, mutil) [UIViewLayoutItemMaker layoutMutilLessWithObject:object Mutil:mutil] 27 | 28 | #define EqualSize(size) [UIViewLayoutItemMaker layoutSizeEqualWithSize:size] 29 | #define GreatSize(size) [UIViewLayoutItemMaker layoutSizeGreatWithSize:size] 30 | #define LessSize(size) [UIViewLayoutItemMaker layoutSizeLessWithSize:size] 31 | 32 | #define EqualValue(value) [UIViewLayoutItemMaker layoutValueEqualWithValue:value] 33 | #define GreatValue(value) [UIViewLayoutItemMaker layoutValueGreatWithValue:value] 34 | #define LessValue(value) [UIViewLayoutItemMaker layoutValueLessWithValue:value] 35 | 36 | 37 | @interface UIViewLayoutItemMaker : NSObject 38 | 39 | + (UIViewLayoutItem *)layoutEqualWithObject:(id)object; 40 | + (UIViewLayoutItem *)layoutGreatWithObject:(id)object; 41 | + (UIViewLayoutItem *)layoutLessWithObject:(id)object; 42 | 43 | + (UIViewLayoutItem *)layoutEqualWithObject:(id)object 44 | Offset:(CGFloat)offset; 45 | + (UIViewLayoutItem *)layoutGreatWithObject:(id)object 46 | Offset:(CGFloat)offset; 47 | + (UIViewLayoutItem *)layoutLessWithObject:(id)object 48 | Offset:(CGFloat)offset; 49 | 50 | 51 | 52 | + (UIViewLayoutItem *)layoutInsertEqualWithObject:(id)object 53 | Insert:(UIEdgeInsets)insert; 54 | + (UIViewLayoutItem *)layoutInsertGreatWithObject:(id)object 55 | Insert:(UIEdgeInsets)insert; 56 | + (UIViewLayoutItem *)layoutInsertLessWithObject:(id)object 57 | Insert:(UIEdgeInsets)insert; 58 | 59 | 60 | 61 | + (UIViewLayoutItem *)layoutMutilEqualWithObject:(id)object 62 | Mutil:(CGFloat)mutil; 63 | + (UIViewLayoutItem *)layoutMutilGreatWithObject:(id)object 64 | Mutil:(CGFloat)mutil; 65 | + (UIViewLayoutItem *)layoutMutilLessWithObject:(id)object 66 | Mutil:(CGFloat)mutil; 67 | 68 | 69 | 70 | + (UIViewLayoutItem *)layoutSizeEqualWithSize:(CGSize)size; 71 | + (UIViewLayoutItem *)layoutSizeGreatWithSize:(CGSize)size; 72 | + (UIViewLayoutItem *)layoutSizeLessWithSize:(CGSize)size; 73 | 74 | 75 | 76 | + (UIViewLayoutItem *)layoutValueEqualWithValue:(CGFloat)value; 77 | + (UIViewLayoutItem *)layoutValueGreatWithValue:(CGFloat)value; 78 | + (UIViewLayoutItem *)layoutValueLessWithValue:(CGFloat)value; 79 | 80 | @end 81 | 82 | -------------------------------------------------------------------------------- /Demo/Pods/Target Support Files/Pods-default-Demo/Pods-default-Demo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## JGProgressHUD 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2014-2018 Jonas Gessner 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | this software and associated documentation files (the "Software"), to deal in 12 | the Software without restriction, including without limitation the rights to 13 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 14 | the Software, and to permit persons to whom the Software is furnished to do so, 15 | subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 22 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 23 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 24 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | 28 | ## Masonry 29 | 30 | Copyright (c) 2011-2012 Masonry Team - https://github.com/Masonry 31 | 32 | Permission is hereby granted, free of charge, to any person obtaining a copy 33 | of this software and associated documentation files (the "Software"), to deal 34 | in the Software without restriction, including without limitation the rights 35 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 36 | copies of the Software, and to permit persons to whom the Software is 37 | furnished to do so, subject to the following conditions: 38 | 39 | The above copyright notice and this permission notice shall be included in 40 | all copies or substantial portions of the Software. 41 | 42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 43 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 45 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 47 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 48 | THE SOFTWARE. 49 | 50 | ## UIVIewMasonryLayout 51 | 52 | MIT License 53 | 54 | Copyright (c) 2019 WeiKunChao 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a copy 57 | of this software and associated documentation files (the "Software"), to deal 58 | in the Software without restriction, including without limitation the rights 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 60 | copies of the Software, and to permit persons to whom the Software is 61 | furnished to do so, subject to the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in all 64 | copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 72 | SOFTWARE. 73 | 74 | 75 | ## WKCFansyCameraView 76 | 77 | MIT License 78 | 79 | Copyright (c) 2019 WeiKunChao 80 | 81 | Permission is hereby granted, free of charge, to any person obtaining a copy 82 | of this software and associated documentation files (the "Software"), to deal 83 | in the Software without restriction, including without limitation the rights 84 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 85 | copies of the Software, and to permit persons to whom the Software is 86 | furnished to do so, subject to the following conditions: 87 | 88 | The above copyright notice and this permission notice shall be included in all 89 | copies or substantial portions of the Software. 90 | 91 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 92 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 93 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 94 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 95 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 96 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 97 | SOFTWARE. 98 | 99 | Generated by CocoaPods - https://cocoapods.org 100 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | /** 14 | * Provides constraint maker block 15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs 16 | */ 17 | @interface MAS_VIEW (MASAdditions) 18 | 19 | /** 20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute 21 | */ 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; 31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; 32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; 33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); 34 | 35 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 36 | 37 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_firstBaseline; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_lastBaseline; 39 | 40 | #endif 41 | 42 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 43 | 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; 49 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; 50 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; 51 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; 52 | 53 | #endif 54 | 55 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 56 | 57 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0)); 58 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); 59 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); 60 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); 61 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); 62 | 63 | #endif 64 | 65 | /** 66 | * a key to associate with this view 67 | */ 68 | @property (nonatomic, strong) id mas_key; 69 | 70 | /** 71 | * Finds the closest common superview between this view and another view 72 | * 73 | * @param view other view 74 | * 75 | * @return returns nil if common superview could not be found 76 | */ 77 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; 78 | 79 | /** 80 | * Creates a MASConstraintMaker with the callee view. 81 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing 82 | * 83 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 84 | * 85 | * @return Array of created MASConstraints 86 | */ 87 | - (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 88 | 89 | /** 90 | * Creates a MASConstraintMaker with the callee view. 91 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 92 | * If an existing constraint exists then it will be updated instead. 93 | * 94 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 95 | * 96 | * @return Array of created/updated MASConstraints 97 | */ 98 | - (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 99 | 100 | /** 101 | * Creates a MASConstraintMaker with the callee view. 102 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 103 | * All constraints previously installed for the view will be removed. 104 | * 105 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 106 | * 107 | * @return Array of created/updated MASConstraints 108 | */ 109 | - (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *firstBaseline; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *lastBaseline; 36 | 37 | #endif 38 | 39 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 40 | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 45 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 46 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 47 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 48 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 49 | 50 | #endif 51 | 52 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 53 | 54 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); 55 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); 56 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); 57 | @property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); 58 | 59 | #endif 60 | 61 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 62 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 63 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 64 | 65 | @end 66 | 67 | #define MAS_ATTR_FORWARD(attr) \ 68 | - (MASViewAttribute *)attr { \ 69 | return [self mas_##attr]; \ 70 | } 71 | 72 | @implementation MAS_VIEW (MASShorthandAdditions) 73 | 74 | MAS_ATTR_FORWARD(top); 75 | MAS_ATTR_FORWARD(left); 76 | MAS_ATTR_FORWARD(bottom); 77 | MAS_ATTR_FORWARD(right); 78 | MAS_ATTR_FORWARD(leading); 79 | MAS_ATTR_FORWARD(trailing); 80 | MAS_ATTR_FORWARD(width); 81 | MAS_ATTR_FORWARD(height); 82 | MAS_ATTR_FORWARD(centerX); 83 | MAS_ATTR_FORWARD(centerY); 84 | MAS_ATTR_FORWARD(baseline); 85 | 86 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 87 | 88 | MAS_ATTR_FORWARD(firstBaseline); 89 | MAS_ATTR_FORWARD(lastBaseline); 90 | 91 | #endif 92 | 93 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 94 | 95 | MAS_ATTR_FORWARD(leftMargin); 96 | MAS_ATTR_FORWARD(rightMargin); 97 | MAS_ATTR_FORWARD(topMargin); 98 | MAS_ATTR_FORWARD(bottomMargin); 99 | MAS_ATTR_FORWARD(leadingMargin); 100 | MAS_ATTR_FORWARD(trailingMargin); 101 | MAS_ATTR_FORWARD(centerXWithinMargins); 102 | MAS_ATTR_FORWARD(centerYWithinMargins); 103 | 104 | #endif 105 | 106 | #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) 107 | 108 | MAS_ATTR_FORWARD(safeAreaLayoutGuideTop); 109 | MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom); 110 | MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft); 111 | MAS_ATTR_FORWARD(safeAreaLayoutGuideRight); 112 | 113 | #endif 114 | 115 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 116 | return [self mas_attribute]; 117 | } 118 | 119 | - (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 120 | return [self mas_makeConstraints:block]; 121 | } 122 | 123 | - (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 124 | return [self mas_updateConstraints:block]; 125 | } 126 | 127 | - (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { 128 | return [self mas_remakeConstraints:block]; 129 | } 130 | 131 | @end 132 | 133 | #endif 134 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDPieIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDPieIndicatorView.h" 10 | 11 | @interface JGProgressHUDPieIndicatorLayer : CALayer 12 | 13 | @property (nonatomic, assign) float progress; 14 | 15 | @property (nonatomic, weak) UIColor *color; 16 | 17 | @property (nonatomic, weak) UIColor *fillColor; 18 | 19 | @end 20 | 21 | @implementation JGProgressHUDPieIndicatorLayer 22 | 23 | @dynamic progress, color, fillColor; 24 | 25 | + (BOOL)needsDisplayForKey:(NSString *)key { 26 | return ([key isEqualToString:@"progress"] || [key isEqualToString:@"color"] || [key isEqualToString:@"fillColor"] || [super needsDisplayForKey:key]); 27 | } 28 | 29 | - (id )actionForKey:(NSString *)key { 30 | if ([key isEqualToString:@"progress"]) { 31 | CABasicAnimation *progressAnimation = [CABasicAnimation animation]; 32 | progressAnimation.fromValue = [self.presentationLayer valueForKey:key]; 33 | 34 | progressAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 35 | 36 | return progressAnimation; 37 | } 38 | 39 | return [super actionForKey:key]; 40 | } 41 | 42 | - (void)drawInContext:(CGContextRef)ctx { 43 | UIGraphicsPushContext(ctx); 44 | 45 | CGRect rect = self.bounds; 46 | 47 | CGPoint center = CGPointMake(rect.origin.x + (CGFloat)floor(rect.size.width/2.0), rect.origin.y + (CGFloat)floor(rect.size.height/2.0)); 48 | CGFloat lineWidth = 2.0; 49 | CGFloat radius = (CGFloat)floor(MIN(rect.size.width, rect.size.height)/2.0)-lineWidth; 50 | 51 | UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0 endAngle:2.0*(CGFloat)M_PI clockwise:NO]; 52 | 53 | [borderPath setLineWidth:lineWidth]; 54 | 55 | if (self.fillColor) { 56 | [self.fillColor setFill]; 57 | 58 | [borderPath fill]; 59 | } 60 | 61 | [self.color set]; 62 | 63 | [borderPath stroke]; 64 | 65 | if (self.progress > 0.0) { 66 | UIBezierPath *processPath = [UIBezierPath bezierPath]; 67 | 68 | [processPath setLineWidth:radius]; 69 | 70 | CGFloat startAngle = -((CGFloat)M_PI/2.0); 71 | CGFloat endAngle = startAngle + 2.0 * (CGFloat)M_PI * self.progress; 72 | 73 | [processPath addArcWithCenter:center radius:radius/2.0 startAngle:startAngle endAngle:endAngle clockwise:YES]; 74 | 75 | [processPath stroke]; 76 | } 77 | 78 | UIGraphicsPopContext(); 79 | } 80 | 81 | @end 82 | 83 | 84 | @implementation JGProgressHUDPieIndicatorView 85 | 86 | #pragma mark - Initializers 87 | 88 | - (instancetype)init { 89 | self = [super initWithContentView:nil]; 90 | 91 | if (self) { 92 | self.layer.contentsScale = [UIScreen mainScreen].scale; 93 | [self.layer setNeedsDisplay]; 94 | 95 | self.color = [UIColor clearColor]; 96 | self.fillColor = [UIColor clearColor]; 97 | } 98 | 99 | return self; 100 | } 101 | 102 | - (instancetype)initWithHUDStyle:(JGProgressHUDStyle)style { 103 | return [self init]; 104 | } 105 | 106 | - (instancetype)initWithContentView:(UIView *)contentView { 107 | return [self init]; 108 | } 109 | 110 | #pragma mark - Getters & Setters 111 | 112 | - (void)setColor:(UIColor *)tintColor { 113 | if ([tintColor isEqual:self.color]) { 114 | return; 115 | } 116 | 117 | _color = tintColor; 118 | 119 | [(JGProgressHUDPieIndicatorLayer *)self.layer setColor:self.color]; 120 | } 121 | 122 | - (void)setFillColor:(UIColor *)fillColor { 123 | if ([fillColor isEqual:self.fillColor]) { 124 | return; 125 | } 126 | 127 | _fillColor = fillColor; 128 | 129 | [(JGProgressHUDPieIndicatorLayer *)self.layer setFillColor:self.fillColor]; 130 | } 131 | 132 | - (void)setProgress:(float)progress animated:(BOOL)animated { 133 | if (fequal(self.progress, progress)) { 134 | return; 135 | } 136 | 137 | [super setProgress:progress animated:animated]; 138 | 139 | [CATransaction begin]; 140 | [CATransaction setAnimationDuration:(animated ? 0.3 : 0.0)]; 141 | 142 | [(JGProgressHUDPieIndicatorLayer *)self.layer setProgress:progress]; 143 | 144 | [CATransaction commit]; 145 | } 146 | 147 | #pragma mark - Overrides 148 | 149 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 150 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 151 | 152 | if (style == JGProgressHUDStyleDark) { 153 | self.color = [UIColor colorWithWhite:1.0 alpha:1.0]; 154 | self.fillColor = [UIColor colorWithWhite:0.2 alpha:1.0]; 155 | } 156 | else { 157 | self.color = [UIColor blackColor]; 158 | if (style == JGProgressHUDStyleLight) { 159 | self.fillColor = [UIColor colorWithWhite:0.85 alpha:1.0]; 160 | } 161 | else { 162 | self.fillColor = [UIColor colorWithWhite:0.9 alpha:1.0]; 163 | } 164 | } 165 | } 166 | 167 | + (Class)layerClass { 168 | return [JGProgressHUDPieIndicatorLayer class]; 169 | } 170 | 171 | @end 172 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASCompositeConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASCompositeConstraint.h" 10 | #import "MASConstraint+Private.h" 11 | 12 | @interface MASCompositeConstraint () 13 | 14 | @property (nonatomic, strong) id mas_key; 15 | @property (nonatomic, strong) NSMutableArray *childConstraints; 16 | 17 | @end 18 | 19 | @implementation MASCompositeConstraint 20 | 21 | - (id)initWithChildren:(NSArray *)children { 22 | self = [super init]; 23 | if (!self) return nil; 24 | 25 | _childConstraints = [children mutableCopy]; 26 | for (MASConstraint *constraint in _childConstraints) { 27 | constraint.delegate = self; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - MASConstraintDelegate 34 | 35 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { 36 | NSUInteger index = [self.childConstraints indexOfObject:constraint]; 37 | NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); 38 | [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; 39 | } 40 | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 42 | id strongDelegate = self.delegate; 43 | MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 44 | newConstraint.delegate = self; 45 | [self.childConstraints addObject:newConstraint]; 46 | return newConstraint; 47 | } 48 | 49 | #pragma mark - NSLayoutConstraint multiplier proxies 50 | 51 | - (MASConstraint * (^)(CGFloat))multipliedBy { 52 | return ^id(CGFloat multiplier) { 53 | for (MASConstraint *constraint in self.childConstraints) { 54 | constraint.multipliedBy(multiplier); 55 | } 56 | return self; 57 | }; 58 | } 59 | 60 | - (MASConstraint * (^)(CGFloat))dividedBy { 61 | return ^id(CGFloat divider) { 62 | for (MASConstraint *constraint in self.childConstraints) { 63 | constraint.dividedBy(divider); 64 | } 65 | return self; 66 | }; 67 | } 68 | 69 | #pragma mark - MASLayoutPriority proxy 70 | 71 | - (MASConstraint * (^)(MASLayoutPriority))priority { 72 | return ^id(MASLayoutPriority priority) { 73 | for (MASConstraint *constraint in self.childConstraints) { 74 | constraint.priority(priority); 75 | } 76 | return self; 77 | }; 78 | } 79 | 80 | #pragma mark - NSLayoutRelation proxy 81 | 82 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { 83 | return ^id(id attr, NSLayoutRelation relation) { 84 | for (MASConstraint *constraint in self.childConstraints.copy) { 85 | constraint.equalToWithRelation(attr, relation); 86 | } 87 | return self; 88 | }; 89 | } 90 | 91 | #pragma mark - attribute chaining 92 | 93 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 94 | [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 95 | return self; 96 | } 97 | 98 | #pragma mark - Animator proxy 99 | 100 | #if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) 101 | 102 | - (MASConstraint *)animator { 103 | for (MASConstraint *constraint in self.childConstraints) { 104 | [constraint animator]; 105 | } 106 | return self; 107 | } 108 | 109 | #endif 110 | 111 | #pragma mark - debug helpers 112 | 113 | - (MASConstraint * (^)(id))key { 114 | return ^id(id key) { 115 | self.mas_key = key; 116 | int i = 0; 117 | for (MASConstraint *constraint in self.childConstraints) { 118 | constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); 119 | } 120 | return self; 121 | }; 122 | } 123 | 124 | #pragma mark - NSLayoutConstraint constant setters 125 | 126 | - (void)setInsets:(MASEdgeInsets)insets { 127 | for (MASConstraint *constraint in self.childConstraints) { 128 | constraint.insets = insets; 129 | } 130 | } 131 | 132 | - (void)setInset:(CGFloat)inset { 133 | for (MASConstraint *constraint in self.childConstraints) { 134 | constraint.inset = inset; 135 | } 136 | } 137 | 138 | - (void)setOffset:(CGFloat)offset { 139 | for (MASConstraint *constraint in self.childConstraints) { 140 | constraint.offset = offset; 141 | } 142 | } 143 | 144 | - (void)setSizeOffset:(CGSize)sizeOffset { 145 | for (MASConstraint *constraint in self.childConstraints) { 146 | constraint.sizeOffset = sizeOffset; 147 | } 148 | } 149 | 150 | - (void)setCenterOffset:(CGPoint)centerOffset { 151 | for (MASConstraint *constraint in self.childConstraints) { 152 | constraint.centerOffset = centerOffset; 153 | } 154 | } 155 | 156 | #pragma mark - MASConstraint 157 | 158 | - (void)activate { 159 | for (MASConstraint *constraint in self.childConstraints) { 160 | [constraint activate]; 161 | } 162 | } 163 | 164 | - (void)deactivate { 165 | for (MASConstraint *constraint in self.childConstraints) { 166 | [constraint deactivate]; 167 | } 168 | } 169 | 170 | - (void)install { 171 | for (MASConstraint *constraint in self.childConstraints) { 172 | constraint.updateExisting = self.updateExisting; 173 | [constraint install]; 174 | } 175 | } 176 | 177 | - (void)uninstall { 178 | for (MASConstraint *constraint in self.childConstraints) { 179 | [constraint uninstall]; 180 | } 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /Demo/Demo/Category/UIDevice+Common.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+Common.m 3 | // abab 4 | // 5 | // Created by 魏昆超 on 2019/2/18. 6 | // Copyright © 2019 SecretLisa. All rights reserved. 7 | // 8 | 9 | #import "UIDevice+Common.h" 10 | #import 11 | @import CommonCrypto; 12 | 13 | @interface NSString (md5) 14 | 15 | @property (nonatomic, copy, readonly) NSString * toMD5; 16 | 17 | @end 18 | 19 | @implementation NSString (md5) 20 | 21 | - (NSString *)toMD5 22 | { 23 | return [self encryptWithLength:CC_MD5_DIGEST_LENGTH]; 24 | } 25 | 26 | - (NSString *)encryptWithLength:(NSInteger)length 27 | { 28 | const char * cStr = [self cStringUsingEncoding:NSUTF8StringEncoding]; 29 | unsigned char buffer[length]; 30 | CC_MD5(cStr,(CC_LONG)strlen(cStr), buffer); 31 | NSMutableString * md5Str = [NSMutableString string]; 32 | for (NSInteger i = 0; i < length; i ++) { 33 | [md5Str appendFormat:@"%02x", buffer[i]]; 34 | } 35 | return md5Str; 36 | } 37 | 38 | @end 39 | 40 | static inline NSDictionary * bundleInfo() 41 | { 42 | return NSBundle.mainBundle.infoDictionary; 43 | } 44 | 45 | #define BUNDLE_INFO bundleInfo() 46 | 47 | static NSString * const kSCSUDKDeviceId = @"UDKDeviceId"; 48 | static NSString * const kSCSUDKUUID = @"UDKUUID"; 49 | static NSString * const kSCSUDKAnonymousUserId = @"UDKAnonymousUserId"; 50 | 51 | 52 | @implementation UIDevice (Common) 53 | 54 | + (NSString *)appVersion 55 | { 56 | return BUNDLE_INFO[@"CFBundleShortVersionString"]; 57 | } 58 | 59 | + (NSString *)appName 60 | { 61 | return BUNDLE_INFO[@"CFBundleName"]; 62 | } 63 | 64 | + (NSString *)appBuild 65 | { 66 | return BUNDLE_INFO[@"CFBundleVersion"]; 67 | } 68 | 69 | + (NSString *)genarateUuidString 70 | { 71 | return [self genarateUUIDString]; 72 | } 73 | 74 | 75 | 76 | 77 | + (NSString *)genarateUUIDString 78 | { 79 | NSString * uuid = [NSUserDefaults.standardUserDefaults stringForKey:kSCSUDKUUID]; 80 | if (!uuid) { 81 | uuid = [[NSUUID alloc] init].UUIDString; 82 | [NSUserDefaults.standardUserDefaults setObject:uuid 83 | forKey:kSCSUDKUUID]; 84 | } 85 | return uuid; 86 | } 87 | 88 | + (NSString *)idfaString 89 | { 90 | NSBundle * adSupportBundle = [NSBundle bundleWithPath:@"/System/Library/Frameworks/AdSupport.framework"]; 91 | [adSupportBundle load]; 92 | if (!adSupportBundle) { 93 | return [self genarateUUIDString]; 94 | } 95 | Class asIdentifierMClass = NSClassFromString(@"ASIdentifierManager"); 96 | if (!asIdentifierMClass) { 97 | return [self genarateUUIDString]; 98 | } 99 | ASIdentifierManager * asiManager = ASIdentifierManager.sharedManager; 100 | if (asiManager.isAdvertisingTrackingEnabled) { 101 | return asiManager.advertisingIdentifier.UUIDString; 102 | } 103 | return [self genarateUUIDString]; 104 | } 105 | 106 | + (NSString *)deviceUUID 107 | { 108 | NSString * uuid = [self idfaString]; 109 | if (!uuid || uuid.length == 0) { 110 | NSString * device_name = UIDevice.currentDevice.name; 111 | NSString * system_name = UIDevice.currentDevice.systemName; 112 | NSString * system_version = UIDevice.currentDevice.systemVersion; 113 | NSString * model = UIDevice.currentDevice.model; 114 | NSString * localized_model = UIDevice.currentDevice.localizedModel; 115 | NSString * country = NSLocale.currentLocale.localeIdentifier; 116 | NSString * language = [NSLocale preferredLanguages].firstObject; 117 | uuid = [NSString stringWithFormat:@"%@_%@_%@_%@_%@_%@_%@_%@", device_name, system_name, system_version, model, localized_model, country, language, NSUUID.new.UUIDString]; 118 | } 119 | return uuid; 120 | } 121 | 122 | + (NSString *)anonymousUserId 123 | { 124 | NSString * userId = [NSUserDefaults.standardUserDefaults stringForKey:kSCSUDKAnonymousUserId]; 125 | if (!userId || userId.length == 0) { 126 | userId = [NSString stringWithFormat:@"%@_%@",NSBundle.mainBundle.bundleIdentifier, [self deviceId].toMD5].toMD5; 127 | [NSUserDefaults.standardUserDefaults setObject:userId 128 | forKey:kSCSUDKAnonymousUserId]; 129 | } 130 | return userId; 131 | } 132 | 133 | + (NSString *)deviceId 134 | { 135 | NSString * deId = [NSUserDefaults.standardUserDefaults stringForKey:kSCSUDKDeviceId]; 136 | if (!deId || deId.length == 0) { 137 | deId = [self deviceUUID].toMD5; 138 | [NSUserDefaults.standardUserDefaults setObject:deId 139 | forKey:kSCSUDKDeviceId]; 140 | } 141 | return deId; 142 | } 143 | 144 | @end 145 | 146 | 147 | 148 | 149 | 150 | 151 | @implementation UIDevice (UI) 152 | 153 | + (BOOL)is5OrSE 154 | { 155 | return UIScreen.mainScreen.bounds.size.height == 480 || UIScreen.mainScreen.bounds.size.height == 568; 156 | } 157 | 158 | + (BOOL)is6 159 | { 160 | return UIScreen.mainScreen.bounds.size.height == 667; 161 | } 162 | 163 | + (BOOL)is6P 164 | { 165 | return UIScreen.mainScreen.bounds.size.height == 736; 166 | } 167 | 168 | + (BOOL)isPad 169 | { 170 | return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad; 171 | } 172 | 173 | + (BOOL)isX 174 | { 175 | return self.isPad ? NO : (UIScreen.mainScreen.bounds.size.height >= 812); 176 | } 177 | 178 | + (CGFloat)XTopSpace 179 | { 180 | return self.isX ? 44 : 0; 181 | } 182 | 183 | + (CGFloat)XBottomSpace 184 | { 185 | return self.isX ? 34 : 0; 186 | } 187 | 188 | + (CGFloat)statusBarHeight 189 | { 190 | return self.isX ? 44 : 20; 191 | } 192 | 193 | + (CGFloat)tabBarHeight 194 | { 195 | return 49 + self.XBottomSpace; 196 | } 197 | 198 | + (CGFloat)navigationBarHeight 199 | { 200 | return 44; 201 | } 202 | 203 | + (CGFloat)navigationHeight 204 | { 205 | return self.navigationBarHeight + self.statusBarHeight; 206 | } 207 | 208 | @end 209 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/README.md: -------------------------------------------------------------------------------- 1 | JGProgressHUD 2 | --------------- 3 | 4 | An elegant and simple progress HUD for iOS and tvOS.
5 |

6 | 7 |

8 | 9 | Overview 10 | --------------- 11 | 12 | __The ultimate progress HUD for iOS and tvOS is here: JGProgressHUD!__ 13 | 14 | - Plug and play: Simple integration, easy to use, few lines of code required. 15 | - Easily customizable (custom animations, indicator views and more). 16 | - Uses `UIVisualEffectView` and `UIMotionEffect` for a native look. 17 | - Uses AutoLayout to provide a fully dynamic layout. 18 | - Detects and repositions when keyboard appears/disappears. 19 | - Well documented and maintained. 20 | - Voice Over/`UIAccessibility` support. 21 | - Backward compatibility to iOS 8. 22 | - Can be used with Swift and Objective C. 23 | - And most importantly, it looks good! 24 | 25 | Download the source code and open the Examples project to try JGProgressHUD and see all of its features in action! 26 | 27 | [![GitHub release](https://img.shields.io/github/release/JonasGessner/JGProgressHUD.svg)](https://github.com/JonasGessner/JGProgressHUD/releases) 28 | [![GitHub license](https://img.shields.io/github/license/JonasGessner/JGProgressHUD.svg)](https://github.com/JonasGessner/JGProgressHUD/blob/master/LICENSE.txt) 29 | [![CocoaPods](https://img.shields.io/cocoapods/v/JGProgressHUD.svg)](https://cocoapods.org/pods/JGProgressHUD) 30 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 31 | 32 | Examples 33 | -------------- 34 | 35 |

36 | 37 |             38 | 39 |

40 | 41 | #### Showing indeterminate progress: 42 | 43 | Objective C: 44 | 45 | ```objc 46 | JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark]; 47 | HUD.textLabel.text = @"Loading"; 48 | [HUD showInView:self.view]; 49 | [HUD dismissAfterDelay:3.0]; 50 | ``` 51 | 52 | Swift: 53 | 54 | ```swift 55 | let hud = JGProgressHUD(style: .dark) 56 | hud.textLabel.text = "Loading" 57 | hud.show(in: self.view) 58 | hud.dismiss(afterDelay: 3.0) 59 | ``` 60 | 61 | This displays a dark HUD with an activity indicator and the title "Loading". The HUD is presented with a fade animation and is dismissed after 3 seconds with a fade animation. 62 | 63 | #### Showing an error message: 64 | 65 | ```objc 66 | JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark]; 67 | HUD.textLabel.text = @"Error"; 68 | HUD.indicatorView = [[JGProgressHUDErrorIndicatorView alloc] init]; //JGProgressHUDSuccessIndicatorView is also available 69 | [HUD showInView:self.view]; 70 | [HUD dismissAfterDelay:3.0]; 71 | ``` 72 | 73 | #### Showing determinate progress: 74 | 75 | ```objc 76 | JGProgressHUD *HUD = [JGProgressHUD progressHUDWithStyle:JGProgressHUDStyleDark]; 77 | HUD.indicatorView = [[JGProgressHUDPieIndicatorView alloc] init]; //Or JGProgressHUDRingIndicatorView 78 | HUD.progress = 0.5f; 79 | [HUD showInView:self.view]; 80 | [HUD dismissAfterDelay:3.0]; 81 | ``` 82 | 83 | __For more examples, including in Swift, see Examples.__ 84 | 85 | __Important:__ You should always show `JGProgressHUD` in a `UIViewController` view. 86 | 87 | Customization 88 | ----------- 89 | ### Styles: 90 | JGProgressHUD can be displayed in 3 styles: 91 | 92 | - __Extra Light__ 93 | - __Light__ 94 | - __Dark__ 95 | 96 | ### Indicator Views: 97 | By default a HUD will display an indeterminate progress indicator. The indicator view can be completely hidden by setting the `indicatorView` property to `nil`. These indicator views are available by default: 98 | 99 | - __Indeterminate progress indicator__ 100 | - __Pie progress indicator__ 101 | - __Ring progress indicator__ 102 | - __Success indicator__ 103 | - __Error indicator__ 104 | - __Image indicator__ 105 | 106 | Custom indicator views can be created by subclassing `JGProgressHUDIndicatorView`.
107 | 108 | 109 | ### Animations: 110 | By default a HUD will use a fade animation. Several parameters can be altered such as animation duration or animation curve. A HUD can be displayed without animation and different animations can be used. These animations are available by default: 111 | 112 | - __Fade__ 113 | - __Zoom and Fade__ 114 | 115 | Custom animations can be created by subclassing `JGProgressHUDAnimation`. 116 | 117 | To dim the content behind the HUD set your dim color as `backgroundColor` of your `JGProgressHUD` instance. 118 | 119 | Installation 120 | -------------- 121 | ### CocoaPods: 122 | In your `Podfile` add: 123 | 124 | ``` 125 | pod 'JGProgressHUD' 126 | ``` 127 | 128 | ### Carthage: 129 | In your `Cartfile` add: 130 | 131 | ``` 132 | github "JonasGessner/JGProgressHUD" 133 | ``` 134 | 135 | ### Manual Installation (Framework): 136 | 137 | 1. Drag the `JGProgressHUD.xcodeproj` file into your Xcode project. 138 | 2. Add `JGProgressHUD.framework` to "Embedded Binaries" in the "General" tab of your target. 139 | 140 | Then import the module where you want to use it: 141 | 142 | ```objc 143 | @import JGProgressHUD; 144 | ``` 145 | 146 | Swift: 147 | 148 | ```swift 149 | import JGProgressHUD 150 | ``` 151 | 152 | See the Examples project for an example implementation of JGProgressHUD as framework. 153 | 154 | Requirements 155 | ------------ 156 | 157 | - Base SDK of iOS/tvOS 11.0 or higher. 158 | - Deployment target of iOS 8.0, tvOS 9.0 or higher. 159 | 160 | JGProgressHUD can also be used by projects written in Swift. See Installation for details. 161 | 162 | Documentation 163 | ---------------- 164 | Detailed documentation can be found on here.

165 | Each class and method is well documented, making it easy to quickly get a good overview. To start, see JGProgressHUD.h. 166 | 167 | License 168 | --------- 169 | MIT License.
170 | © 2014-2019, Jonas Gessner. 171 | 172 | Credits 173 | ---------- 174 | Created and maintained by Jonas Gessner, © 2014-2019.
175 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraintMaker.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | typedef NS_OPTIONS(NSInteger, MASAttribute) { 13 | MASAttributeLeft = 1 << NSLayoutAttributeLeft, 14 | MASAttributeRight = 1 << NSLayoutAttributeRight, 15 | MASAttributeTop = 1 << NSLayoutAttributeTop, 16 | MASAttributeBottom = 1 << NSLayoutAttributeBottom, 17 | MASAttributeLeading = 1 << NSLayoutAttributeLeading, 18 | MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, 19 | MASAttributeWidth = 1 << NSLayoutAttributeWidth, 20 | MASAttributeHeight = 1 << NSLayoutAttributeHeight, 21 | MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, 22 | MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, 23 | MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, 24 | 25 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 26 | 27 | MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, 28 | MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, 29 | 30 | #endif 31 | 32 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 33 | 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, 36 | MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, 37 | MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, 38 | MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, 39 | MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, 40 | MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, 41 | MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, 42 | 43 | #endif 44 | 45 | }; 46 | 47 | /** 48 | * Provides factory methods for creating MASConstraints. 49 | * Constraints are collected until they are ready to be installed 50 | * 51 | */ 52 | @interface MASConstraintMaker : NSObject 53 | 54 | /** 55 | * The following properties return a new MASViewConstraint 56 | * with the first item set to the makers associated view and the appropriate MASViewAttribute 57 | */ 58 | @property (nonatomic, strong, readonly) MASConstraint *left; 59 | @property (nonatomic, strong, readonly) MASConstraint *top; 60 | @property (nonatomic, strong, readonly) MASConstraint *right; 61 | @property (nonatomic, strong, readonly) MASConstraint *bottom; 62 | @property (nonatomic, strong, readonly) MASConstraint *leading; 63 | @property (nonatomic, strong, readonly) MASConstraint *trailing; 64 | @property (nonatomic, strong, readonly) MASConstraint *width; 65 | @property (nonatomic, strong, readonly) MASConstraint *height; 66 | @property (nonatomic, strong, readonly) MASConstraint *centerX; 67 | @property (nonatomic, strong, readonly) MASConstraint *centerY; 68 | @property (nonatomic, strong, readonly) MASConstraint *baseline; 69 | 70 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 71 | 72 | @property (nonatomic, strong, readonly) MASConstraint *firstBaseline; 73 | @property (nonatomic, strong, readonly) MASConstraint *lastBaseline; 74 | 75 | #endif 76 | 77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 78 | 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; 81 | @property (nonatomic, strong, readonly) MASConstraint *topMargin; 82 | @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; 83 | @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; 84 | @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; 85 | @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; 86 | @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; 87 | 88 | #endif 89 | 90 | /** 91 | * Returns a block which creates a new MASCompositeConstraint with the first item set 92 | * to the makers associated view and children corresponding to the set bits in the 93 | * MASAttribute parameter. Combine multiple attributes via binary-or. 94 | */ 95 | @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); 96 | 97 | /** 98 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges 99 | * which generates the appropriate MASViewConstraint children (top, left, bottom, right) 100 | * with the first item set to the makers associated view 101 | */ 102 | @property (nonatomic, strong, readonly) MASConstraint *edges; 103 | 104 | /** 105 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize 106 | * which generates the appropriate MASViewConstraint children (width, height) 107 | * with the first item set to the makers associated view 108 | */ 109 | @property (nonatomic, strong, readonly) MASConstraint *size; 110 | 111 | /** 112 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter 113 | * which generates the appropriate MASViewConstraint children (centerX, centerY) 114 | * with the first item set to the makers associated view 115 | */ 116 | @property (nonatomic, strong, readonly) MASConstraint *center; 117 | 118 | /** 119 | * Whether or not to check for an existing constraint instead of adding constraint 120 | */ 121 | @property (nonatomic, assign) BOOL updateExisting; 122 | 123 | /** 124 | * Whether or not to remove existing constraints prior to installing 125 | */ 126 | @property (nonatomic, assign) BOOL removeExisting; 127 | 128 | /** 129 | * initialises the maker with a default view 130 | * 131 | * @param view any MASConstraint are created with this view as the first item 132 | * 133 | * @return a new MASConstraintMaker 134 | */ 135 | - (id)initWithView:(MAS_VIEW *)view; 136 | 137 | /** 138 | * Calls install method on any MASConstraints which have been created by this maker 139 | * 140 | * @return an array of all the installed MASConstraints 141 | */ 142 | - (NSArray *)install; 143 | 144 | - (MASConstraint * (^)(dispatch_block_t))group; 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Demo/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSLayoutConstraint+MASDebugAdditions.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | 13 | @implementation NSLayoutConstraint (MASDebugAdditions) 14 | 15 | #pragma mark - description maps 16 | 17 | + (NSDictionary *)layoutRelationDescriptionsByValue { 18 | static dispatch_once_t once; 19 | static NSDictionary *descriptionMap; 20 | dispatch_once(&once, ^{ 21 | descriptionMap = @{ 22 | @(NSLayoutRelationEqual) : @"==", 23 | @(NSLayoutRelationGreaterThanOrEqual) : @">=", 24 | @(NSLayoutRelationLessThanOrEqual) : @"<=", 25 | }; 26 | }); 27 | return descriptionMap; 28 | } 29 | 30 | + (NSDictionary *)layoutAttributeDescriptionsByValue { 31 | static dispatch_once_t once; 32 | static NSDictionary *descriptionMap; 33 | dispatch_once(&once, ^{ 34 | descriptionMap = @{ 35 | @(NSLayoutAttributeTop) : @"top", 36 | @(NSLayoutAttributeLeft) : @"left", 37 | @(NSLayoutAttributeBottom) : @"bottom", 38 | @(NSLayoutAttributeRight) : @"right", 39 | @(NSLayoutAttributeLeading) : @"leading", 40 | @(NSLayoutAttributeTrailing) : @"trailing", 41 | @(NSLayoutAttributeWidth) : @"width", 42 | @(NSLayoutAttributeHeight) : @"height", 43 | @(NSLayoutAttributeCenterX) : @"centerX", 44 | @(NSLayoutAttributeCenterY) : @"centerY", 45 | @(NSLayoutAttributeBaseline) : @"baseline", 46 | 47 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) 48 | @(NSLayoutAttributeFirstBaseline) : @"firstBaseline", 49 | @(NSLayoutAttributeLastBaseline) : @"lastBaseline", 50 | #endif 51 | 52 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) 53 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", 54 | @(NSLayoutAttributeRightMargin) : @"rightMargin", 55 | @(NSLayoutAttributeTopMargin) : @"topMargin", 56 | @(NSLayoutAttributeBottomMargin) : @"bottomMargin", 57 | @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", 58 | @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", 59 | @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", 60 | @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", 61 | #endif 62 | 63 | }; 64 | 65 | }); 66 | return descriptionMap; 67 | } 68 | 69 | 70 | + (NSDictionary *)layoutPriorityDescriptionsByValue { 71 | static dispatch_once_t once; 72 | static NSDictionary *descriptionMap; 73 | dispatch_once(&once, ^{ 74 | #if TARGET_OS_IPHONE || TARGET_OS_TV 75 | descriptionMap = @{ 76 | @(MASLayoutPriorityDefaultHigh) : @"high", 77 | @(MASLayoutPriorityDefaultLow) : @"low", 78 | @(MASLayoutPriorityDefaultMedium) : @"medium", 79 | @(MASLayoutPriorityRequired) : @"required", 80 | @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", 81 | }; 82 | #elif TARGET_OS_MAC 83 | descriptionMap = @{ 84 | @(MASLayoutPriorityDefaultHigh) : @"high", 85 | @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", 86 | @(MASLayoutPriorityDefaultMedium) : @"medium", 87 | @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", 88 | @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", 89 | @(MASLayoutPriorityDefaultLow) : @"low", 90 | @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", 91 | @(MASLayoutPriorityRequired) : @"required", 92 | }; 93 | #endif 94 | }); 95 | return descriptionMap; 96 | } 97 | 98 | #pragma mark - description override 99 | 100 | + (NSString *)descriptionForObject:(id)obj { 101 | if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { 102 | return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; 103 | } 104 | return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; 105 | } 106 | 107 | - (NSString *)description { 108 | NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; 109 | 110 | [description appendString:[self.class descriptionForObject:self]]; 111 | 112 | [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; 113 | if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { 114 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]]; 115 | } 116 | 117 | [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]]; 118 | 119 | if (self.secondItem) { 120 | [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; 121 | } 122 | if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { 123 | [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]]; 124 | } 125 | 126 | if (self.multiplier != 1) { 127 | [description appendFormat:@" * %g", self.multiplier]; 128 | } 129 | 130 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { 131 | [description appendFormat:@" %g", self.constant]; 132 | } else { 133 | if (self.constant) { 134 | [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; 135 | } 136 | } 137 | 138 | if (self.priority != MASLayoutPriorityRequired) { 139 | [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; 140 | } 141 | 142 | [description appendString:@">"]; 143 | return description; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Demo/Pods/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDRingIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDRingIndicatorView.h" 10 | 11 | 12 | @interface JGProgressHUDRingIndicatorLayer : CALayer 13 | 14 | @property (nonatomic, assign) float progress; 15 | 16 | @property (nonatomic, weak) UIColor *ringColor; 17 | @property (nonatomic, weak) UIColor *ringBackgroundColor; 18 | 19 | @property (nonatomic, assign) BOOL roundProgressLine; 20 | 21 | @property (nonatomic, assign) CGFloat ringWidth; 22 | 23 | @end 24 | 25 | @implementation JGProgressHUDRingIndicatorLayer 26 | 27 | @dynamic progress, ringBackgroundColor, ringColor, ringWidth, roundProgressLine; 28 | 29 | + (BOOL)needsDisplayForKey:(NSString *)key { 30 | return ([key isEqualToString:@"progress"] || [key isEqualToString:@"ringColor"] || [key isEqualToString:@"ringBackgroundColor"] || [key isEqualToString:@"roundProgressLine"] || [key isEqualToString:@"ringWidth"] || [super needsDisplayForKey:key]); 31 | } 32 | 33 | - (id )actionForKey:(NSString *)key { 34 | if ([key isEqualToString:@"progress"]) { 35 | CABasicAnimation *progressAnimation = [CABasicAnimation animation]; 36 | progressAnimation.fromValue = [self.presentationLayer valueForKey:key]; 37 | 38 | progressAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 39 | 40 | return progressAnimation; 41 | } 42 | 43 | return [super actionForKey:key]; 44 | } 45 | 46 | - (void)drawInContext:(CGContextRef)ctx { 47 | UIGraphicsPushContext(ctx); 48 | 49 | CGRect rect = self.bounds; 50 | 51 | CGPoint center = CGPointMake(rect.origin.x + (CGFloat)floor(rect.size.width/2.0), rect.origin.y + (CGFloat)floor(rect.size.height/2.0)); 52 | CGFloat lineWidth = self.ringWidth; 53 | CGFloat radius = (CGFloat)floor(MIN(rect.size.width, rect.size.height)/2.0) - lineWidth; 54 | 55 | //Background 56 | [self.ringBackgroundColor setStroke]; 57 | 58 | UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0 endAngle:2.0*(CGFloat)M_PI clockwise:NO]; 59 | 60 | [borderPath setLineWidth:lineWidth]; 61 | [borderPath stroke]; 62 | 63 | //Progress 64 | [self.ringColor setStroke]; 65 | 66 | if (self.progress > 0.0) { 67 | UIBezierPath *processPath = [UIBezierPath bezierPath]; 68 | 69 | [processPath setLineWidth:lineWidth]; 70 | [processPath setLineCapStyle:(self.roundProgressLine ? kCGLineCapRound : kCGLineCapSquare)]; 71 | 72 | CGFloat startAngle = -((CGFloat)M_PI / 2.0); 73 | CGFloat endAngle = startAngle + 2.0 * (CGFloat)M_PI * self.progress; 74 | 75 | [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; 76 | 77 | [processPath stroke]; 78 | } 79 | 80 | UIGraphicsPopContext(); 81 | } 82 | 83 | @end 84 | 85 | 86 | @implementation JGProgressHUDRingIndicatorView 87 | 88 | #pragma mark - Initializers 89 | 90 | - (instancetype)init { 91 | self = [super initWithContentView:nil];; 92 | 93 | if (self) { 94 | self.layer.contentsScale = [UIScreen mainScreen].scale; 95 | [self.layer setNeedsDisplay]; 96 | 97 | self.ringWidth = 3.0; 98 | self.ringColor = [UIColor clearColor]; 99 | self.ringBackgroundColor = [UIColor clearColor]; 100 | } 101 | 102 | return self; 103 | } 104 | 105 | - (instancetype)initWithHUDStyle:(JGProgressHUDStyle)style { 106 | return [self init]; 107 | } 108 | 109 | - (instancetype)initWithContentView:(UIView *)contentView { 110 | return [self init]; 111 | } 112 | 113 | #pragma mark - Getters & Setters 114 | 115 | - (void)setRoundProgressLine:(BOOL)roundProgressLine { 116 | if (roundProgressLine == self.roundProgressLine) { 117 | return; 118 | } 119 | 120 | _roundProgressLine = roundProgressLine; 121 | 122 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRoundProgressLine:self.roundProgressLine]; 123 | } 124 | 125 | - (void)setRingColor:(UIColor *)tintColor { 126 | if ([tintColor isEqual:self.ringColor]) { 127 | return; 128 | } 129 | 130 | _ringColor = tintColor; 131 | 132 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRingColor:self.ringColor]; 133 | } 134 | 135 | - (void)setRingBackgroundColor:(UIColor *)backgroundTintColor { 136 | if ([backgroundTintColor isEqual:self.ringBackgroundColor]) { 137 | return; 138 | } 139 | 140 | _ringBackgroundColor = backgroundTintColor; 141 | 142 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRingBackgroundColor:self.ringBackgroundColor]; 143 | } 144 | 145 | - (void)setRingWidth:(CGFloat)ringWidth { 146 | if (fequal(ringWidth, self.ringWidth)) { 147 | return; 148 | } 149 | 150 | _ringWidth = ringWidth; 151 | 152 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRingWidth:self.ringWidth]; 153 | } 154 | 155 | - (void)setProgress:(float)progress animated:(BOOL)animated { 156 | if (fequal(self.progress, progress)) { 157 | return; 158 | } 159 | 160 | [super setProgress:progress animated:animated]; 161 | 162 | [CATransaction begin]; 163 | [CATransaction setAnimationDuration:(animated ? 0.3 : 0.0)]; 164 | 165 | [(JGProgressHUDRingIndicatorLayer *)self.layer setProgress:self.progress]; 166 | 167 | [CATransaction commit]; 168 | } 169 | 170 | #pragma mark - Overrides 171 | 172 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 173 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 174 | 175 | if (style == JGProgressHUDStyleDark) { 176 | self.ringColor = [UIColor colorWithWhite:1.0 alpha:1.0]; 177 | self.ringBackgroundColor = [UIColor colorWithWhite:0.0 alpha:1.0]; 178 | } 179 | else { 180 | self.ringColor = [UIColor blackColor]; 181 | if (style == JGProgressHUDStyleLight) { 182 | self.ringBackgroundColor = [UIColor colorWithWhite:0.85 alpha:1.0]; 183 | } 184 | else { 185 | self.ringBackgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0]; 186 | } 187 | } 188 | } 189 | 190 | + (Class)layerClass { 191 | return [JGProgressHUDRingIndicatorLayer class]; 192 | } 193 | 194 | @end 195 | --------------------------------------------------------------------------------