├── .github
└── workflows
│ └── mirror.yml
├── Demo
├── .DS_Store
├── oc 版本
│ └── VerifyCodeDemo
│ │ ├── Podfile
│ │ ├── Podfile.lock
│ │ ├── Pods
│ │ ├── Manifest.lock
│ │ ├── NTESVerifyCode
│ │ │ ├── Assets
│ │ │ │ └── NTESVerifyCodeResources.bundle
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Rectangle@1x.png
│ │ │ │ │ ├── Rectangle@2x.png
│ │ │ │ │ ├── Rectangle@3x.png
│ │ │ │ │ ├── Rectangle_dark@1x.png
│ │ │ │ │ ├── Rectangle_dark@2x.png
│ │ │ │ │ ├── Rectangle_dark@3x.png
│ │ │ │ │ ├── bg@1x.png
│ │ │ │ │ ├── bg@2x.png
│ │ │ │ │ ├── bg@3x.png
│ │ │ │ │ ├── bg_dark@1x.png
│ │ │ │ │ ├── bg_dark@2x.png
│ │ │ │ │ ├── bg_dark@3x.png
│ │ │ │ │ ├── ico_close2@1x.png
│ │ │ │ │ ├── ico_close2@2x.png
│ │ │ │ │ ├── ico_close2@3x.png
│ │ │ │ │ ├── ico_error@1x.png
│ │ │ │ │ ├── ico_error@2x.png
│ │ │ │ │ ├── ico_error@3x.png
│ │ │ │ │ ├── ico_error_dark@1x.png
│ │ │ │ │ ├── ico_error_dark@2x.png
│ │ │ │ │ ├── ico_error_dark@3x.png
│ │ │ │ │ ├── ico_loading@1x.png
│ │ │ │ │ ├── ico_loading@2x.png
│ │ │ │ │ ├── ico_loading@3x.png
│ │ │ │ │ ├── icon_close_dark@1x.png
│ │ │ │ │ ├── icon_close_dark@2x.png
│ │ │ │ │ ├── icon_close_dark@3x.png
│ │ │ │ │ ├── loading.gif
│ │ │ │ │ └── mobile.v2.23.0.html
│ │ │ ├── Classes
│ │ │ │ └── VerifyCode.xcframework
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── ios-arm64_armv7
│ │ │ │ │ └── VerifyCode.framework
│ │ │ │ │ │ ├── Headers
│ │ │ │ │ │ ├── NTESVerifyCodeManager.h
│ │ │ │ │ │ └── NTESVerifyCodeStyleConfig.h
│ │ │ │ │ │ ├── Info.plist
│ │ │ │ │ │ ├── Modules
│ │ │ │ │ │ └── module.modulemap
│ │ │ │ │ │ └── VerifyCode
│ │ │ │ │ └── ios-arm64_i386_x86_64-simulator
│ │ │ │ │ └── VerifyCode.framework
│ │ │ │ │ ├── Headers
│ │ │ │ │ ├── NTESVerifyCodeManager.h
│ │ │ │ │ └── NTESVerifyCodeStyleConfig.h
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Modules
│ │ │ │ │ └── module.modulemap
│ │ │ │ │ ├── VerifyCode
│ │ │ │ │ └── _CodeSignature
│ │ │ │ │ ├── CodeDirectory
│ │ │ │ │ ├── CodeRequirements
│ │ │ │ │ ├── CodeRequirements-1
│ │ │ │ │ ├── CodeResources
│ │ │ │ │ └── CodeSignature
│ │ │ └── README.md
│ │ ├── Pods.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── xcuserdata
│ │ │ │ └── luolihao.xcuserdatad
│ │ │ │ └── xcschemes
│ │ │ │ ├── NTESVerifyCode.xcscheme
│ │ │ │ └── Pods-VerifyCodeDemo.xcscheme
│ │ └── Target Support Files
│ │ │ ├── NTESVerifyCode
│ │ │ ├── NTESVerifyCode-xcframeworks.sh
│ │ │ ├── NTESVerifyCode.debug.xcconfig
│ │ │ └── NTESVerifyCode.release.xcconfig
│ │ │ └── Pods-VerifyCodeDemo
│ │ │ ├── Pods-VerifyCodeDemo-acknowledgements.markdown
│ │ │ ├── Pods-VerifyCodeDemo-acknowledgements.plist
│ │ │ ├── Pods-VerifyCodeDemo-dummy.m
│ │ │ ├── Pods-VerifyCodeDemo-resources.sh
│ │ │ ├── Pods-VerifyCodeDemo.debug.xcconfig
│ │ │ └── Pods-VerifyCodeDemo.release.xcconfig
│ │ ├── VerifyCodeDemo.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── xcshareddata
│ │ │ └── xcschemes
│ │ │ │ └── VerifyCodeDemo.xcscheme
│ │ └── xcuserdata
│ │ │ └── netease.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── VerifyCodeDemo.xcscheme
│ │ ├── VerifyCodeDemo
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── Masonry
│ │ │ ├── LICENSE
│ │ │ └── Masonry
│ │ │ │ ├── MASCompositeConstraint.h
│ │ │ │ ├── MASCompositeConstraint.m
│ │ │ │ ├── MASConstraint+Private.h
│ │ │ │ ├── MASConstraint.h
│ │ │ │ ├── MASConstraint.m
│ │ │ │ ├── MASConstraintMaker.h
│ │ │ │ ├── MASConstraintMaker.m
│ │ │ │ ├── MASLayoutConstraint.h
│ │ │ │ ├── MASLayoutConstraint.m
│ │ │ │ ├── MASUtilities.h
│ │ │ │ ├── MASViewAttribute.h
│ │ │ │ ├── MASViewAttribute.m
│ │ │ │ ├── MASViewConstraint.h
│ │ │ │ ├── MASViewConstraint.m
│ │ │ │ ├── Masonry.h
│ │ │ │ ├── NSArray+MASAdditions.h
│ │ │ │ ├── NSArray+MASAdditions.m
│ │ │ │ ├── NSArray+MASShorthandAdditions.h
│ │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h
│ │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.m
│ │ │ │ ├── View+MASAdditions.h
│ │ │ │ ├── View+MASAdditions.m
│ │ │ │ ├── View+MASShorthandAdditions.h
│ │ │ │ ├── ViewController+MASAdditions.h
│ │ │ │ └── ViewController+MASAdditions.m
│ │ ├── NTESToastView.h
│ │ ├── NTESToastView.m
│ │ ├── UIImage+VerfityCodeDemo.h
│ │ ├── UIImage+VerfityCodeDemo.m
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ ├── face.gif
│ │ └── main.m
│ │ └── VerifyCodeDemoTests
│ │ └── VerifyCodeDemoTests.m
└── swift 版本
│ └── VerifyCodeDemo
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Pods
│ ├── Manifest.lock
│ ├── NTESVerifyCode
│ │ ├── Assets
│ │ │ └── NTESVerifyCodeResources.bundle
│ │ │ │ ├── Info.plist
│ │ │ │ ├── Rectangle@1x.png
│ │ │ │ ├── Rectangle@2x.png
│ │ │ │ ├── Rectangle@3x.png
│ │ │ │ ├── Rectangle_dark@1x.png
│ │ │ │ ├── Rectangle_dark@2x.png
│ │ │ │ ├── Rectangle_dark@3x.png
│ │ │ │ ├── bg@1x.png
│ │ │ │ ├── bg@2x.png
│ │ │ │ ├── bg@3x.png
│ │ │ │ ├── bg_dark@1x.png
│ │ │ │ ├── bg_dark@2x.png
│ │ │ │ ├── bg_dark@3x.png
│ │ │ │ ├── ico_close2@1x.png
│ │ │ │ ├── ico_close2@2x.png
│ │ │ │ ├── ico_close2@3x.png
│ │ │ │ ├── ico_error@1x.png
│ │ │ │ ├── ico_error@2x.png
│ │ │ │ ├── ico_error@3x.png
│ │ │ │ ├── ico_error_dark@1x.png
│ │ │ │ ├── ico_error_dark@2x.png
│ │ │ │ ├── ico_error_dark@3x.png
│ │ │ │ ├── ico_loading@1x.png
│ │ │ │ ├── ico_loading@2x.png
│ │ │ │ ├── ico_loading@3x.png
│ │ │ │ ├── icon_close_dark@1x.png
│ │ │ │ ├── icon_close_dark@2x.png
│ │ │ │ ├── icon_close_dark@3x.png
│ │ │ │ ├── loading.gif
│ │ │ │ └── mobile.v2.23.0.html
│ │ ├── Classes
│ │ │ └── VerifyCode.xcframework
│ │ │ │ ├── Info.plist
│ │ │ │ ├── ios-arm64_armv7
│ │ │ │ └── VerifyCode.framework
│ │ │ │ │ ├── Headers
│ │ │ │ │ ├── NTESVerifyCodeManager.h
│ │ │ │ │ ├── NTESVerifyCodeStyleConfig.h
│ │ │ │ │ └── VerifyCode.h
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── Modules
│ │ │ │ │ └── module.modulemap
│ │ │ │ │ ├── PrivacyInfo.xcprivacy
│ │ │ │ │ └── VerifyCode
│ │ │ │ └── ios-arm64_i386_x86_64-simulator
│ │ │ │ └── VerifyCode.framework
│ │ │ │ ├── Headers
│ │ │ │ ├── NTESVerifyCodeManager.h
│ │ │ │ ├── NTESVerifyCodeStyleConfig.h
│ │ │ │ └── VerifyCode.h
│ │ │ │ ├── Info.plist
│ │ │ │ ├── Modules
│ │ │ │ └── module.modulemap
│ │ │ │ ├── PrivacyInfo.xcprivacy
│ │ │ │ ├── VerifyCode
│ │ │ │ └── _CodeSignature
│ │ │ │ ├── CodeDirectory
│ │ │ │ ├── CodeRequirements
│ │ │ │ ├── CodeRequirements-1
│ │ │ │ ├── CodeResources
│ │ │ │ └── CodeSignature
│ │ └── README.md
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ │ └── luolihao.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── NTESVerifyCode.xcscheme
│ │ │ └── Pods-VerifyCodeDemo.xcscheme
│ └── Target Support Files
│ │ ├── NTESVerifyCode
│ │ ├── NTESVerifyCode-xcframeworks-input-files.xcfilelist
│ │ ├── NTESVerifyCode-xcframeworks-output-files.xcfilelist
│ │ ├── NTESVerifyCode-xcframeworks.sh
│ │ ├── NTESVerifyCode.debug.xcconfig
│ │ └── NTESVerifyCode.release.xcconfig
│ │ └── Pods-VerifyCodeDemo
│ │ ├── Pods-VerifyCodeDemo-acknowledgements.markdown
│ │ ├── Pods-VerifyCodeDemo-acknowledgements.plist
│ │ ├── Pods-VerifyCodeDemo-dummy.m
│ │ ├── Pods-VerifyCodeDemo-resources-Debug-input-files.xcfilelist
│ │ ├── Pods-VerifyCodeDemo-resources-Debug-output-files.xcfilelist
│ │ ├── Pods-VerifyCodeDemo-resources-Release-input-files.xcfilelist
│ │ ├── Pods-VerifyCodeDemo-resources-Release-output-files.xcfilelist
│ │ ├── Pods-VerifyCodeDemo-resources.sh
│ │ ├── Pods-VerifyCodeDemo.debug.xcconfig
│ │ └── Pods-VerifyCodeDemo.release.xcconfig
│ ├── VerifyCodeDemo.xcodeproj
│ └── project.pbxproj
│ ├── VerifyCodeDemo
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ └── ViewController.swift
│ ├── VerifyCodeDemoTests
│ └── VerifyCodeDemoTests.swift
│ └── VerifyCodeDemoUITests
│ ├── VerifyCodeDemoUITests.swift
│ └── VerifyCodeDemoUITestsLaunchTests.swift
├── README.md
└── screenshots
├── .DS_Store
├── dianxuan_cn.png
├── duanxin_cn.png
├── framework_path.jpg
├── init.jpg
├── tuodong_en.png
├── verify_dianxuan.jpg
├── verify_duanxin.jpg
├── verify_huakuai.jpg
├── verify_huankuai.jpg
└── verify_new.jpg
/.github/workflows/mirror.yml:
--------------------------------------------------------------------------------
1 | name: Mirror to Gitee
2 |
3 | on: push
4 |
5 | jobs:
6 |
7 | sync:
8 |
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 |
13 | - uses: actions/checkout@v1
14 |
15 | - uses: spyoungtech/mirror-action@master
16 |
17 | with:
18 |
19 | REMOTE: https://gitee.com/netease_yidun/captcha-ios-demo.git
20 |
21 | GIT_USERNAME: ${{ secrets.GITEE_USERNAME }}
22 |
23 | GIT_PASSWORD: ${{ secrets.GITEE_PASSWORD }}
24 |
--------------------------------------------------------------------------------
/Demo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/.DS_Store
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Podfile:
--------------------------------------------------------------------------------
1 | #platform
2 | platform :ios, '8.0'
3 |
4 | target 'VerifyCodeDemo' do
5 | pod 'NTESVerifyCode','3.5.9'
6 | end
7 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - NTESVerifyCode (3.5.9)
3 |
4 | DEPENDENCIES:
5 | - NTESVerifyCode (= 3.5.9)
6 |
7 | SPEC REPOS:
8 | trunk:
9 | - NTESVerifyCode
10 |
11 | SPEC CHECKSUMS:
12 | NTESVerifyCode: 2af7f9c8bcc760ee6dcd05a6427baec2f9d7bdda
13 |
14 | PODFILE CHECKSUM: d2454f066ba60bed7c3cd50bb1965086ca720275
15 |
16 | COCOAPODS: 1.13.0
17 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - NTESVerifyCode (3.5.9)
3 |
4 | DEPENDENCIES:
5 | - NTESVerifyCode (= 3.5.9)
6 |
7 | SPEC REPOS:
8 | trunk:
9 | - NTESVerifyCode
10 |
11 | SPEC CHECKSUMS:
12 | NTESVerifyCode: 2af7f9c8bcc760ee6dcd05a6427baec2f9d7bdda
13 |
14 | PODFILE CHECKSUM: d2454f066ba60bed7c3cd50bb1965086ca720275
15 |
16 | COCOAPODS: 1.13.0
17 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Info.plist
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@1x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@2x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@3x.png
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/loading.gif
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AvailableLibraries
6 |
7 |
8 | LibraryIdentifier
9 | ios-arm64_armv7
10 | LibraryPath
11 | VerifyCode.framework
12 | SupportedArchitectures
13 |
14 | arm64
15 | armv7
16 |
17 | SupportedPlatform
18 | ios
19 |
20 |
21 | LibraryIdentifier
22 | ios-arm64_i386_x86_64-simulator
23 | LibraryPath
24 | VerifyCode.framework
25 | SupportedArchitectures
26 |
27 | arm64
28 | i386
29 | x86_64
30 |
31 | SupportedPlatform
32 | ios
33 | SupportedPlatformVariant
34 | simulator
35 |
36 |
37 | CFBundlePackageType
38 | XFWK
39 | XCFrameworkFormatVersion
40 | 1.0
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Headers/NTESVerifyCodeStyleConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESVerifyCodeStyleConfig.h
3 | // NTESVerifyCode
4 | //
5 | // Created by 罗礼豪 on 2022/6/20.
6 | // Copyright © 2022 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef NS_ENUM(NSUInteger, NTESCapBarTextAlign) {
14 | NTESCapBarTextAlignLeft = 1,
15 | NTESCapBarTextAlignRight,
16 | NTESCapBarTextAlignCenter,
17 | };
18 |
19 | @interface NTESVerifyCodeStyleConfig : NSObject
20 |
21 | // 验证码圆角
22 | @property (nonatomic, assign) NSUInteger radius;
23 |
24 | // 验证码弹框边框颜色,想要去掉的话可取 transparent 或者与背景色同色
25 | @property (nonatomic, copy) NSString *verifyBorderColor;
26 |
27 | #pragma mark 验证码标题样式
28 |
29 | // 弹框头部标题文字对齐方式,可选值为 left center right
30 | @property (nonatomic, assign) NTESCapBarTextAlign capBarTextAlign;
31 |
32 | // 弹框头部下边框颜色,想要去掉的话可取 transparent 或者与背景色同色 #fff
33 | @property (nonatomic, copy) NSString *capBarBorderColor;
34 |
35 | // 弹框头部标题文字颜色
36 | @property (nonatomic, copy) NSString *capBarTextColor;
37 |
38 | // 弹框头部标题文字字体大小
39 | @property (nonatomic, assign) NSUInteger capBarTextSize;
40 |
41 | /**
42 | 弹框头部标题文字字体体重,可设置粗细,
43 | 参考:capBarTextWeight: normal、bold、lighter、bolder、100、200、300、400、500、600、700、800、900
44 | 更多详情参考:https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
45 | */
46 | @property (nonatomic, copy) NSString *capBarTextWeight;
47 |
48 | // 弹框头部标题所在容器高度
49 | @property (nonatomic, assign) NSUInteger capBarTitleHeight;
50 |
51 | // 验证码弹框 body 部分的内边距,相当于总体设置 capPaddingTop,capPaddingRight,capPaddingBottom,capPaddingLeft
52 | @property (nonatomic, assign) NSUInteger capBodyPadding;
53 |
54 | #pragma mark 验证码弹框body样式
55 |
56 | // 验证码弹框 body 部分的【上】内边距,覆盖 capPadding 对于上内边距的设置,单位px
57 | @property (nonatomic, copy) NSString *capPaddingTop;
58 |
59 | // 验证码弹框 body 部分的【右】内边距,覆盖 capPadding 对于右内边距的设置,单位px
60 | @property (nonatomic, copy) NSString *capPaddingRight;
61 |
62 | // 验证码弹框 body 部分的【底】内边距,覆盖 capPadding 对于底内边距的设置,单位px
63 | @property (nonatomic, copy) NSString *capPaddingBottom;
64 |
65 | // 验证码弹框 body 部分的【左】内边距,覆盖 capPadding 对于左内边距的设置,单位px
66 | @property (nonatomic, copy) NSString *capPaddingLeft;
67 |
68 | // 弹框【上】内边距,实践时候可与 capPaddingTop 配合,单位px
69 | @property (nonatomic, copy) NSString *paddingTop;
70 |
71 | // 弹框【下】内边距,实践时候可与 capPaddingBottom 配合,单位px
72 | @property (nonatomic, copy) NSString *paddingBottom;
73 |
74 | // 验证码弹框body圆角
75 | @property (nonatomic, assign) NSUInteger capBorderRadius;
76 |
77 | #pragma mark 验证码滑块样式
78 |
79 | // 滑块的边框颜色
80 | @property (nonatomic, copy) NSString *borderColor;
81 |
82 | // 滑块的背景颜色
83 | @property (nonatomic, copy) NSString *background;
84 |
85 | // 滑块的滑动时边框颜色,滑动类型验证码下有效
86 | @property (nonatomic, copy) NSString *borderColorMoving;
87 |
88 | // 滑块的滑动时背景颜色,滑动类型验证码下有效
89 | @property (nonatomic, copy) NSString *backgroundMoving;
90 |
91 | // 滑块的成功时边框颜色,此颜色同步了文字成功时文字颜色、滑块背景颜色
92 | @property (nonatomic, copy) NSString *borderColorSuccess;
93 |
94 | // 滑块的成功时背景颜色
95 | @property (nonatomic, copy) NSString *backgroundSuccess;
96 |
97 | // 滑块的失败时背景颜色
98 | @property (nonatomic, copy) NSString *backgroundError;
99 |
100 | // 失败时边框颜色
101 | @property (nonatomic, copy) NSString *borderColorError;
102 |
103 | // 滑块的滑块背景颜色
104 | @property (nonatomic, copy) NSString *slideBackground;
105 |
106 | // 滑块的内容文本大小
107 | @property (nonatomic, assign) NSUInteger textSize;
108 |
109 | // 滑块内容文本颜色(滑块滑动前的颜色,失败、成功前的颜色)
110 | @property (nonatomic, copy) NSString *textColor;
111 |
112 | // 滑块的高度
113 | @property (nonatomic, assign) NSUInteger height;
114 |
115 | // 滑块的圆角
116 | @property (nonatomic, assign) NSUInteger borderRadius;
117 |
118 | // 滑块与验证码视图之间的距离,单位px
119 | @property (nonatomic, copy) NSString *gap;
120 |
121 | // 滑块文案描述。默认:向右拖动滑块填充拼图。
122 | @property (nonatomic, copy) NSString *slideTip;
123 |
124 | // 左边距,如果相对于整个 bar 居中提示文字,设为 0;
125 | @property (nonatomic, copy) NSString *paddingLeft;
126 |
127 | // 加载中时的背景图片地址,需要填入一个 url
128 | @property (nonatomic, copy) NSString *loadBackgroundImage;
129 |
130 | // 加载中时的背景颜色,支持 CSS 所有颜色值
131 | @property (nonatomic, copy) NSString *loadBackgroundColor;
132 |
133 |
134 | #pragma mark 验证码右上方刷新按钮和语音按钮组成组件
135 |
136 | // 组件圆角大小
137 | @property (nonatomic, assign) NSUInteger executeBorderRadius;
138 |
139 | // 组件背景色
140 | @property (nonatomic, copy) NSString *executeBackground;
141 |
142 | // 组件外层容器距离组件顶部距离,单位px
143 | @property (nonatomic, copy) NSString *executeTop;
144 |
145 | // 组件外层容器距离组件右侧距离,单位px
146 | @property (nonatomic, copy) NSString *executeRight;
147 |
148 | @end
149 |
150 | NS_ASSUME_NONNULL_END
151 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Info.plist
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module VerifyCode {
2 | umbrella header "VerifyCode.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/VerifyCode:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/VerifyCode
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Headers/NTESVerifyCodeStyleConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESVerifyCodeStyleConfig.h
3 | // NTESVerifyCode
4 | //
5 | // Created by 罗礼豪 on 2022/6/20.
6 | // Copyright © 2022 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef NS_ENUM(NSUInteger, NTESCapBarTextAlign) {
14 | NTESCapBarTextAlignLeft = 1,
15 | NTESCapBarTextAlignRight,
16 | NTESCapBarTextAlignCenter,
17 | };
18 |
19 | @interface NTESVerifyCodeStyleConfig : NSObject
20 |
21 | // 验证码圆角
22 | @property (nonatomic, assign) NSUInteger radius;
23 |
24 | // 验证码弹框边框颜色,想要去掉的话可取 transparent 或者与背景色同色
25 | @property (nonatomic, copy) NSString *verifyBorderColor;
26 |
27 | #pragma mark 验证码标题样式
28 |
29 | // 弹框头部标题文字对齐方式,可选值为 left center right
30 | @property (nonatomic, assign) NTESCapBarTextAlign capBarTextAlign;
31 |
32 | // 弹框头部下边框颜色,想要去掉的话可取 transparent 或者与背景色同色 #fff
33 | @property (nonatomic, copy) NSString *capBarBorderColor;
34 |
35 | // 弹框头部标题文字颜色
36 | @property (nonatomic, copy) NSString *capBarTextColor;
37 |
38 | // 弹框头部标题文字字体大小
39 | @property (nonatomic, assign) NSUInteger capBarTextSize;
40 |
41 | /**
42 | 弹框头部标题文字字体体重,可设置粗细,
43 | 参考:capBarTextWeight: normal、bold、lighter、bolder、100、200、300、400、500、600、700、800、900
44 | 更多详情参考:https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
45 | */
46 | @property (nonatomic, copy) NSString *capBarTextWeight;
47 |
48 | // 弹框头部标题所在容器高度
49 | @property (nonatomic, assign) NSUInteger capBarTitleHeight;
50 |
51 | // 验证码弹框 body 部分的内边距,相当于总体设置 capPaddingTop,capPaddingRight,capPaddingBottom,capPaddingLeft
52 | @property (nonatomic, assign) NSUInteger capBodyPadding;
53 |
54 | #pragma mark 验证码弹框body样式
55 |
56 | // 验证码弹框 body 部分的【上】内边距,覆盖 capPadding 对于上内边距的设置,单位px
57 | @property (nonatomic, copy) NSString *capPaddingTop;
58 |
59 | // 验证码弹框 body 部分的【右】内边距,覆盖 capPadding 对于右内边距的设置,单位px
60 | @property (nonatomic, copy) NSString *capPaddingRight;
61 |
62 | // 验证码弹框 body 部分的【底】内边距,覆盖 capPadding 对于底内边距的设置,单位px
63 | @property (nonatomic, copy) NSString *capPaddingBottom;
64 |
65 | // 验证码弹框 body 部分的【左】内边距,覆盖 capPadding 对于左内边距的设置,单位px
66 | @property (nonatomic, copy) NSString *capPaddingLeft;
67 |
68 | // 弹框【上】内边距,实践时候可与 capPaddingTop 配合,单位px
69 | @property (nonatomic, copy) NSString *paddingTop;
70 |
71 | // 弹框【下】内边距,实践时候可与 capPaddingBottom 配合,单位px
72 | @property (nonatomic, copy) NSString *paddingBottom;
73 |
74 | // 验证码弹框body圆角
75 | @property (nonatomic, assign) NSUInteger capBorderRadius;
76 |
77 | #pragma mark 验证码滑块样式
78 |
79 | // 滑块的边框颜色
80 | @property (nonatomic, copy) NSString *borderColor;
81 |
82 | // 滑块的背景颜色
83 | @property (nonatomic, copy) NSString *background;
84 |
85 | // 滑块的滑动时边框颜色,滑动类型验证码下有效
86 | @property (nonatomic, copy) NSString *borderColorMoving;
87 |
88 | // 滑块的滑动时背景颜色,滑动类型验证码下有效
89 | @property (nonatomic, copy) NSString *backgroundMoving;
90 |
91 | // 滑块的成功时边框颜色,此颜色同步了文字成功时文字颜色、滑块背景颜色
92 | @property (nonatomic, copy) NSString *borderColorSuccess;
93 |
94 | // 滑块的成功时背景颜色
95 | @property (nonatomic, copy) NSString *backgroundSuccess;
96 |
97 | // 滑块的失败时背景颜色
98 | @property (nonatomic, copy) NSString *backgroundError;
99 |
100 | // 失败时边框颜色
101 | @property (nonatomic, copy) NSString *borderColorError;
102 |
103 | // 滑块的滑块背景颜色
104 | @property (nonatomic, copy) NSString *slideBackground;
105 |
106 | // 滑块的内容文本大小
107 | @property (nonatomic, assign) NSUInteger textSize;
108 |
109 | // 滑块内容文本颜色(滑块滑动前的颜色,失败、成功前的颜色)
110 | @property (nonatomic, copy) NSString *textColor;
111 |
112 | // 滑块的高度
113 | @property (nonatomic, assign) NSUInteger height;
114 |
115 | // 滑块的圆角
116 | @property (nonatomic, assign) NSUInteger borderRadius;
117 |
118 | // 滑块与验证码视图之间的距离,单位px
119 | @property (nonatomic, copy) NSString *gap;
120 |
121 | // 滑块文案描述。默认:向右拖动滑块填充拼图。
122 | @property (nonatomic, copy) NSString *slideTip;
123 |
124 | // 左边距,如果相对于整个 bar 居中提示文字,设为 0;
125 | @property (nonatomic, copy) NSString *paddingLeft;
126 |
127 | // 加载中时的背景图片地址,需要填入一个 url
128 | @property (nonatomic, copy) NSString *loadBackgroundImage;
129 |
130 | // 加载中时的背景颜色,支持 CSS 所有颜色值
131 | @property (nonatomic, copy) NSString *loadBackgroundColor;
132 |
133 |
134 | #pragma mark 验证码右上方刷新按钮和语音按钮组成组件
135 |
136 | // 组件圆角大小
137 | @property (nonatomic, assign) NSUInteger executeBorderRadius;
138 |
139 | // 组件背景色
140 | @property (nonatomic, copy) NSString *executeBackground;
141 |
142 | // 组件外层容器距离组件顶部距离,单位px
143 | @property (nonatomic, copy) NSString *executeTop;
144 |
145 | // 组件外层容器距离组件右侧距离,单位px
146 | @property (nonatomic, copy) NSString *executeRight;
147 |
148 | @end
149 |
150 | NS_ASSUME_NONNULL_END
151 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Info.plist
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module VerifyCode {
2 | umbrella header "VerifyCode.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/VerifyCode:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/VerifyCode
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeDirectory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeDirectory
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements-1
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | Headers/NTESVerifyCodeManager.h
8 |
9 | AqqPo8C2Ax1EIf0eS22X3MdalpM=
10 |
11 | Headers/NTESVerifyCodeStyleConfig.h
12 |
13 | qG4mQaBz49QTQaFzADb3Ttk/7hM=
14 |
15 | Info.plist
16 |
17 | zMPOI5O46osKyFaF4zw0K1r/Mhs=
18 |
19 | Modules/module.modulemap
20 |
21 | UnG8ccsrMC18iCqjc2k5RIy4fhk=
22 |
23 |
24 | files2
25 |
26 | Headers/NTESVerifyCodeManager.h
27 |
28 | hash
29 |
30 | AqqPo8C2Ax1EIf0eS22X3MdalpM=
31 |
32 | hash2
33 |
34 | RCMwwuY3pTTfhPm5DhyJYblqQhuG5/5apU8bnJR5asM=
35 |
36 |
37 | Headers/NTESVerifyCodeStyleConfig.h
38 |
39 | hash
40 |
41 | qG4mQaBz49QTQaFzADb3Ttk/7hM=
42 |
43 | hash2
44 |
45 | s80i1XA+V/0V3rUJMhxypPLIuJXw9rVyDsqSL6T4EyM=
46 |
47 |
48 | Modules/module.modulemap
49 |
50 | hash
51 |
52 | UnG8ccsrMC18iCqjc2k5RIy4fhk=
53 |
54 | hash2
55 |
56 | XZqbyZ/vAhdkIz3crYYJ4BT/tWRyz+BGx1Vl55/i6KI=
57 |
58 |
59 |
60 | rules
61 |
62 | ^.*
63 |
64 | ^.*\.lproj/
65 |
66 | optional
67 |
68 | weight
69 | 1000
70 |
71 | ^.*\.lproj/locversion.plist$
72 |
73 | omit
74 |
75 | weight
76 | 1100
77 |
78 | ^Base\.lproj/
79 |
80 | weight
81 | 1010
82 |
83 | ^version.plist$
84 |
85 |
86 | rules2
87 |
88 | .*\.dSYM($|/)
89 |
90 | weight
91 | 11
92 |
93 | ^(.*/)?\.DS_Store$
94 |
95 | omit
96 |
97 | weight
98 | 2000
99 |
100 | ^.*
101 |
102 | ^.*\.lproj/
103 |
104 | optional
105 |
106 | weight
107 | 1000
108 |
109 | ^.*\.lproj/locversion.plist$
110 |
111 | omit
112 |
113 | weight
114 | 1100
115 |
116 | ^Base\.lproj/
117 |
118 | weight
119 | 1010
120 |
121 | ^Info\.plist$
122 |
123 | omit
124 |
125 | weight
126 | 20
127 |
128 | ^PkgInfo$
129 |
130 | omit
131 |
132 | weight
133 | 20
134 |
135 | ^embedded\.provisionprofile$
136 |
137 | weight
138 | 20
139 |
140 | ^version\.plist$
141 |
142 | weight
143 | 20
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeSignature:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeSignature
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Pods.xcodeproj/xcuserdata/luolihao.xcuserdatad/xcschemes/NTESVerifyCode.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
53 |
54 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Pods.xcodeproj/xcuserdata/luolihao.xcuserdatad/xcschemes/Pods-VerifyCodeDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
53 |
54 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode-xcframeworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 |
12 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
13 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
14 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
15 |
16 |
17 | variant_for_slice()
18 | {
19 | case "$1" in
20 | "VerifyCode.xcframework/ios-arm64_armv7")
21 | echo ""
22 | ;;
23 | "VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator")
24 | echo "simulator"
25 | ;;
26 | esac
27 | }
28 |
29 | archs_for_slice()
30 | {
31 | case "$1" in
32 | "VerifyCode.xcframework/ios-arm64_armv7")
33 | echo "arm64 armv7"
34 | ;;
35 | "VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator")
36 | echo "arm64 i386 x86_64"
37 | ;;
38 | esac
39 | }
40 |
41 | copy_dir()
42 | {
43 | local source="$1"
44 | local destination="$2"
45 |
46 | # Use filter instead of exclude so missing patterns don't throw errors.
47 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}*\" \"${destination}\""
48 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}"
49 | }
50 |
51 | SELECT_SLICE_RETVAL=""
52 |
53 | select_slice() {
54 | local xcframework_name="$1"
55 | xcframework_name="${xcframework_name##*/}"
56 | local paths=("${@:2}")
57 | # Locate the correct slice of the .xcframework for the current architectures
58 | local target_path=""
59 |
60 | # Split archs on space so we can find a slice that has all the needed archs
61 | local target_archs=$(echo $ARCHS | tr " " "\n")
62 |
63 | local target_variant=""
64 | if [[ "$PLATFORM_NAME" == *"simulator" ]]; then
65 | target_variant="simulator"
66 | fi
67 | if [[ ! -z ${EFFECTIVE_PLATFORM_NAME+x} && "$EFFECTIVE_PLATFORM_NAME" == *"maccatalyst" ]]; then
68 | target_variant="maccatalyst"
69 | fi
70 | for i in ${!paths[@]}; do
71 | local matched_all_archs="1"
72 | local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")"
73 | local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")"
74 | for target_arch in $target_archs; do
75 | if ! [[ "${slice_variant}" == "$target_variant" ]]; then
76 | matched_all_archs="0"
77 | break
78 | fi
79 |
80 | if ! echo "${slice_archs}" | tr " " "\n" | grep -F -q -x "$target_arch"; then
81 | matched_all_archs="0"
82 | break
83 | fi
84 | done
85 |
86 | if [[ "$matched_all_archs" == "1" ]]; then
87 | # Found a matching slice
88 | echo "Selected xcframework slice ${paths[$i]}"
89 | SELECT_SLICE_RETVAL=${paths[$i]}
90 | break
91 | fi
92 | done
93 | }
94 |
95 | install_xcframework() {
96 | local basepath="$1"
97 | local name="$2"
98 | local package_type="$3"
99 | local paths=("${@:4}")
100 |
101 | # Locate the correct slice of the .xcframework for the current architectures
102 | select_slice "${basepath}" "${paths[@]}"
103 | local target_path="$SELECT_SLICE_RETVAL"
104 | if [[ -z "$target_path" ]]; then
105 | echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})."
106 | return
107 | fi
108 | local source="$basepath/$target_path"
109 |
110 | local destination="${PODS_XCFRAMEWORKS_BUILD_DIR}/${name}"
111 |
112 | if [ ! -d "$destination" ]; then
113 | mkdir -p "$destination"
114 | fi
115 |
116 | copy_dir "$source/" "$destination"
117 | echo "Copied $source to $destination"
118 | }
119 |
120 | install_xcframework "${PODS_ROOT}/NTESVerifyCode/Classes/VerifyCode.xcframework" "NTESVerifyCode" "framework" "ios-arm64_armv7" "ios-arm64_i386_x86_64-simulator"
121 |
122 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NTESVerifyCode
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/NTESVerifyCode
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NTESVerifyCode
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/NTESVerifyCode
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_VerifyCodeDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_VerifyCodeDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
12 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # resources to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
18 |
19 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
20 | > "$RESOURCES_TO_COPY"
21 |
22 | XCASSET_FILES=()
23 |
24 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
25 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
26 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
27 |
28 | case "${TARGETED_DEVICE_FAMILY:-}" in
29 | 1,2)
30 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
31 | ;;
32 | 1)
33 | TARGET_DEVICE_ARGS="--target-device iphone"
34 | ;;
35 | 2)
36 | TARGET_DEVICE_ARGS="--target-device ipad"
37 | ;;
38 | 3)
39 | TARGET_DEVICE_ARGS="--target-device tv"
40 | ;;
41 | 4)
42 | TARGET_DEVICE_ARGS="--target-device watch"
43 | ;;
44 | *)
45 | TARGET_DEVICE_ARGS="--target-device mac"
46 | ;;
47 | esac
48 |
49 | install_resource()
50 | {
51 | if [[ "$1" = /* ]] ; then
52 | RESOURCE_PATH="$1"
53 | else
54 | RESOURCE_PATH="${PODS_ROOT}/$1"
55 | fi
56 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
57 | cat << EOM
58 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
59 | EOM
60 | exit 1
61 | fi
62 | case $RESOURCE_PATH in
63 | *.storyboard)
64 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
65 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
66 | ;;
67 | *.xib)
68 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
69 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
70 | ;;
71 | *.framework)
72 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
73 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
74 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
75 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
76 | ;;
77 | *.xcdatamodel)
78 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
79 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
80 | ;;
81 | *.xcdatamodeld)
82 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
83 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
84 | ;;
85 | *.xcmappingmodel)
86 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
87 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
88 | ;;
89 | *.xcassets)
90 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
91 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
92 | ;;
93 | *)
94 | echo "$RESOURCE_PATH" || true
95 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
96 | ;;
97 | esac
98 | }
99 | if [[ "$CONFIGURATION" == "Debug" ]]; then
100 | install_resource "${PODS_ROOT}/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle"
101 | fi
102 | if [[ "$CONFIGURATION" == "Release" ]]; then
103 | install_resource "${PODS_ROOT}/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle"
104 | fi
105 |
106 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
107 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
108 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
109 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
110 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
111 | fi
112 | rm -f "$RESOURCES_TO_COPY"
113 |
114 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
115 | then
116 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
117 | OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d)
118 | while read line; do
119 | if [[ $line != "${PODS_ROOT}*" ]]; then
120 | XCASSET_FILES+=("$line")
121 | fi
122 | done <<<"$OTHER_XCASSETS"
123 |
124 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
125 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
126 | else
127 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
128 | fi
129 | fi
130 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "JavaScriptCore" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "VerifyCode" -framework "WebKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "JavaScriptCore" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "VerifyCode" -framework "WebKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo.xcodeproj/xcshareddata/xcschemes/VerifyCodeDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo.xcodeproj/xcuserdata/netease.xcuserdatad/xcschemes/VerifyCodeDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // VerifyCodeDemo
4 | //
5 | // Created by NetEase on 17/1/3.
6 | // Copyright © 2017年 NetEase. 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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // VerifyCodeDemo
4 | //
5 | // Created by NetEase on 17/1/3.
6 | // Copyright © 2017年 NetEase. 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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 |
27 |
28 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIMainStoryboardFile
6 | Main
7 | CFBundleDisplayName
8 | NTESQuickPassPublicDemo
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSAllowsArbitraryLoads
28 |
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UIStatusBarStyle
37 | UIStatusBarStyleDarkContent
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationPortraitUpsideDown
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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)setOffset:(CGFloat)offset {
133 | for (MASConstraint *constraint in self.childConstraints) {
134 | constraint.offset = offset;
135 | }
136 | }
137 |
138 | - (void)setSizeOffset:(CGSize)sizeOffset {
139 | for (MASConstraint *constraint in self.childConstraints) {
140 | constraint.sizeOffset = sizeOffset;
141 | }
142 | }
143 |
144 | - (void)setCenterOffset:(CGPoint)centerOffset {
145 | for (MASConstraint *constraint in self.childConstraints) {
146 | constraint.centerOffset = centerOffset;
147 | }
148 | }
149 |
150 | #pragma mark - MASConstraint
151 |
152 | - (void)activate {
153 | for (MASConstraint *constraint in self.childConstraints) {
154 | [constraint activate];
155 | }
156 | }
157 |
158 | - (void)deactivate {
159 | for (MASConstraint *constraint in self.childConstraints) {
160 | [constraint deactivate];
161 | }
162 | }
163 |
164 | - (void)install {
165 | for (MASConstraint *constraint in self.childConstraints) {
166 | constraint.updateExisting = self.updateExisting;
167 | [constraint install];
168 | }
169 | }
170 |
171 | - (void)uninstall {
172 | for (MASConstraint *constraint in self.childConstraints) {
173 | [constraint uninstall];
174 | }
175 | }
176 |
177 | @end
178 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/MASConstraintMaker.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraintBuilder.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 TARGET_OS_IPHONE || TARGET_OS_TV
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 TARGET_OS_IPHONE || TARGET_OS_TV
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 MASConstrait 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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/MASUtilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASUtilities.h
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 19/08/13.
6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 |
13 | #if TARGET_OS_IPHONE || TARGET_OS_TV
14 |
15 | #import
16 | #define MAS_VIEW UIView
17 | #define MAS_VIEW_CONTROLLER UIViewController
18 | #define MASEdgeInsets UIEdgeInsets
19 |
20 | typedef UILayoutPriority MASLayoutPriority;
21 | static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired;
22 | static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh;
23 | static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500;
24 | static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow;
25 | static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel;
26 |
27 | #elif TARGET_OS_MAC
28 |
29 | #import
30 | #define MAS_VIEW NSView
31 | #define MASEdgeInsets NSEdgeInsets
32 |
33 | typedef NSLayoutPriority MASLayoutPriority;
34 | static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired;
35 | static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh;
36 | static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow;
37 | static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501;
38 | static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut;
39 | static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow;
40 | static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow;
41 | static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression;
42 |
43 | #endif
44 |
45 | /**
46 | * Allows you to attach keys to objects matching the variable names passed.
47 | *
48 | * view1.mas_key = @"view1", view2.mas_key = @"view2";
49 | *
50 | * is equivalent to:
51 | *
52 | * MASAttachKeys(view1, view2);
53 | */
54 | #define MASAttachKeys(...) \
55 | { \
56 | NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \
57 | for (id key in keyPairs.allKeys) { \
58 | id obj = keyPairs[key]; \
59 | NSAssert([obj respondsToSelector:@selector(setMas_key:)], \
60 | @"Cannot attach mas_key to %@", obj); \
61 | [obj setMas_key:key]; \
62 | } \
63 | }
64 |
65 | /**
66 | * Used to create object hashes
67 | * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html
68 | */
69 | #define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger))
70 | #define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch)))
71 |
72 | /**
73 | * Given a scalar or struct value, wraps it in NSValue
74 | * Based on EXPObjectify: https://github.com/specta/expecta
75 | */
76 | static inline id _MASBoxValue(const char *type, ...) {
77 | va_list v;
78 | va_start(v, type);
79 | id obj = nil;
80 | if (strcmp(type, @encode(id)) == 0) {
81 | id actual = va_arg(v, id);
82 | obj = actual;
83 | } else if (strcmp(type, @encode(CGPoint)) == 0) {
84 | CGPoint actual = (CGPoint)va_arg(v, CGPoint);
85 | obj = [NSValue value:&actual withObjCType:type];
86 | } else if (strcmp(type, @encode(CGSize)) == 0) {
87 | CGSize actual = (CGSize)va_arg(v, CGSize);
88 | obj = [NSValue value:&actual withObjCType:type];
89 | } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) {
90 | MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets);
91 | obj = [NSValue value:&actual withObjCType:type];
92 | } else if (strcmp(type, @encode(double)) == 0) {
93 | double actual = (double)va_arg(v, double);
94 | obj = [NSNumber numberWithDouble:actual];
95 | } else if (strcmp(type, @encode(float)) == 0) {
96 | float actual = (float)va_arg(v, double);
97 | obj = [NSNumber numberWithFloat:actual];
98 | } else if (strcmp(type, @encode(int)) == 0) {
99 | int actual = (int)va_arg(v, int);
100 | obj = [NSNumber numberWithInt:actual];
101 | } else if (strcmp(type, @encode(long)) == 0) {
102 | long actual = (long)va_arg(v, long);
103 | obj = [NSNumber numberWithLong:actual];
104 | } else if (strcmp(type, @encode(long long)) == 0) {
105 | long long actual = (long long)va_arg(v, long long);
106 | obj = [NSNumber numberWithLongLong:actual];
107 | } else if (strcmp(type, @encode(short)) == 0) {
108 | short actual = (short)va_arg(v, int);
109 | obj = [NSNumber numberWithShort:actual];
110 | } else if (strcmp(type, @encode(char)) == 0) {
111 | char actual = (char)va_arg(v, int);
112 | obj = [NSNumber numberWithChar:actual];
113 | } else if (strcmp(type, @encode(bool)) == 0) {
114 | bool actual = (bool)va_arg(v, int);
115 | obj = [NSNumber numberWithBool:actual];
116 | } else if (strcmp(type, @encode(unsigned char)) == 0) {
117 | unsigned char actual = (unsigned char)va_arg(v, unsigned int);
118 | obj = [NSNumber numberWithUnsignedChar:actual];
119 | } else if (strcmp(type, @encode(unsigned int)) == 0) {
120 | unsigned int actual = (unsigned int)va_arg(v, unsigned int);
121 | obj = [NSNumber numberWithUnsignedInt:actual];
122 | } else if (strcmp(type, @encode(unsigned long)) == 0) {
123 | unsigned long actual = (unsigned long)va_arg(v, unsigned long);
124 | obj = [NSNumber numberWithUnsignedLong:actual];
125 | } else if (strcmp(type, @encode(unsigned long long)) == 0) {
126 | unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long);
127 | obj = [NSNumber numberWithUnsignedLongLong:actual];
128 | } else if (strcmp(type, @encode(unsigned short)) == 0) {
129 | unsigned short actual = (unsigned short)va_arg(v, unsigned int);
130 | obj = [NSNumber numberWithUnsignedShort:actual];
131 | }
132 | va_end(v);
133 | return obj;
134 | }
135 |
136 | #define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value))
137 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/MASViewAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/MASViewAttribute.m:
--------------------------------------------------------------------------------
1 | //
2 | // MASAttribute.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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/MASViewConstraint.h:
--------------------------------------------------------------------------------
1 | //
2 | // MASConstraint.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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 (^)(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 (^)(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 (^)(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 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/NSArray+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MASAdditions.m
3 | //
4 | //
5 | // Created by Daniel Hammond on 11/26/13.
6 | //
7 | //
8 |
9 | #import "NSArray+MASAdditions.h"
10 | #import "View+MASAdditions.h"
11 |
12 | @implementation NSArray (MASAdditions)
13 |
14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block {
15 | NSMutableArray *constraints = [NSMutableArray array];
16 | for (MAS_VIEW *view in self) {
17 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
18 | [constraints addObjectsFromArray:[view mas_makeConstraints:block]];
19 | }
20 | return constraints;
21 | }
22 |
23 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block {
24 | NSMutableArray *constraints = [NSMutableArray array];
25 | for (MAS_VIEW *view in self) {
26 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
27 | [constraints addObjectsFromArray:[view mas_updateConstraints:block]];
28 | }
29 | return constraints;
30 | }
31 |
32 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
33 | NSMutableArray *constraints = [NSMutableArray array];
34 | for (MAS_VIEW *view in self) {
35 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views");
36 | [constraints addObjectsFromArray:[view mas_remakeConstraints:block]];
37 | }
38 | return constraints;
39 | }
40 |
41 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
42 | if (self.count < 2) {
43 | NSAssert(self.count>1,@"views to distribute need to bigger than one");
44 | return;
45 | }
46 |
47 | MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
48 | if (axisType == MASAxisTypeHorizontal) {
49 | MAS_VIEW *prev;
50 | for (int i = 0; i < self.count; i++) {
51 | MAS_VIEW *v = self[i];
52 | [v mas_makeConstraints:^(MASConstraintMaker *make) {
53 | if (prev) {
54 | make.width.equalTo(prev);
55 | make.left.equalTo(prev.mas_right).offset(fixedSpacing);
56 | if (i == self.count - 1) {//last one
57 | make.right.equalTo(tempSuperView).offset(-tailSpacing);
58 | }
59 | }
60 | else {//first one
61 | make.left.equalTo(tempSuperView).offset(leadSpacing);
62 | }
63 |
64 | }];
65 | prev = v;
66 | }
67 | }
68 | else {
69 | MAS_VIEW *prev;
70 | for (int i = 0; i < self.count; i++) {
71 | MAS_VIEW *v = self[i];
72 | [v mas_makeConstraints:^(MASConstraintMaker *make) {
73 | if (prev) {
74 | make.height.equalTo(prev);
75 | make.top.equalTo(prev.mas_bottom).offset(fixedSpacing);
76 | if (i == self.count - 1) {//last one
77 | make.bottom.equalTo(tempSuperView).offset(-tailSpacing);
78 | }
79 | }
80 | else {//first one
81 | make.top.equalTo(tempSuperView).offset(leadSpacing);
82 | }
83 |
84 | }];
85 | prev = v;
86 | }
87 | }
88 | }
89 |
90 | - (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
91 | if (self.count < 2) {
92 | NSAssert(self.count>1,@"views to distribute need to bigger than one");
93 | return;
94 | }
95 |
96 | MAS_VIEW *tempSuperView = [self mas_commonSuperviewOfViews];
97 | if (axisType == MASAxisTypeHorizontal) {
98 | MAS_VIEW *prev;
99 | for (int i = 0; i < self.count; i++) {
100 | MAS_VIEW *v = self[i];
101 | [v mas_makeConstraints:^(MASConstraintMaker *make) {
102 | make.width.equalTo(@(fixedItemLength));
103 | if (prev) {
104 | if (i == self.count - 1) {//last one
105 | make.right.equalTo(tempSuperView).offset(-tailSpacing);
106 | }
107 | else {
108 | CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1));
109 | make.right.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset);
110 | }
111 | }
112 | else {//first one
113 | make.left.equalTo(tempSuperView).offset(leadSpacing);
114 | }
115 | }];
116 | prev = v;
117 | }
118 | }
119 | else {
120 | MAS_VIEW *prev;
121 | for (int i = 0; i < self.count; i++) {
122 | MAS_VIEW *v = self[i];
123 | [v mas_makeConstraints:^(MASConstraintMaker *make) {
124 | make.height.equalTo(@(fixedItemLength));
125 | if (prev) {
126 | if (i == self.count - 1) {//last one
127 | make.bottom.equalTo(tempSuperView).offset(-tailSpacing);
128 | }
129 | else {
130 | CGFloat offset = (1-(i/((CGFloat)self.count-1)))*(fixedItemLength+leadSpacing)-i*tailSpacing/(((CGFloat)self.count-1));
131 | make.bottom.equalTo(tempSuperView).multipliedBy(i/((CGFloat)self.count-1)).with.offset(offset);
132 | }
133 | }
134 | else {//first one
135 | make.top.equalTo(tempSuperView).offset(leadSpacing);
136 | }
137 | }];
138 | prev = v;
139 | }
140 | }
141 | }
142 |
143 | - (MAS_VIEW *)mas_commonSuperviewOfViews
144 | {
145 | MAS_VIEW *commonSuperview = nil;
146 | MAS_VIEW *previousView = nil;
147 | for (id object in self) {
148 | if ([object isKindOfClass:[MAS_VIEW class]]) {
149 | MAS_VIEW *view = (MAS_VIEW *)object;
150 | if (previousView) {
151 | commonSuperview = [view mas_closestCommonSuperview:commonSuperview];
152 | } else {
153 | commonSuperview = view;
154 | }
155 | previousView = view;
156 | }
157 | }
158 | NSAssert(commonSuperview, @"Can't constrain views that do not share a common superview. Make sure that all the views in this array have been added into the same view hierarchy.");
159 | return commonSuperview;
160 | }
161 |
162 | @end
163 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 TARGET_OS_IPHONE || TARGET_OS_TV
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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 TARGET_OS_IPHONE || TARGET_OS_TV
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 | /**
56 | * a key to associate with this view
57 | */
58 | @property (nonatomic, strong) id mas_key;
59 |
60 | /**
61 | * Finds the closest common superview between this view and another view
62 | *
63 | * @param view other view
64 | *
65 | * @return returns nil if common superview could not be found
66 | */
67 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view;
68 |
69 | /**
70 | * Creates a MASConstraintMaker with the callee view.
71 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing
72 | *
73 | * @param block scope within which you can build up the constraints which you wish to apply to the view.
74 | *
75 | * @return Array of created MASConstraints
76 | */
77 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block;
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 | * If an existing constraint exists then it will be updated instead.
83 | *
84 | * @param block scope within which you can build up the constraints which you wish to apply to the view.
85 | *
86 | * @return Array of created/updated MASConstraints
87 | */
88 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block;
89 |
90 | /**
91 | * Creates a MASConstraintMaker with the callee view.
92 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing.
93 | * All constraints previously installed for the view will be removed.
94 | *
95 | * @param block scope within which you can build up the constraints which you wish to apply to the view.
96 | *
97 | * @return Array of created/updated MASConstraints
98 | */
99 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block;
100 |
101 | @end
102 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/Masonry/Masonry/View+MASAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MASAdditions.m
3 | // Masonry
4 | //
5 | // Created by Jonas Budelmann on 20/07/13.
6 | // Copyright (c) 2013 cloudling. All rights reserved.
7 | //
8 |
9 | #import "View+MASAdditions.h"
10 | #import
11 |
12 | @implementation MAS_VIEW (MASAdditions)
13 |
14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block {
15 | self.translatesAutoresizingMaskIntoConstraints = NO;
16 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
17 | block(constraintMaker);
18 | return [constraintMaker install];
19 | }
20 |
21 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block {
22 | self.translatesAutoresizingMaskIntoConstraints = NO;
23 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
24 | constraintMaker.updateExisting = YES;
25 | block(constraintMaker);
26 | return [constraintMaker install];
27 | }
28 |
29 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block {
30 | self.translatesAutoresizingMaskIntoConstraints = NO;
31 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self];
32 | constraintMaker.removeExisting = YES;
33 | block(constraintMaker);
34 | return [constraintMaker install];
35 | }
36 |
37 | #pragma mark - NSLayoutAttribute properties
38 |
39 | - (MASViewAttribute *)mas_left {
40 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft];
41 | }
42 |
43 | - (MASViewAttribute *)mas_top {
44 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop];
45 | }
46 |
47 | - (MASViewAttribute *)mas_right {
48 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight];
49 | }
50 |
51 | - (MASViewAttribute *)mas_bottom {
52 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom];
53 | }
54 |
55 | - (MASViewAttribute *)mas_leading {
56 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading];
57 | }
58 |
59 | - (MASViewAttribute *)mas_trailing {
60 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing];
61 | }
62 |
63 | - (MASViewAttribute *)mas_width {
64 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth];
65 | }
66 |
67 | - (MASViewAttribute *)mas_height {
68 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight];
69 | }
70 |
71 | - (MASViewAttribute *)mas_centerX {
72 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX];
73 | }
74 |
75 | - (MASViewAttribute *)mas_centerY {
76 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY];
77 | }
78 |
79 | - (MASViewAttribute *)mas_baseline {
80 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline];
81 | }
82 |
83 | - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute
84 | {
85 | return ^(NSLayoutAttribute attr) {
86 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr];
87 | };
88 | }
89 |
90 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
91 |
92 | - (MASViewAttribute *)mas_firstBaseline {
93 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeFirstBaseline];
94 | }
95 | - (MASViewAttribute *)mas_lastBaseline {
96 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLastBaseline];
97 | }
98 |
99 | #endif
100 |
101 | #if TARGET_OS_IPHONE || TARGET_OS_TV
102 |
103 | - (MASViewAttribute *)mas_leftMargin {
104 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin];
105 | }
106 |
107 | - (MASViewAttribute *)mas_rightMargin {
108 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin];
109 | }
110 |
111 | - (MASViewAttribute *)mas_topMargin {
112 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin];
113 | }
114 |
115 | - (MASViewAttribute *)mas_bottomMargin {
116 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin];
117 | }
118 |
119 | - (MASViewAttribute *)mas_leadingMargin {
120 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin];
121 | }
122 |
123 | - (MASViewAttribute *)mas_trailingMargin {
124 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin];
125 | }
126 |
127 | - (MASViewAttribute *)mas_centerXWithinMargins {
128 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins];
129 | }
130 |
131 | - (MASViewAttribute *)mas_centerYWithinMargins {
132 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins];
133 | }
134 |
135 | #endif
136 |
137 | #pragma mark - associated properties
138 |
139 | - (id)mas_key {
140 | return objc_getAssociatedObject(self, @selector(mas_key));
141 | }
142 |
143 | - (void)setMas_key:(id)key {
144 | objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
145 | }
146 |
147 | #pragma mark - heirachy
148 |
149 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view {
150 | MAS_VIEW *closestCommonSuperview = nil;
151 |
152 | MAS_VIEW *secondViewSuperview = view;
153 | while (!closestCommonSuperview && secondViewSuperview) {
154 | MAS_VIEW *firstViewSuperview = self;
155 | while (!closestCommonSuperview && firstViewSuperview) {
156 | if (secondViewSuperview == firstViewSuperview) {
157 | closestCommonSuperview = secondViewSuperview;
158 | }
159 | firstViewSuperview = firstViewSuperview.superview;
160 | }
161 | secondViewSuperview = secondViewSuperview.superview;
162 | }
163 | return closestCommonSuperview;
164 | }
165 |
166 | @end
167 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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 TARGET_OS_IPHONE || TARGET_OS_TV
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 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
53 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
54 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
55 |
56 | @end
57 |
58 | #define MAS_ATTR_FORWARD(attr) \
59 | - (MASViewAttribute *)attr { \
60 | return [self mas_##attr]; \
61 | }
62 |
63 | @implementation MAS_VIEW (MASShorthandAdditions)
64 |
65 | MAS_ATTR_FORWARD(top);
66 | MAS_ATTR_FORWARD(left);
67 | MAS_ATTR_FORWARD(bottom);
68 | MAS_ATTR_FORWARD(right);
69 | MAS_ATTR_FORWARD(leading);
70 | MAS_ATTR_FORWARD(trailing);
71 | MAS_ATTR_FORWARD(width);
72 | MAS_ATTR_FORWARD(height);
73 | MAS_ATTR_FORWARD(centerX);
74 | MAS_ATTR_FORWARD(centerY);
75 | MAS_ATTR_FORWARD(baseline);
76 |
77 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
78 |
79 | MAS_ATTR_FORWARD(firstBaseline);
80 | MAS_ATTR_FORWARD(lastBaseline);
81 |
82 | #endif
83 |
84 | #if TARGET_OS_IPHONE || TARGET_OS_TV
85 |
86 | MAS_ATTR_FORWARD(leftMargin);
87 | MAS_ATTR_FORWARD(rightMargin);
88 | MAS_ATTR_FORWARD(topMargin);
89 | MAS_ATTR_FORWARD(bottomMargin);
90 | MAS_ATTR_FORWARD(leadingMargin);
91 | MAS_ATTR_FORWARD(trailingMargin);
92 | MAS_ATTR_FORWARD(centerXWithinMargins);
93 | MAS_ATTR_FORWARD(centerYWithinMargins);
94 |
95 | #endif
96 |
97 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute {
98 | return [self mas_attribute];
99 | }
100 |
101 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
102 | return [self mas_makeConstraints:block];
103 | }
104 |
105 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
106 | return [self mas_updateConstraints:block];
107 | }
108 |
109 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
110 | return [self mas_remakeConstraints:block];
111 | }
112 |
113 | @end
114 |
115 | #endif
116 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/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/oc 版本/VerifyCodeDemo/VerifyCodeDemo/NTESToastView.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESToastView.h
3 | // NTESVerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2020/5/8.
6 | // Copyright © 2020 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface NTESToastView : NSObject
14 |
15 | + (void)showNotice:(NSString *)notice;
16 |
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/NTESToastView.m:
--------------------------------------------------------------------------------
1 | //
2 | // NTESToastView.m
3 | // NTESVerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2020/5/8.
6 | // Copyright © 2020 NetEase. All rights reserved.
7 | //
8 |
9 | #import "NTESToastView.h"
10 | #import
11 | #import "Masonry.h"
12 |
13 | @implementation NTESToastView
14 |
15 | + (void)showNotice:(NSString *)notice {
16 |
17 | UILabel *noticeLabel = [[UILabel alloc] init];
18 | noticeLabel.backgroundColor = [UIColor colorWithRed:0/255.0f green:0/255.0f blue:0/255.0f alpha:0.8];
19 | noticeLabel.font = [UIFont systemFontOfSize:12];
20 | noticeLabel.textColor = [UIColor whiteColor];
21 | noticeLabel.numberOfLines = 1;
22 | noticeLabel.textAlignment = NSTextAlignmentCenter;
23 | UIWindow *window = [[[UIApplication sharedApplication] windows] lastObject];
24 | [window addSubview:noticeLabel];
25 | noticeLabel.text = notice;
26 | [noticeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
27 | make.centerY.centerX.equalTo(window);
28 | make.height.mas_equalTo(30);
29 | }];
30 |
31 | [noticeLabel.layer setMasksToBounds:YES];
32 | [noticeLabel.layer setCornerRadius:2]; //设置矩形四个圆角半径
33 |
34 | noticeLabel.alpha = 0;
35 | [UIView animateWithDuration:.5f animations:^{
36 | noticeLabel.alpha = 1;
37 | } completion:^(BOOL finished) {
38 | double delayInSeconds = 2;
39 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
40 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
41 | [UIView animateWithDuration:.5f animations:^{
42 | noticeLabel.alpha = 0;
43 | } completion:^(BOOL finished) {
44 | [noticeLabel removeFromSuperview];
45 | }];
46 | });
47 | }];
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/UIImage+VerfityCodeDemo.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+VerfityCodeDemo.h
3 | // NTESVerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2022/5/17.
6 | // Copyright © 2022 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface UIImage (VerfityCodeDemo)
14 |
15 | + (UIImage *)ntes_animatedGIFNamed:(NSString *)name;
16 |
17 | + (UIImage *)ntes_animatedGIFWithData:(NSData *)data;
18 |
19 | - (UIImage *)ntes_animatedImageByScalingAndCroppingToSize:(CGSize)size;
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/UIImage+VerfityCodeDemo.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+VerfityCodeDemo.m
3 | // NTESVerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2022/5/17.
6 | // Copyright © 2022 NetEase. All rights reserved.
7 | //
8 |
9 | #import "UIImage+VerfityCodeDemo.h"
10 | #import
11 |
12 | @implementation UIImage (VerfityCodeDemo)
13 |
14 | + (UIImage *)ntes_animatedGIFWithData:(NSData *)data {
15 | if (!data) {
16 | return nil;
17 | }
18 |
19 | CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
20 |
21 | size_t count = CGImageSourceGetCount(source);
22 |
23 | UIImage *animatedImage;
24 |
25 | if (count <= 1) {
26 | animatedImage = [[UIImage alloc] initWithData:data];
27 | }
28 | else {
29 | NSMutableArray *images = [NSMutableArray array];
30 |
31 | NSTimeInterval duration = 0.0f;
32 |
33 | for (size_t i = 0; i < count; i++) {
34 | CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL);
35 |
36 | duration += [self ntes_frameDurationAtIndex:i source:source];
37 |
38 | [images addObject:[UIImage imageWithCGImage:image scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp]];
39 |
40 | CGImageRelease(image);
41 | }
42 |
43 | if (!duration) {
44 | duration = (1.0f / 10.0f) * count;
45 | }
46 |
47 | animatedImage = [UIImage animatedImageWithImages:images duration:duration];
48 | }
49 |
50 | CFRelease(source);
51 |
52 | return animatedImage;
53 | }
54 |
55 | + (float)ntes_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source {
56 | float frameDuration = 0.1f;
57 | CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil);
58 | NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties;
59 | NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary];
60 |
61 | NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime];
62 | if (delayTimeUnclampedProp) {
63 | frameDuration = [delayTimeUnclampedProp floatValue];
64 | }
65 | else {
66 |
67 | NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime];
68 | if (delayTimeProp) {
69 | frameDuration = [delayTimeProp floatValue];
70 | }
71 | }
72 |
73 | // Many annoying ads specify a 0 duration to make an image flash as quickly as possible.
74 | // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify
75 | // a duration of <= 10 ms. See and
76 | // for more information.
77 |
78 | if (frameDuration < 0.011f) {
79 | frameDuration = 0.100f;
80 | }
81 |
82 | CFRelease(cfFrameProperties);
83 | return frameDuration;
84 | }
85 |
86 | + (UIImage *)ntes_animatedGIFNamed:(NSString *)name {
87 | CGFloat scale = [UIScreen mainScreen].scale;
88 |
89 | if (scale > 1.0f) {
90 | NSString *retinaPath = [[NSBundle mainBundle] pathForResource:[name stringByAppendingString:@"@2x"] ofType:@"gif"];
91 |
92 | NSData *data = [NSData dataWithContentsOfFile:retinaPath];
93 |
94 | if (data) {
95 | return [UIImage ntes_animatedGIFWithData:data];
96 | }
97 |
98 | NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"];
99 |
100 | data = [NSData dataWithContentsOfFile:path];
101 |
102 | if (data) {
103 | return [UIImage ntes_animatedGIFWithData:data];
104 | }
105 |
106 | return [UIImage imageNamed:name];
107 | }
108 | else {
109 | NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"];
110 |
111 | NSData *data = [NSData dataWithContentsOfFile:path];
112 |
113 | if (data) {
114 | return [UIImage ntes_animatedGIFWithData:data];
115 | }
116 |
117 | return [UIImage imageNamed:name];
118 | }
119 | }
120 |
121 | - (UIImage *)ntes_animatedImageByScalingAndCroppingToSize:(CGSize)size {
122 | if (CGSizeEqualToSize(self.size, size) || CGSizeEqualToSize(size, CGSizeZero)) {
123 | return self;
124 | }
125 |
126 | CGSize scaledSize = size;
127 | CGPoint thumbnailPoint = CGPointZero;
128 |
129 | CGFloat widthFactor = size.width / self.size.width;
130 | CGFloat heightFactor = size.height / self.size.height;
131 | CGFloat scaleFactor = (widthFactor > heightFactor) ? widthFactor : heightFactor;
132 | scaledSize.width = self.size.width * scaleFactor;
133 | scaledSize.height = self.size.height * scaleFactor;
134 |
135 | if (widthFactor > heightFactor) {
136 | thumbnailPoint.y = (size.height - scaledSize.height) * 0.5;
137 | }
138 | else if (widthFactor < heightFactor) {
139 | thumbnailPoint.x = (size.width - scaledSize.width) * 0.5;
140 | }
141 |
142 | NSMutableArray *scaledImages = [NSMutableArray array];
143 |
144 | UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
145 |
146 | for (UIImage *image in self.images) {
147 | [image drawInRect:CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledSize.width, scaledSize.height)];
148 | UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
149 |
150 | [scaledImages addObject:newImage];
151 | }
152 |
153 | UIGraphicsEndImageContext();
154 |
155 | return [UIImage animatedImageWithImages:scaledImages duration:self.duration];
156 | }
157 |
158 |
159 | @end
160 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // VerifyCodeDemo
4 | //
5 | // Created by NetEase on 17/1/3.
6 | // Copyright © 2017年 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ViewController : UIViewController
13 |
14 | @property(nonatomic,strong)NTESVerifyCodeManager *manager;
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/face.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/face.gif
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // VerifyCodeDemo
4 | //
5 | // Created by NetEase on 17/1/3.
6 | // Copyright © 2017年 NetEase. 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 |
--------------------------------------------------------------------------------
/Demo/oc 版本/VerifyCodeDemo/VerifyCodeDemoTests/VerifyCodeDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // VerifyCodeDemoTests.m
3 | // VerifyCodeDemoTests
4 | //
5 | // Created by NetEase on 17/1/3.
6 | // Copyright © 2017年 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface VerifyCodeDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation VerifyCodeDemoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Podfile:
--------------------------------------------------------------------------------
1 | #platform
2 | platform :ios, '8.0'
3 |
4 | target 'VerifyCodeDemo' do
5 | pod 'NTESVerifyCode'
6 | end
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - NTESVerifyCode (3.6.1)
3 |
4 | DEPENDENCIES:
5 | - NTESVerifyCode
6 |
7 | SPEC REPOS:
8 | trunk:
9 | - NTESVerifyCode
10 |
11 | SPEC CHECKSUMS:
12 | NTESVerifyCode: e872a80fe399a973286352f2bd4829efceb29974
13 |
14 | PODFILE CHECKSUM: 26f82dd8e983e23d7b0ae2af80d9a12f6c0014b4
15 |
16 | COCOAPODS: 1.13.0
17 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - NTESVerifyCode (3.6.1)
3 |
4 | DEPENDENCIES:
5 | - NTESVerifyCode
6 |
7 | SPEC REPOS:
8 | trunk:
9 | - NTESVerifyCode
10 |
11 | SPEC CHECKSUMS:
12 | NTESVerifyCode: e872a80fe399a973286352f2bd4829efceb29974
13 |
14 | PODFILE CHECKSUM: 26f82dd8e983e23d7b0ae2af80d9a12f6c0014b4
15 |
16 | COCOAPODS: 1.13.0
17 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Info.plist
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/Rectangle_dark@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/bg_dark@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_close2@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_error_dark@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/ico_loading@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@1x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@2x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/icon_close_dark@3x.png
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle/loading.gif
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AvailableLibraries
6 |
7 |
8 | LibraryIdentifier
9 | ios-arm64_i386_x86_64-simulator
10 | LibraryPath
11 | VerifyCode.framework
12 | SupportedArchitectures
13 |
14 | arm64
15 | i386
16 | x86_64
17 |
18 | SupportedPlatform
19 | ios
20 | SupportedPlatformVariant
21 | simulator
22 |
23 |
24 | LibraryIdentifier
25 | ios-arm64_armv7
26 | LibraryPath
27 | VerifyCode.framework
28 | SupportedArchitectures
29 |
30 | arm64
31 | armv7
32 |
33 | SupportedPlatform
34 | ios
35 |
36 |
37 | CFBundlePackageType
38 | XFWK
39 | XCFrameworkFormatVersion
40 | 1.0
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Headers/NTESVerifyCodeStyleConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESVerifyCodeStyleConfig.h
3 | // NTESVerifyCode
4 | //
5 | // Created by 罗礼豪 on 2022/6/20.
6 | // Copyright © 2022 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef NS_ENUM(NSUInteger, NTESCapBarTextAlign) {
14 | NTESCapBarTextAlignLeft = 1,
15 | NTESCapBarTextAlignRight,
16 | NTESCapBarTextAlignCenter,
17 | };
18 |
19 | @interface NTESVerifyCodeStyleConfig : NSObject
20 |
21 | // 验证码圆角
22 | @property (nonatomic, assign) NSUInteger radius;
23 |
24 | // 验证码弹框边框颜色,想要去掉的话可取 transparent 或者与背景色同色
25 | @property (nonatomic, copy) NSString *verifyBorderColor;
26 |
27 | #pragma mark 验证码标题样式
28 |
29 | // 弹框头部标题文字对齐方式,可选值为 left center right
30 | @property (nonatomic, assign) NTESCapBarTextAlign capBarTextAlign;
31 |
32 | // 弹框头部下边框颜色,想要去掉的话可取 transparent 或者与背景色同色 #fff
33 | @property (nonatomic, copy) NSString *capBarBorderColor;
34 |
35 | // 弹框头部标题文字颜色
36 | @property (nonatomic, copy) NSString *capBarTextColor;
37 |
38 | // 弹框头部标题文字字体大小
39 | @property (nonatomic, assign) NSUInteger capBarTextSize;
40 |
41 | /**
42 | 弹框头部标题文字字体体重,可设置粗细,
43 | 参考:capBarTextWeight: normal、bold、lighter、bolder、100、200、300、400、500、600、700、800、900
44 | 更多详情参考:https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
45 | */
46 | @property (nonatomic, copy) NSString *capBarTextWeight;
47 |
48 | // 弹框头部标题所在容器高度
49 | @property (nonatomic, assign) NSUInteger capBarTitleHeight;
50 |
51 | // 验证码弹框 body 部分的内边距,相当于总体设置 capPaddingTop,capPaddingRight,capPaddingBottom,capPaddingLeft
52 | @property (nonatomic, assign) NSUInteger capBodyPadding;
53 |
54 | #pragma mark 验证码弹框body样式
55 |
56 | // 验证码弹框 body 部分的【上】内边距,覆盖 capPadding 对于上内边距的设置,单位px
57 | @property (nonatomic, copy) NSString *capPaddingTop;
58 |
59 | // 验证码弹框 body 部分的【右】内边距,覆盖 capPadding 对于右内边距的设置,单位px
60 | @property (nonatomic, copy) NSString *capPaddingRight;
61 |
62 | // 验证码弹框 body 部分的【底】内边距,覆盖 capPadding 对于底内边距的设置,单位px
63 | @property (nonatomic, copy) NSString *capPaddingBottom;
64 |
65 | // 验证码弹框 body 部分的【左】内边距,覆盖 capPadding 对于左内边距的设置,单位px
66 | @property (nonatomic, copy) NSString *capPaddingLeft;
67 |
68 | // 弹框【上】内边距,实践时候可与 capPaddingTop 配合,单位px
69 | @property (nonatomic, copy) NSString *paddingTop;
70 |
71 | // 弹框【下】内边距,实践时候可与 capPaddingBottom 配合,单位px
72 | @property (nonatomic, copy) NSString *paddingBottom;
73 |
74 | // 验证码弹框body圆角
75 | @property (nonatomic, assign) NSUInteger capBorderRadius;
76 |
77 | #pragma mark 验证码滑块样式
78 |
79 | // 滑块的边框颜色
80 | @property (nonatomic, copy) NSString *borderColor;
81 |
82 | // 滑块的背景颜色
83 | @property (nonatomic, copy) NSString *background;
84 |
85 | // 滑块的滑动时边框颜色,滑动类型验证码下有效
86 | @property (nonatomic, copy) NSString *borderColorMoving;
87 |
88 | // 滑块的滑动时背景颜色,滑动类型验证码下有效
89 | @property (nonatomic, copy) NSString *backgroundMoving;
90 |
91 | // 滑块的成功时边框颜色,此颜色同步了文字成功时文字颜色、滑块背景颜色
92 | @property (nonatomic, copy) NSString *borderColorSuccess;
93 |
94 | // 滑块的成功时背景颜色
95 | @property (nonatomic, copy) NSString *backgroundSuccess;
96 |
97 | // 滑块的失败时背景颜色
98 | @property (nonatomic, copy) NSString *backgroundError;
99 |
100 | // 失败时边框颜色
101 | @property (nonatomic, copy) NSString *borderColorError;
102 |
103 | // 滑块的滑块背景颜色
104 | @property (nonatomic, copy) NSString *slideBackground;
105 |
106 | // 滑块的内容文本大小
107 | @property (nonatomic, assign) NSUInteger textSize;
108 |
109 | // 滑块内容文本颜色(滑块滑动前的颜色,失败、成功前的颜色)
110 | @property (nonatomic, copy) NSString *textColor;
111 |
112 | // 滑块的高度
113 | @property (nonatomic, assign) NSUInteger height;
114 |
115 | // 滑块的圆角
116 | @property (nonatomic, assign) NSUInteger borderRadius;
117 |
118 | // 滑块与验证码视图之间的距离,单位px
119 | @property (nonatomic, copy) NSString *gap;
120 |
121 | // 滑块文案描述。默认:向右拖动滑块填充拼图。
122 | @property (nonatomic, copy) NSString *slideTip;
123 |
124 | // 左边距,如果相对于整个 bar 居中提示文字,设为 0;
125 | @property (nonatomic, copy) NSString *paddingLeft;
126 |
127 | // 加载中时的背景图片地址,需要填入一个 url
128 | @property (nonatomic, copy) NSString *loadBackgroundImage;
129 |
130 | // 加载中时的背景颜色,支持 CSS 所有颜色值
131 | @property (nonatomic, copy) NSString *loadBackgroundColor;
132 |
133 |
134 | #pragma mark 验证码右上方刷新按钮和语音按钮组成组件
135 |
136 | // 组件圆角大小
137 | @property (nonatomic, assign) NSUInteger executeBorderRadius;
138 |
139 | // 组件背景色
140 | @property (nonatomic, copy) NSString *executeBackground;
141 |
142 | // 组件外层容器距离组件顶部距离,单位px
143 | @property (nonatomic, copy) NSString *executeTop;
144 |
145 | // 组件外层容器距离组件右侧距离,单位px
146 | @property (nonatomic, copy) NSString *executeRight;
147 |
148 | @end
149 |
150 | NS_ASSUME_NONNULL_END
151 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Headers/VerifyCode.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESVerifyCode.h
3 | // NTESVerifyCode
4 | //
5 | // Created by NetEase on 16/11/30.
6 | // Copyright © 2016年 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for NTESVerifyCode.
12 | FOUNDATION_EXPORT double NTESVerifyCodeVersionNumber;
13 |
14 | //! Project version string for NTESVerifyCode.
15 | FOUNDATION_EXPORT const unsigned char NTESVerifyCodeVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 | #import "NTESVerifyCodeManager.h"
20 | #import "NTESVerifyCodeStyleConfig.h"
21 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Info.plist
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module VerifyCode {
2 | umbrella header "VerifyCode.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyCollectedDataTypes
6 |
7 | NSPrivacyTrackingDomains
8 |
9 | NSPrivacyTracking
10 |
11 | NSPrivacyAccessedAPITypes
12 |
13 |
14 | NSPrivacyAccessedAPIType
15 | NSPrivacyAccessedAPICategoryUserDefaults
16 | NSPrivacyAccessedAPITypeReasons
17 |
18 | CA92.1
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/VerifyCode:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_armv7/VerifyCode.framework/VerifyCode
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Headers/NTESVerifyCodeStyleConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESVerifyCodeStyleConfig.h
3 | // NTESVerifyCode
4 | //
5 | // Created by 罗礼豪 on 2022/6/20.
6 | // Copyright © 2022 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | typedef NS_ENUM(NSUInteger, NTESCapBarTextAlign) {
14 | NTESCapBarTextAlignLeft = 1,
15 | NTESCapBarTextAlignRight,
16 | NTESCapBarTextAlignCenter,
17 | };
18 |
19 | @interface NTESVerifyCodeStyleConfig : NSObject
20 |
21 | // 验证码圆角
22 | @property (nonatomic, assign) NSUInteger radius;
23 |
24 | // 验证码弹框边框颜色,想要去掉的话可取 transparent 或者与背景色同色
25 | @property (nonatomic, copy) NSString *verifyBorderColor;
26 |
27 | #pragma mark 验证码标题样式
28 |
29 | // 弹框头部标题文字对齐方式,可选值为 left center right
30 | @property (nonatomic, assign) NTESCapBarTextAlign capBarTextAlign;
31 |
32 | // 弹框头部下边框颜色,想要去掉的话可取 transparent 或者与背景色同色 #fff
33 | @property (nonatomic, copy) NSString *capBarBorderColor;
34 |
35 | // 弹框头部标题文字颜色
36 | @property (nonatomic, copy) NSString *capBarTextColor;
37 |
38 | // 弹框头部标题文字字体大小
39 | @property (nonatomic, assign) NSUInteger capBarTextSize;
40 |
41 | /**
42 | 弹框头部标题文字字体体重,可设置粗细,
43 | 参考:capBarTextWeight: normal、bold、lighter、bolder、100、200、300、400、500、600、700、800、900
44 | 更多详情参考:https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
45 | */
46 | @property (nonatomic, copy) NSString *capBarTextWeight;
47 |
48 | // 弹框头部标题所在容器高度
49 | @property (nonatomic, assign) NSUInteger capBarTitleHeight;
50 |
51 | // 验证码弹框 body 部分的内边距,相当于总体设置 capPaddingTop,capPaddingRight,capPaddingBottom,capPaddingLeft
52 | @property (nonatomic, assign) NSUInteger capBodyPadding;
53 |
54 | #pragma mark 验证码弹框body样式
55 |
56 | // 验证码弹框 body 部分的【上】内边距,覆盖 capPadding 对于上内边距的设置,单位px
57 | @property (nonatomic, copy) NSString *capPaddingTop;
58 |
59 | // 验证码弹框 body 部分的【右】内边距,覆盖 capPadding 对于右内边距的设置,单位px
60 | @property (nonatomic, copy) NSString *capPaddingRight;
61 |
62 | // 验证码弹框 body 部分的【底】内边距,覆盖 capPadding 对于底内边距的设置,单位px
63 | @property (nonatomic, copy) NSString *capPaddingBottom;
64 |
65 | // 验证码弹框 body 部分的【左】内边距,覆盖 capPadding 对于左内边距的设置,单位px
66 | @property (nonatomic, copy) NSString *capPaddingLeft;
67 |
68 | // 弹框【上】内边距,实践时候可与 capPaddingTop 配合,单位px
69 | @property (nonatomic, copy) NSString *paddingTop;
70 |
71 | // 弹框【下】内边距,实践时候可与 capPaddingBottom 配合,单位px
72 | @property (nonatomic, copy) NSString *paddingBottom;
73 |
74 | // 验证码弹框body圆角
75 | @property (nonatomic, assign) NSUInteger capBorderRadius;
76 |
77 | #pragma mark 验证码滑块样式
78 |
79 | // 滑块的边框颜色
80 | @property (nonatomic, copy) NSString *borderColor;
81 |
82 | // 滑块的背景颜色
83 | @property (nonatomic, copy) NSString *background;
84 |
85 | // 滑块的滑动时边框颜色,滑动类型验证码下有效
86 | @property (nonatomic, copy) NSString *borderColorMoving;
87 |
88 | // 滑块的滑动时背景颜色,滑动类型验证码下有效
89 | @property (nonatomic, copy) NSString *backgroundMoving;
90 |
91 | // 滑块的成功时边框颜色,此颜色同步了文字成功时文字颜色、滑块背景颜色
92 | @property (nonatomic, copy) NSString *borderColorSuccess;
93 |
94 | // 滑块的成功时背景颜色
95 | @property (nonatomic, copy) NSString *backgroundSuccess;
96 |
97 | // 滑块的失败时背景颜色
98 | @property (nonatomic, copy) NSString *backgroundError;
99 |
100 | // 失败时边框颜色
101 | @property (nonatomic, copy) NSString *borderColorError;
102 |
103 | // 滑块的滑块背景颜色
104 | @property (nonatomic, copy) NSString *slideBackground;
105 |
106 | // 滑块的内容文本大小
107 | @property (nonatomic, assign) NSUInteger textSize;
108 |
109 | // 滑块内容文本颜色(滑块滑动前的颜色,失败、成功前的颜色)
110 | @property (nonatomic, copy) NSString *textColor;
111 |
112 | // 滑块的高度
113 | @property (nonatomic, assign) NSUInteger height;
114 |
115 | // 滑块的圆角
116 | @property (nonatomic, assign) NSUInteger borderRadius;
117 |
118 | // 滑块与验证码视图之间的距离,单位px
119 | @property (nonatomic, copy) NSString *gap;
120 |
121 | // 滑块文案描述。默认:向右拖动滑块填充拼图。
122 | @property (nonatomic, copy) NSString *slideTip;
123 |
124 | // 左边距,如果相对于整个 bar 居中提示文字,设为 0;
125 | @property (nonatomic, copy) NSString *paddingLeft;
126 |
127 | // 加载中时的背景图片地址,需要填入一个 url
128 | @property (nonatomic, copy) NSString *loadBackgroundImage;
129 |
130 | // 加载中时的背景颜色,支持 CSS 所有颜色值
131 | @property (nonatomic, copy) NSString *loadBackgroundColor;
132 |
133 |
134 | #pragma mark 验证码右上方刷新按钮和语音按钮组成组件
135 |
136 | // 组件圆角大小
137 | @property (nonatomic, assign) NSUInteger executeBorderRadius;
138 |
139 | // 组件背景色
140 | @property (nonatomic, copy) NSString *executeBackground;
141 |
142 | // 组件外层容器距离组件顶部距离,单位px
143 | @property (nonatomic, copy) NSString *executeTop;
144 |
145 | // 组件外层容器距离组件右侧距离,单位px
146 | @property (nonatomic, copy) NSString *executeRight;
147 |
148 | @end
149 |
150 | NS_ASSUME_NONNULL_END
151 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Headers/VerifyCode.h:
--------------------------------------------------------------------------------
1 | //
2 | // NTESVerifyCode.h
3 | // NTESVerifyCode
4 | //
5 | // Created by NetEase on 16/11/30.
6 | // Copyright © 2016年 NetEase. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for NTESVerifyCode.
12 | FOUNDATION_EXPORT double NTESVerifyCodeVersionNumber;
13 |
14 | //! Project version string for NTESVerifyCode.
15 | FOUNDATION_EXPORT const unsigned char NTESVerifyCodeVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 | #import "NTESVerifyCodeManager.h"
20 | #import "NTESVerifyCodeStyleConfig.h"
21 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Info.plist
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module VerifyCode {
2 | umbrella header "VerifyCode.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyCollectedDataTypes
6 |
7 | NSPrivacyTrackingDomains
8 |
9 | NSPrivacyTracking
10 |
11 | NSPrivacyAccessedAPITypes
12 |
13 |
14 | NSPrivacyAccessedAPIType
15 | NSPrivacyAccessedAPICategoryUserDefaults
16 | NSPrivacyAccessedAPITypeReasons
17 |
18 | CA92.1
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/VerifyCode:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/VerifyCode
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeDirectory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeDirectory
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeRequirements-1
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | Headers/NTESVerifyCodeManager.h
8 |
9 | AqqPo8C2Ax1EIf0eS22X3MdalpM=
10 |
11 | Headers/NTESVerifyCodeStyleConfig.h
12 |
13 | qG4mQaBz49QTQaFzADb3Ttk/7hM=
14 |
15 | Headers/VerifyCode.h
16 |
17 | cwBeVzy/Q/Smk560pgP9DUVvB2o=
18 |
19 | Info.plist
20 |
21 | zMPOI5O46osKyFaF4zw0K1r/Mhs=
22 |
23 | Modules/module.modulemap
24 |
25 | UnG8ccsrMC18iCqjc2k5RIy4fhk=
26 |
27 | PrivacyInfo.xcprivacy
28 |
29 | aPL98zXuTI1njkjzCrXTK02wT9s=
30 |
31 |
32 | files2
33 |
34 | Headers/NTESVerifyCodeManager.h
35 |
36 | hash
37 |
38 | AqqPo8C2Ax1EIf0eS22X3MdalpM=
39 |
40 | hash2
41 |
42 | RCMwwuY3pTTfhPm5DhyJYblqQhuG5/5apU8bnJR5asM=
43 |
44 |
45 | Headers/NTESVerifyCodeStyleConfig.h
46 |
47 | hash
48 |
49 | qG4mQaBz49QTQaFzADb3Ttk/7hM=
50 |
51 | hash2
52 |
53 | s80i1XA+V/0V3rUJMhxypPLIuJXw9rVyDsqSL6T4EyM=
54 |
55 |
56 | Headers/VerifyCode.h
57 |
58 | hash
59 |
60 | cwBeVzy/Q/Smk560pgP9DUVvB2o=
61 |
62 | hash2
63 |
64 | OKXcF6q18n3tKemU0fUrNxt7zojv+tsuu2dawFuCo88=
65 |
66 |
67 | Modules/module.modulemap
68 |
69 | hash
70 |
71 | UnG8ccsrMC18iCqjc2k5RIy4fhk=
72 |
73 | hash2
74 |
75 | XZqbyZ/vAhdkIz3crYYJ4BT/tWRyz+BGx1Vl55/i6KI=
76 |
77 |
78 | PrivacyInfo.xcprivacy
79 |
80 | hash
81 |
82 | aPL98zXuTI1njkjzCrXTK02wT9s=
83 |
84 | hash2
85 |
86 | fDQtGkll4uVwTnNKu8A8YywfzmSSGRU+cPRUdHaXK2c=
87 |
88 |
89 |
90 | rules
91 |
92 | ^.*
93 |
94 | ^.*\.lproj/
95 |
96 | optional
97 |
98 | weight
99 | 1000
100 |
101 | ^.*\.lproj/locversion.plist$
102 |
103 | omit
104 |
105 | weight
106 | 1100
107 |
108 | ^Base\.lproj/
109 |
110 | weight
111 | 1010
112 |
113 | ^version.plist$
114 |
115 |
116 | rules2
117 |
118 | .*\.dSYM($|/)
119 |
120 | weight
121 | 11
122 |
123 | ^(.*/)?\.DS_Store$
124 |
125 | omit
126 |
127 | weight
128 | 2000
129 |
130 | ^.*
131 |
132 | ^.*\.lproj/
133 |
134 | optional
135 |
136 | weight
137 | 1000
138 |
139 | ^.*\.lproj/locversion.plist$
140 |
141 | omit
142 |
143 | weight
144 | 1100
145 |
146 | ^Base\.lproj/
147 |
148 | weight
149 | 1010
150 |
151 | ^Info\.plist$
152 |
153 | omit
154 |
155 | weight
156 | 20
157 |
158 | ^PkgInfo$
159 |
160 | omit
161 |
162 | weight
163 | 20
164 |
165 | ^embedded\.provisionprofile$
166 |
167 | weight
168 | 20
169 |
170 | ^version\.plist$
171 |
172 | weight
173 | 20
174 |
175 |
176 |
177 |
178 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeSignature:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/Demo/swift 版本/VerifyCodeDemo/Pods/NTESVerifyCode/Classes/VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator/VerifyCode.framework/_CodeSignature/CodeSignature
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Pods.xcodeproj/xcuserdata/luolihao.xcuserdatad/xcschemes/NTESVerifyCode.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
53 |
54 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Pods.xcodeproj/xcuserdata/luolihao.xcuserdatad/xcschemes/Pods-VerifyCodeDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
53 |
54 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode-xcframeworks-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/NTESVerifyCode/NTESVerifyCode-xcframeworks.sh
2 | ${PODS_ROOT}/NTESVerifyCode/Classes/VerifyCode.xcframework
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode-xcframeworks-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode/VerifyCode.framework
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode-xcframeworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 |
12 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
13 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
14 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
15 |
16 |
17 | variant_for_slice()
18 | {
19 | case "$1" in
20 | "VerifyCode.xcframework/ios-arm64_armv7")
21 | echo ""
22 | ;;
23 | "VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator")
24 | echo "simulator"
25 | ;;
26 | esac
27 | }
28 |
29 | archs_for_slice()
30 | {
31 | case "$1" in
32 | "VerifyCode.xcframework/ios-arm64_armv7")
33 | echo "arm64 armv7"
34 | ;;
35 | "VerifyCode.xcframework/ios-arm64_i386_x86_64-simulator")
36 | echo "arm64 i386 x86_64"
37 | ;;
38 | esac
39 | }
40 |
41 | copy_dir()
42 | {
43 | local source="$1"
44 | local destination="$2"
45 |
46 | # Use filter instead of exclude so missing patterns don't throw errors.
47 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" \"${source}*\" \"${destination}\""
48 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}"/* "${destination}"
49 | }
50 |
51 | SELECT_SLICE_RETVAL=""
52 |
53 | select_slice() {
54 | local xcframework_name="$1"
55 | xcframework_name="${xcframework_name##*/}"
56 | local paths=("${@:2}")
57 | # Locate the correct slice of the .xcframework for the current architectures
58 | local target_path=""
59 |
60 | # Split archs on space so we can find a slice that has all the needed archs
61 | local target_archs=$(echo $ARCHS | tr " " "\n")
62 |
63 | local target_variant=""
64 | if [[ "$PLATFORM_NAME" == *"simulator" ]]; then
65 | target_variant="simulator"
66 | fi
67 | if [[ ! -z ${EFFECTIVE_PLATFORM_NAME+x} && "$EFFECTIVE_PLATFORM_NAME" == *"maccatalyst" ]]; then
68 | target_variant="maccatalyst"
69 | fi
70 | for i in ${!paths[@]}; do
71 | local matched_all_archs="1"
72 | local slice_archs="$(archs_for_slice "${xcframework_name}/${paths[$i]}")"
73 | local slice_variant="$(variant_for_slice "${xcframework_name}/${paths[$i]}")"
74 | for target_arch in $target_archs; do
75 | if ! [[ "${slice_variant}" == "$target_variant" ]]; then
76 | matched_all_archs="0"
77 | break
78 | fi
79 |
80 | if ! echo "${slice_archs}" | tr " " "\n" | grep -F -q -x "$target_arch"; then
81 | matched_all_archs="0"
82 | break
83 | fi
84 | done
85 |
86 | if [[ "$matched_all_archs" == "1" ]]; then
87 | # Found a matching slice
88 | echo "Selected xcframework slice ${paths[$i]}"
89 | SELECT_SLICE_RETVAL=${paths[$i]}
90 | break
91 | fi
92 | done
93 | }
94 |
95 | install_xcframework() {
96 | local basepath="$1"
97 | local name="$2"
98 | local package_type="$3"
99 | local paths=("${@:4}")
100 |
101 | # Locate the correct slice of the .xcframework for the current architectures
102 | select_slice "${basepath}" "${paths[@]}"
103 | local target_path="$SELECT_SLICE_RETVAL"
104 | if [[ -z "$target_path" ]]; then
105 | echo "warning: [CP] $(basename ${basepath}): Unable to find matching slice in '${paths[@]}' for the current build architectures ($ARCHS) and platform (${EFFECTIVE_PLATFORM_NAME-${PLATFORM_NAME}})."
106 | return
107 | fi
108 | local source="$basepath/$target_path"
109 |
110 | local destination="${PODS_XCFRAMEWORKS_BUILD_DIR}/${name}"
111 |
112 | if [ ! -d "$destination" ]; then
113 | mkdir -p "$destination"
114 | fi
115 |
116 | copy_dir "$source/" "$destination"
117 | echo "Copied $source to $destination"
118 | }
119 |
120 | install_xcframework "${PODS_ROOT}/NTESVerifyCode/Classes/VerifyCode.xcframework" "NTESVerifyCode" "framework" "ios-arm64_armv7" "ios-arm64_i386_x86_64-simulator"
121 |
122 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NTESVerifyCode
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/NTESVerifyCode
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/NTESVerifyCode/NTESVerifyCode.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NTESVerifyCode
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/NTESVerifyCode
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_VerifyCodeDemo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_VerifyCodeDemo
5 | @end
6 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources.sh
2 | ${PODS_ROOT}/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/NTESVerifyCodeResources.bundle
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources.sh
2 | ${PODS_ROOT}/NTESVerifyCode/Assets/NTESVerifyCodeResources.bundle
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo-resources-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/NTESVerifyCodeResources.bundle
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "JavaScriptCore" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "VerifyCode" -framework "WebKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/Pods/Target Support Files/Pods-VerifyCodeDemo/Pods-VerifyCodeDemo.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NTESVerifyCode/Classes" "${PODS_XCFRAMEWORKS_BUILD_DIR}/NTESVerifyCode"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "CoreFoundation" -framework "CoreGraphics" -framework "Foundation" -framework "JavaScriptCore" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "VerifyCode" -framework "WebKit"
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
8 | PODS_ROOT = ${SRCROOT}/Pods
9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // VerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2022/10/19.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 |
14 | var window: UIWindow?
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
17 | // Override point for customization after application launch.
18 | return true
19 | }
20 |
21 |
22 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
23 | // Called when a new scene session is being created.
24 | // Use this method to select a configuration to create the new scene with.
25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
26 | }
27 |
28 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
29 | // Called when the user discards a scene session.
30 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
31 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
32 | }
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/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/swift 版本/VerifyCodeDemo/VerifyCodeDemo/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/swift 版本/VerifyCodeDemo/VerifyCodeDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // VerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2022/10/19.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 |
15 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
16 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
17 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
18 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
19 | guard let _ = (scene as? UIWindowScene) else { return }
20 | }
21 |
22 | func sceneDidDisconnect(_ scene: UIScene) {
23 | // Called as the scene is being released by the system.
24 | // This occurs shortly after the scene enters the background, or when its session is discarded.
25 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
26 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
27 | }
28 |
29 | func sceneDidBecomeActive(_ scene: UIScene) {
30 | // Called when the scene has moved from an inactive state to an active state.
31 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
32 | }
33 |
34 | func sceneWillResignActive(_ scene: UIScene) {
35 | // Called when the scene will move from an active state to an inactive state.
36 | // This may occur due to temporary interruptions (ex. an incoming phone call).
37 | }
38 |
39 | func sceneWillEnterForeground(_ scene: UIScene) {
40 | // Called as the scene transitions from the background to the foreground.
41 | // Use this method to undo the changes made on entering the background.
42 | }
43 |
44 | func sceneDidEnterBackground(_ scene: UIScene) {
45 | // Called as the scene transitions from the foreground to the background.
46 | // Use this method to save data, release shared resources, and store enough scene-specific state information
47 | // to restore the scene back to its current state.
48 | }
49 |
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemo/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // VerifyCodeDemo
4 | //
5 | // Created by 罗礼豪 on 2022/10/19.
6 | //
7 |
8 | import UIKit
9 | import VerifyCode
10 |
11 | class ViewController: UIViewController {
12 |
13 | let manager = NTESVerifyCodeManager.getInstance()
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | self.view.backgroundColor = UIColor.white
18 |
19 | let button = UIButton(frame: CGRect(x: 100, y: 100, width: 100, height: 50))
20 | button.backgroundColor = UIColor.red
21 | button.addTarget(self, action: #selector(buttonDidTipped), for: .touchUpInside)
22 | button.layer.cornerRadius = 10
23 | button.layer.masksToBounds = true
24 | button.setTitle("加载验证码", for: .normal)
25 | self.view.addSubview(button)
26 | }
27 |
28 | @objc func buttonDidTipped() {
29 | manager?.configureVerifyCode("请输入易盾业务ID", timeout: 10)
30 | manager?.delegate = self
31 | manager?.lang = .CN
32 | manager?.alpha = 0.3
33 | manager?.userInterfaceStyle = .dark
34 | manager?.color = UIColor.black
35 | manager?.protocol = .https
36 | manager?.openFallBack = true
37 | manager?.fallBackCount = 3
38 | manager?.openVerifyCodeView()
39 | }
40 |
41 | }
42 |
43 | extension ViewController: NTESVerifyCodeManagerDelegate {
44 | func verifyCodeInitFinish() {
45 |
46 | }
47 |
48 | func verifyCodeInitFailed(_ error: [Any]?) {
49 |
50 | }
51 |
52 | func verifyCodeCloseWindow(_ close: NTESVerifyCodeClose) {
53 |
54 | }
55 |
56 | func verifyCodeValidateFinish(_ result: Bool, validate: String?, message: String!) {
57 | if result {
58 | print( "验证码成功:\(validate ?? "")")
59 | } else {
60 | print( "验证码失败:\(validate ?? "")")
61 | }
62 |
63 | }
64 | }
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemoTests/VerifyCodeDemoTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VerifyCodeDemoTests.swift
3 | // VerifyCodeDemoTests
4 | //
5 | // Created by 罗礼豪 on 2022/10/19.
6 | //
7 |
8 | import XCTest
9 | @testable import VerifyCodeDemo
10 |
11 | class VerifyCodeDemoTests: XCTestCase {
12 |
13 | override func setUpWithError() throws {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 | }
16 |
17 | override func tearDownWithError() throws {
18 | // Put teardown code here. This method is called after the invocation of each test method in the class.
19 | }
20 |
21 | func testExample() throws {
22 | // This is an example of a functional test case.
23 | // Use XCTAssert and related functions to verify your tests produce the correct results.
24 | }
25 |
26 | func testPerformanceExample() throws {
27 | // This is an example of a performance test case.
28 | self.measure {
29 | // Put the code you want to measure the time of here.
30 | }
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemoUITests/VerifyCodeDemoUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VerifyCodeDemoUITests.swift
3 | // VerifyCodeDemoUITests
4 | //
5 | // Created by 罗礼豪 on 2022/10/19.
6 | //
7 |
8 | import XCTest
9 |
10 | class VerifyCodeDemoUITests: XCTestCase {
11 |
12 | override func setUpWithError() throws {
13 | // Put setup code here. This method is called before the invocation of each test method in the class.
14 |
15 | // In UI tests it is usually best to stop immediately when a failure occurs.
16 | continueAfterFailure = false
17 |
18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19 | }
20 |
21 | override func tearDownWithError() throws {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | func testExample() throws {
26 | // UI tests must launch the application that they test.
27 | let app = XCUIApplication()
28 | app.launch()
29 |
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | func testLaunchPerformance() throws {
35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
36 | // This measures how long it takes to launch your application.
37 | measure(metrics: [XCTApplicationLaunchMetric()]) {
38 | XCUIApplication().launch()
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Demo/swift 版本/VerifyCodeDemo/VerifyCodeDemoUITests/VerifyCodeDemoUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VerifyCodeDemoUITestsLaunchTests.swift
3 | // VerifyCodeDemoUITests
4 | //
5 | // Created by 罗礼豪 on 2022/10/19.
6 | //
7 |
8 | import XCTest
9 |
10 | class VerifyCodeDemoUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/screenshots/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/.DS_Store
--------------------------------------------------------------------------------
/screenshots/dianxuan_cn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/dianxuan_cn.png
--------------------------------------------------------------------------------
/screenshots/duanxin_cn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/duanxin_cn.png
--------------------------------------------------------------------------------
/screenshots/framework_path.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/framework_path.jpg
--------------------------------------------------------------------------------
/screenshots/init.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/init.jpg
--------------------------------------------------------------------------------
/screenshots/tuodong_en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/tuodong_en.png
--------------------------------------------------------------------------------
/screenshots/verify_dianxuan.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/verify_dianxuan.jpg
--------------------------------------------------------------------------------
/screenshots/verify_duanxin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/verify_duanxin.jpg
--------------------------------------------------------------------------------
/screenshots/verify_huakuai.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/verify_huakuai.jpg
--------------------------------------------------------------------------------
/screenshots/verify_huankuai.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/verify_huankuai.jpg
--------------------------------------------------------------------------------
/screenshots/verify_new.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yidun/captcha-ios-demo/22acb56f97d051a61e02f670cc638872c551afc8/screenshots/verify_new.jpg
--------------------------------------------------------------------------------