├── .github └── ISSUE_TEMPLATE.MD ├── .gitignore ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── .travis.yml ├── CHANGELOG.md ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── addPhoto.imageset │ │ ├── Contents.json │ │ ├── addPhoto@2x.png │ │ └── addPhoto@3x.png │ ├── close.imageset │ │ ├── Contents.json │ │ ├── close@2x.png │ │ └── close@3x.png │ ├── image1.imageset │ │ ├── Contents.json │ │ └── image1.png │ ├── image2.imageset │ │ ├── Contents.json │ │ └── image2.png │ ├── image3.imageset │ │ ├── Contents.json │ │ └── image3.png │ ├── imageSticker1.imageset │ │ ├── Contents.json │ │ └── imageSticker1.png │ ├── imageSticker10.imageset │ │ ├── Contents.json │ │ └── imageSticker10.png │ ├── imageSticker11.imageset │ │ ├── Contents.json │ │ └── imageSticker11.png │ ├── imageSticker12.imageset │ │ ├── Contents.json │ │ └── imageSticker12.png │ ├── imageSticker13.imageset │ │ ├── Contents.json │ │ └── imageSticker13.png │ ├── imageSticker14.imageset │ │ ├── Contents.json │ │ └── imageSticker14.png │ ├── imageSticker15.imageset │ │ ├── Contents.json │ │ └── imageSticker15.png │ ├── imageSticker16.imageset │ │ ├── Contents.json │ │ └── imageSticker16.png │ ├── imageSticker17.imageset │ │ ├── Contents.json │ │ └── imageSticker17.png │ ├── imageSticker18.imageset │ │ ├── Contents.json │ │ └── imageSticker18.png │ ├── imageSticker2.imageset │ │ ├── Contents.json │ │ └── imageSticker2.png │ ├── imageSticker3.imageset │ │ ├── Contents.json │ │ └── imageSticker3.png │ ├── imageSticker4.imageset │ │ ├── Contents.json │ │ └── imageSticker4.png │ ├── imageSticker5.imageset │ │ ├── Contents.json │ │ └── imageSticker5.png │ ├── imageSticker6.imageset │ │ ├── Contents.json │ │ └── imageSticker6.png │ ├── imageSticker7.imageset │ │ ├── Contents.json │ │ └── imageSticker7.png │ ├── imageSticker8.imageset │ │ ├── Contents.json │ │ └── imageSticker8.png │ ├── imageSticker9.imageset │ │ ├── Contents.json │ │ └── imageSticker9.png │ └── playVideo.imageset │ │ ├── Contents.json │ │ ├── playVideo@2x.png │ │ └── playVideo@3x.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CustomAlert │ ├── CustomAlertController.swift │ ├── CustomAlertControllerTransitionAnimation.swift │ └── ZLCustomAlertAction+Color.swift │ ├── Example-Bridging-Header.h │ ├── Extension │ └── UIColor+Hex.swift │ ├── FLAnimatedImage │ ├── FLAnimatedImage.h │ ├── FLAnimatedImage.m │ ├── FLAnimatedImageView.h │ └── FLAnimatedImageView.m │ ├── ImageCell.swift │ ├── ImageStickerContainerView.swift │ ├── Info.plist │ ├── Kingfisher │ ├── Cache │ │ ├── CacheSerializer.swift │ │ ├── DiskStorage.swift │ │ ├── FormatIndicatedCacheSerializer.swift │ │ ├── ImageCache.swift │ │ ├── MemoryStorage.swift │ │ └── Storage.swift │ ├── Extensions │ │ ├── CPListItem+Kingfisher.swift │ │ ├── ImageView+Kingfisher.swift │ │ ├── NSButton+Kingfisher.swift │ │ ├── NSTextAttachment+Kingfisher.swift │ │ ├── TVMonogramView+Kingfisher.swift │ │ ├── UIButton+Kingfisher.swift │ │ └── WKInterfaceImage+Kingfisher.swift │ ├── General │ │ ├── ImageSource │ │ │ ├── AVAssetImageDataProvider.swift │ │ │ ├── ImageDataProvider.swift │ │ │ ├── Resource.swift │ │ │ └── Source.swift │ │ ├── KF.swift │ │ ├── KFOptionsSetter.swift │ │ ├── Kingfisher.swift │ │ ├── KingfisherError.swift │ │ ├── KingfisherManager.swift │ │ └── KingfisherOptionsInfo.swift │ ├── Image │ │ ├── Filter.swift │ │ ├── GIFAnimatedImage.swift │ │ ├── GraphicsContext.swift │ │ ├── Image.swift │ │ ├── ImageDrawing.swift │ │ ├── ImageFormat.swift │ │ ├── ImageProcessor.swift │ │ ├── ImageProgressive.swift │ │ ├── ImageTransition.swift │ │ └── Placeholder.swift │ ├── Networking │ │ ├── AuthenticationChallengeResponsable.swift │ │ ├── ImageDataProcessor.swift │ │ ├── ImageDownloader.swift │ │ ├── ImageDownloaderDelegate.swift │ │ ├── ImageModifier.swift │ │ ├── ImagePrefetcher.swift │ │ ├── RedirectHandler.swift │ │ ├── RequestModifier.swift │ │ ├── RetryStrategy.swift │ │ ├── SessionDataTask.swift │ │ └── SessionDelegate.swift │ ├── Utility │ │ ├── Box.swift │ │ ├── CallbackQueue.swift │ │ ├── Delegate.swift │ │ ├── ExtensionHelpers.swift │ │ ├── Result.swift │ │ ├── Runtime.swift │ │ ├── SizeExtensions.swift │ │ └── String+MD5.swift │ └── Views │ │ ├── AnimatedImageView.swift │ │ └── Indicator.swift │ ├── LanguagePickerView.swift │ ├── PhotoConfigureCNViewController.swift │ ├── PhotoConfigureViewController.swift │ ├── SnapKit │ ├── Constraint.swift │ ├── ConstraintAttributes.swift │ ├── ConstraintConfig.swift │ ├── ConstraintConstantTarget.swift │ ├── ConstraintDSL.swift │ ├── ConstraintDescription.swift │ ├── ConstraintDirectionalInsetTarget.swift │ ├── ConstraintDirectionalInsets.swift │ ├── ConstraintInsetTarget.swift │ ├── ConstraintInsets.swift │ ├── ConstraintItem.swift │ ├── ConstraintLayoutGuide+Extensions.swift │ ├── ConstraintLayoutGuide.swift │ ├── ConstraintLayoutGuideDSL.swift │ ├── ConstraintLayoutSupport.swift │ ├── ConstraintLayoutSupportDSL.swift │ ├── ConstraintMaker.swift │ ├── ConstraintMakerEditable.swift │ ├── ConstraintMakerExtendable.swift │ ├── ConstraintMakerFinalizable.swift │ ├── ConstraintMakerPriortizable.swift │ ├── ConstraintMakerRelatable+Extensions.swift │ ├── ConstraintMakerRelatable.swift │ ├── ConstraintMultiplierTarget.swift │ ├── ConstraintOffsetTarget.swift │ ├── ConstraintPriority.swift │ ├── ConstraintPriorityTarget.swift │ ├── ConstraintRelatableTarget.swift │ ├── ConstraintRelation.swift │ ├── ConstraintView+Extensions.swift │ ├── ConstraintView.swift │ ├── ConstraintViewDSL.swift │ ├── Debugging.swift │ ├── LayoutConstraint.swift │ ├── LayoutConstraintItem.swift │ ├── SnapKit.h │ ├── Typealiases.swift │ └── UILayoutSupport+Extensions.swift │ ├── ViewController.swift │ ├── WeChatMomentDemoViewController.swift │ ├── ZLCustomFilter.swift │ ├── ar.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── de.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── es-419.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── fr.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── id.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── it.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── ja.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── ko.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── ms.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── nl.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── pt-BR.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── ru.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── tr.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── vi.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ ├── zh-Hans.lproj │ ├── LaunchScreen.strings │ └── Main.strings │ └── zh-Hant.lproj │ ├── LaunchScreen.strings │ └── Main.strings ├── LICENSE ├── Package.swift ├── README.md ├── README_CN.md ├── Sources ├── Animation │ ├── ZLClipImageDismissAnimatedTransition.swift │ ├── ZLImagePreviewDismissInteractiveTransition.swift │ ├── ZLPhotoPreviewAnimatedTransition.swift │ └── ZLPhotoPreviewPopInteractiveTransition.swift ├── Camera │ └── ZLCustomCamera.swift ├── Edit │ ├── ZLAdjustSlider.swift │ ├── ZLBaseStickerView.swift │ ├── ZLBaseStickertState.swift │ ├── ZLClipImageViewController.swift │ ├── ZLClipOverlayView.swift │ ├── ZLEditImageViewController.swift │ ├── ZLEditToolCells.swift │ ├── ZLEditVideoViewController.swift │ ├── ZLEditorManager.swift │ ├── ZLFilter.swift │ ├── ZLImageStickerView.swift │ ├── ZLInputTextViewController.swift │ ├── ZLPaths.swift │ └── ZLTextStickerView.swift ├── Extensions │ ├── AVCaptureDevice+ZLPhotoBrowser.swift │ ├── Array+ZLPhotoBrowser.swift │ ├── Bool+ZLPhotoBrowser.swift │ ├── Bundle+ZLPhotoBrowser.swift │ ├── CGFloat+ZLPhotoBrowser.swift │ ├── Cell+ZLPhotoBrowser.swift │ ├── NSError+ZLPhotoBrowser.swift │ ├── PHAsset+ZLPhotoBrowser.swift │ ├── PHPhotoLibrary+ZLPhotoBrowser.swift │ ├── Runtime+ZLPhotoBrowser.swift │ ├── String+ZLPhotoBrowser.swift │ ├── UIColor+ZLPhotoBrowser.swift │ ├── UIFont+ZLPhotoBrowser.swift │ ├── UIGraphicsImageRenderer+ZLPhotoBrowser.swift │ ├── UIImage+ZLPhotoBrowser.swift │ ├── UIScrollView+ZLPhotoBrowser.swift │ ├── UIView+ZLPhotoBrowser.swift │ └── UIViewController+ZLPhotoBrowser.swift ├── General │ ├── ZLAddPhotoCell.swift │ ├── ZLAlbumListCell.swift │ ├── ZLAlbumListController.swift │ ├── ZLAlbumListModel.swift │ ├── ZLAnimationUtils.swift │ ├── ZLCameraCell.swift │ ├── ZLCameraConfiguration.swift │ ├── ZLCollectionViewFlowLayout.swift │ ├── ZLCustomAlertProtocol.swift │ ├── ZLEditImageConfiguration.swift │ ├── ZLEmbedAlbumListView.swift │ ├── ZLEnlargeButton.swift │ ├── ZLFetchImageOperation.swift │ ├── ZLGeneralDefine.swift │ ├── ZLImageNavController.swift │ ├── ZLImagePreviewController.swift │ ├── ZLLanguageDefine.swift │ ├── ZLNoAuthTipsView.swift │ ├── ZLPhotoBrowser.swift │ ├── ZLPhotoConfiguration+Chaining.swift │ ├── ZLPhotoConfiguration.swift │ ├── ZLPhotoManager.swift │ ├── ZLPhotoModel.swift │ ├── ZLPhotoPicker.swift │ ├── ZLPhotoPreviewCell.swift │ ├── ZLPhotoPreviewController.swift │ ├── ZLPhotoPreviewSheet.swift │ ├── ZLPhotoUIConfiguration+Chaining.swift │ ├── ZLPhotoUIConfiguration.swift │ ├── ZLProgressHUD.swift │ ├── ZLProgressView.swift │ ├── ZLResultModel.swift │ ├── ZLThumbnailPhotoCell.swift │ ├── ZLThumbnailViewController.swift │ ├── ZLVideoManager.swift │ ├── ZLWeakProxy.h │ ├── ZLWeakProxy.m │ └── ZLWeakProxy.swift ├── Info.plist ├── PrivacyInfo.xcprivacy ├── ZLPhotoBrowser.bundle │ ├── ar.lproj │ │ └── Localizable.strings │ ├── de.lproj │ │ └── Localizable.strings │ ├── en.lproj │ │ └── Localizable.strings │ ├── es-419.lproj │ │ └── Localizable.strings │ ├── fr.lproj │ │ └── Localizable.strings │ ├── id.lproj │ │ └── Localizable.strings │ ├── it.lproj │ │ └── Localizable.strings │ ├── ja-US.lproj │ │ └── Localizable.strings │ ├── ko.lproj │ │ └── Localizable.strings │ ├── ms.lproj │ │ └── Localizable.strings │ ├── nl.lproj │ │ └── Localizable.strings │ ├── pt-BR.lproj │ │ └── Localizable.strings │ ├── ru.lproj │ │ └── Localizable.strings │ ├── tr.lproj │ │ └── Localizable.strings │ ├── vi.lproj │ │ └── Localizable.strings │ ├── zh-Hans.lproj │ │ └── Localizable.strings │ ├── zh-Hant.lproj │ │ └── Localizable.strings │ ├── zl_ablumList_arrow@2x.png │ ├── zl_ablumList_arrow@3x.png │ ├── zl_addPhoto@2x.png │ ├── zl_addPhoto@3x.png │ ├── zl_adjust@2x.png │ ├── zl_adjust@3x.png │ ├── zl_adjust_selected@2x.png │ ├── zl_adjust_selected@3x.png │ ├── zl_albumSelect@2x.png │ ├── zl_albumSelect@3x.png │ ├── zl_arrow_down@2x.png │ ├── zl_arrow_down@3x.png │ ├── zl_ashbin@2x.png │ ├── zl_ashbin@3x.png │ ├── zl_ashbin_open@2x.png │ ├── zl_ashbin_open@3x.png │ ├── zl_brightness@2x.png │ ├── zl_brightness@3x.png │ ├── zl_brightness_selected@2x.png │ ├── zl_brightness_selected@3x.png │ ├── zl_btn_original_circle@2x.png │ ├── zl_btn_original_circle@3x.png │ ├── zl_btn_original_selected@2x.png │ ├── zl_btn_original_selected@3x.png │ ├── zl_btn_selected@2x.png │ ├── zl_btn_selected@3x.png │ ├── zl_btn_unselected@2x.png │ ├── zl_btn_unselected@3x.png │ ├── zl_btn_unselected_with_check@2x.png │ ├── zl_btn_unselected_with_check@3x.png │ ├── zl_camera_close@2x.png │ ├── zl_camera_close@3x.png │ ├── zl_clip@2x.png │ ├── zl_clip@3x.png │ ├── zl_close@2x.png │ ├── zl_close@3x.png │ ├── zl_contrast@2x.png │ ├── zl_contrast@3x.png │ ├── zl_contrast_selected@2x.png │ ├── zl_contrast_selected@3x.png │ ├── zl_defaultphoto.png │ ├── zl_downArrow@2x.png │ ├── zl_downArrow@3x.png │ ├── zl_drawLine@2x.png │ ├── zl_drawLine@3x.png │ ├── zl_drawLine_selected@2x.png │ ├── zl_drawLine_selected@3x.png │ ├── zl_editImage_tag@2x.png │ ├── zl_editImage_tag@3x.png │ ├── zl_eraser@2x.png │ ├── zl_eraser@3x.png │ ├── zl_eraser_circle@2x.png │ ├── zl_eraser_circle@3x.png │ ├── zl_filter@2x.png │ ├── zl_filter@3x.png │ ├── zl_filter_selected@2x.png │ ├── zl_filter_selected@3x.png │ ├── zl_flash_off@2x.png │ ├── zl_flash_off@3x.png │ ├── zl_flash_on@2x.png │ ├── zl_flash_on@3x.png │ ├── zl_focus@2x.png │ ├── zl_focus@3x.png │ ├── zl_ic_left@2x.png │ ├── zl_ic_left@3x.png │ ├── zl_ic_right@2x.png │ ├── zl_ic_right@3x.png │ ├── zl_imageSticker@2x.png │ ├── zl_imageSticker@3x.png │ ├── zl_input_font@2x.png │ ├── zl_input_font@3x.png │ ├── zl_input_font_bg@2x.png │ ├── zl_input_font_bg@3x.png │ ├── zl_input_font_shadow@2x.png │ ├── zl_input_font_shadow@3x.png │ ├── zl_input_font_stroke@2x.png │ ├── zl_input_font_stroke@3x.png │ ├── zl_livePhoto@2x.png │ ├── zl_livePhoto@3x.png │ ├── zl_loading_dark@2x.png │ ├── zl_loading_dark@3x.png │ ├── zl_loading_light@2x.png │ ├── zl_loading_light@3x.png │ ├── zl_mosaic@2x.png │ ├── zl_mosaic@3x.png │ ├── zl_mosaic_selected@2x.png │ ├── zl_mosaic_selected@3x.png │ ├── zl_navBack@2x.png │ ├── zl_navBack@3x.png │ ├── zl_navClose@2x.png │ ├── zl_navClose@3x.png │ ├── zl_pauseButtonWhite@2x.png │ ├── zl_pauseButtonWhite@3x.png │ ├── zl_playButtonWhite@2x.png │ ├── zl_playButtonWhite@3x.png │ ├── zl_playVideo@2x.png │ ├── zl_playVideo@3x.png │ ├── zl_redo@2x.png │ ├── zl_redo@3x.png │ ├── zl_redo_disable@2x.png │ ├── zl_redo_disable@3x.png │ ├── zl_retake@2x.png │ ├── zl_retake@3x.png │ ├── zl_right@2x.png │ ├── zl_right@3x.png │ ├── zl_right_arrow@2x.png │ ├── zl_right_arrow@3x.png │ ├── zl_rotateimage@2x.png │ ├── zl_rotateimage@3x.png │ ├── zl_saturation@2x.png │ ├── zl_saturation@3x.png │ ├── zl_saturation_selected@2x.png │ ├── zl_saturation_selected@3x.png │ ├── zl_shadow@2x.png │ ├── zl_shadow@3x.png │ ├── zl_takePhoto@2x.png │ ├── zl_takePhoto@3x.png │ ├── zl_textSticker@2x.png │ ├── zl_textSticker@3x.png │ ├── zl_toggle_camera@2x.png │ ├── zl_toggle_camera@3x.png │ ├── zl_undo@2x.png │ ├── zl_undo@3x.png │ ├── zl_undo_disable@2x.png │ ├── zl_undo_disable@3x.png │ ├── zl_video@2x.png │ ├── zl_video@3x.png │ ├── zl_videoLoadFailed@2x.png │ ├── zl_videoLoadFailed@3x.png │ ├── zl_warning@2x.png │ └── zl_warning@3x.png └── ZLPhotoBrowser.h ├── SwiftUIExample ├── SwiftUIExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── SwiftUIExample │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ ├── PhotoPicker.swift │ ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json │ └── SwiftUIExampleApp.swift ├── Tests ├── LinuxMain.swift └── ZLPhotoBrowserTests │ ├── XCTestManifests.swift │ └── ZLPhotoBrowserTests.swift ├── ZLPhotoBrowser.podspec ├── ZLPhotoBrowser.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── ZLPhotoBrowser.xcscheme └── ZLPhotoBrowser.xcworkspace ├── contents.xcworkspacedata └── xcshareddata └── IDEWorkspaceChecks.plist /.github/ISSUE_TEMPLATE.MD: -------------------------------------------------------------------------------- 1 | ### Issue Description 2 | 3 | #### Description and Steps 4 | 5 | Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue. 6 | 7 | #### Info 8 | ZLPhotoBrowser version: e.g. 4.6.0.1 9 | Device: e.g. iPhone 14 Pro 10 | Device version: e.g. iOS 16.0 11 | Xcode version: e.g. Xcode 14.0 12 | 13 | #### Configuration code of `ZLPhotoConfiguration` 14 | 15 | ``` 16 | Paste your code here. 17 | ``` 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/cocoapods,swift 3 | 4 | ### CocoaPods ### 5 | ## CocoaPods GitIgnore Template 6 | 7 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing 8 | # - Also handy if you have a large number of dependant pods 9 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE 10 | Pods/ 11 | 12 | ### Swift ### 13 | # Xcode 14 | # 15 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 16 | 17 | ## Build generated 18 | build/ 19 | DerivedData/ 20 | 21 | ## Various settings 22 | *.pbxuser 23 | !default.pbxuser 24 | *.mode1v3 25 | !default.mode1v3 26 | *.mode2v3 27 | !default.mode2v3 28 | *.perspectivev3 29 | !default.perspectivev3 30 | xcuserdata/ 31 | *.xcscheme 32 | 33 | ## Other 34 | *.moved-aside 35 | *.xccheckout 36 | *.xcscmblueprint 37 | 38 | ## Obj-C/Swift specific 39 | *.hmap 40 | *.ipa 41 | *.dSYM.zip 42 | *.dSYM 43 | *.sketch 44 | 45 | build_new_release.py 46 | 47 | # CocoaPods - Refactored to standalone file 48 | 49 | 50 | # Carthage - Refactored to standalone file 51 | 52 | # fastlane 53 | # 54 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 55 | # screenshots whenever they are needed. 56 | # For more information about the recommended setup visit: 57 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 58 | 59 | fastlane/report.xml 60 | fastlane/Preview.html 61 | fastlane/screenshots 62 | fastlane/test_output 63 | 64 | # Code Injection 65 | # 66 | # After new code Injection tools there's a generated folder /iOSInjectionProject 67 | # https://github.com/johnno1962/injectionforxcode 68 | 69 | iOSInjectionProject/ 70 | 71 | ### Objective-C Patch ### 72 | 73 | Carthage/Build 74 | Carthage/Checkouts 75 | 76 | ### FLEX 77 | Example/Example/Sources 78 | 79 | # End of https://www.gitignore.io/api/cocoapods,objective-c 80 | Sources/.DS_Store 81 | .DS_Store 82 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: Swift 2 | osx_image: xcode10.1 3 | xcode_workspace: ZLPhotoBrowser 4 | xcode_scheme: ZLPhotoBrowser 5 | xcode_sdk: iphonesimulator12.1 6 | before_install: 7 | - xcodebuild -showsdks 8 | - brew update 9 | - brew outdated carthage || brew upgrade carthage 10 | before_script: 11 | - carthage bootstrap 12 | before_deploy: 13 | - carthage build --no-skip-current 14 | - carthage archive $FRAMEWORK_NAME 15 | script: 16 | - xcodebuild clean build -sdk iphonesimulator12.1 -workspace ZLPhotoBrowser.xcworkspace -scheme ZLPhotoBrowser CODE_SIGNING_REQUIRED=NO 17 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by long on 2020/8/11. 6 | // 7 | 8 | import UIKit 9 | 10 | @UIApplicationMain 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 | self.window = UIWindow(frame: UIScreen.main.bounds) 17 | 18 | let nav = UINavigationController(rootViewController: ViewController()) 19 | self.window?.rootViewController = nav 20 | 21 | self.window?.makeKeyAndVisible() 22 | 23 | return true 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/addPhoto.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "addPhoto@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "addPhoto@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/addPhoto.imageset/addPhoto@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/addPhoto.imageset/addPhoto@2x.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/addPhoto.imageset/addPhoto@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/addPhoto.imageset/addPhoto@3x.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "close@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "close@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/close.imageset/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/close.imageset/close@2x.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/close.imageset/close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/close.imageset/close@3x.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/image1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "image1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/image1.imageset/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/image1.imageset/image1.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/image2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "image2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/image2.imageset/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/image2.imageset/image2.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/image3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "image3.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/image3.imageset/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/image3.imageset/image3.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker1.imageset/imageSticker1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker1.imageset/imageSticker1.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker10.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker10.imageset/imageSticker10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker10.imageset/imageSticker10.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker11.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker11.imageset/imageSticker11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker11.imageset/imageSticker11.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker12.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker12.imageset/imageSticker12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker12.imageset/imageSticker12.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker13.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker13.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker13.imageset/imageSticker13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker13.imageset/imageSticker13.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker14.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker14.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker14.imageset/imageSticker14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker14.imageset/imageSticker14.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker15.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker15.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker15.imageset/imageSticker15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker15.imageset/imageSticker15.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker16.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker16.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker16.imageset/imageSticker16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker16.imageset/imageSticker16.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker17.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker17.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker17.imageset/imageSticker17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker17.imageset/imageSticker17.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker18.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker18.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker18.imageset/imageSticker18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker18.imageset/imageSticker18.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker2.imageset/imageSticker2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker2.imageset/imageSticker2.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker3.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker3.imageset/imageSticker3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker3.imageset/imageSticker3.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker4.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker4.imageset/imageSticker4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker4.imageset/imageSticker4.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker5.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker5.imageset/imageSticker5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker5.imageset/imageSticker5.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker6.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker6.imageset/imageSticker6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker6.imageset/imageSticker6.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker7.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker7.imageset/imageSticker7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker7.imageset/imageSticker7.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker8.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker8.imageset/imageSticker8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker8.imageset/imageSticker8.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "imageSticker9.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/imageSticker9.imageset/imageSticker9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/imageSticker9.imageset/imageSticker9.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/playVideo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "playVideo@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "playVideo@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/playVideo.imageset/playVideo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/playVideo.imageset/playVideo@2x.png -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/playVideo.imageset/playVideo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Example/Example/Assets.xcassets/playVideo.imageset/playVideo@3x.png -------------------------------------------------------------------------------- /Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/CustomAlert/ZLCustomAlertAction+Color.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLCustomAlertAction+Color.swift 3 | // Example 4 | // 5 | // Created by long on 2022/7/1. 6 | // 7 | 8 | import ZLPhotoBrowser 9 | import UIKit 10 | 11 | extension ZLCustomAlertAction.Style { 12 | var color: UIColor { 13 | switch self { 14 | case .default, .cancel: 15 | return UIColor.color(hexRGB: 0x171717) 16 | case .tint: 17 | return UIColor.color(hexRGB: 0x4F638E) 18 | case .destructive: 19 | return UIColor.color(hexRGB: 0xEB2F58) 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/Example/Example-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "FLAnimatedImageView.h" 6 | #import "FLAnimatedImage.h" 7 | //#import "FLEXManager.h" 8 | -------------------------------------------------------------------------------- /Example/Example/Extension/UIColor+Hex.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Hex.swift 3 | // Example 4 | // 5 | // Created by long on 2022/7/1. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIColor { 11 | class func color(hexRGB: Int64, alpha: CGFloat = 1.0) -> UIColor { 12 | let r: Int64 = (hexRGB & 0xFF0000) >> 16 13 | let g: Int64 = (hexRGB & 0xFF00) >> 8 14 | let b: Int64 = (hexRGB & 0xFF) 15 | 16 | let color = UIColor( 17 | red: CGFloat(r) / 255.0, 18 | green: CGFloat(g) / 255.0, 19 | blue: CGFloat(b) / 255.0, 20 | alpha: alpha 21 | ) 22 | 23 | return color 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/Example/FLAnimatedImage/FLAnimatedImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FLAnimatedImageView.h 3 | // Flipboard 4 | // 5 | // Created by Raphael Schaad on 7/8/13. 6 | // Copyright (c) Flipboard. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | 12 | @class FLAnimatedImage; 13 | @protocol FLAnimatedImageViewDebugDelegate; 14 | 15 | 16 | // 17 | // An `FLAnimatedImageView` can take an `FLAnimatedImage` and plays it automatically when in view hierarchy and stops when removed. 18 | // The animation can also be controlled with the `UIImageView` methods `-start/stop/isAnimating`. 19 | // It is a fully compatible `UIImageView` subclass and can be used as a drop-in component to work with existing code paths expecting to display a `UIImage`. 20 | // Under the hood it uses a `CADisplayLink` for playback, which can be inspected with `currentFrame` & `currentFrameIndex`. 21 | // 22 | @interface FLAnimatedImageView : UIImageView 23 | 24 | // Setting `[UIImageView.image]` to a non-`nil` value clears out existing `animatedImage`. 25 | // And vice versa, setting `animatedImage` will initially populate the `[UIImageView.image]` to its `posterImage` and then start animating and hold `currentFrame`. 26 | @property (nonatomic, strong) FLAnimatedImage *animatedImage; 27 | @property (nonatomic, copy) void(^loopCompletionBlock)(NSUInteger loopCountRemaining); 28 | 29 | @property (nonatomic, strong, readonly) UIImage *currentFrame; 30 | @property (nonatomic, assign, readonly) NSUInteger currentFrameIndex; 31 | 32 | // The animation runloop mode. Enables playback during scrolling by allowing timer events (i.e. animation) with NSRunLoopCommonModes. 33 | // To keep scrolling smooth on single-core devices such as iPhone 3GS/4 and iPod Touch 4th gen, the default run loop mode is NSDefaultRunLoopMode. Otherwise, the default is NSDefaultRunLoopMode. 34 | @property (nonatomic, copy) NSRunLoopMode runLoopMode; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Example/Example/ImageCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageCell.swift 3 | // Example 4 | // 5 | // Created by long on 2020/8/20. 6 | // 7 | 8 | import UIKit 9 | 10 | class ImageCell: UICollectionViewCell { 11 | 12 | var imageView: UIImageView! 13 | 14 | override init(frame: CGRect) { 15 | super.init(frame: frame) 16 | 17 | self.imageView = UIImageView() 18 | self.imageView.clipsToBounds = true 19 | self.imageView.contentMode = .scaleAspectFill 20 | self.contentView.addSubview(self.imageView) 21 | } 22 | 23 | required init?(coder: NSCoder) { 24 | fatalError("init(coder:) has not been implemented") 25 | } 26 | 27 | override func layoutSubviews() { 28 | super.layoutSubviews() 29 | self.imageView.frame = self.bounds 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Example/Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleAllowMixedLocalizations 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | NSCameraUsageDescription 31 | 需要相机权限 32 | NSMicrophoneUsageDescription 33 | 需要麦克风权限 34 | NSPhotoLibraryAddUsageDescription 35 | 需要写入相册权限 36 | NSPhotoLibraryUsageDescription 37 | 需要访问相册权限 38 | PHPhotoLibraryPreventAutomaticLimitedAccessAlert 39 | 40 | UIApplicationSupportsIndirectInputEvents 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIMainStoryboardFile 45 | Main 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UISupportedInterfaceOrientations~ipad 57 | 58 | UIInterfaceOrientationPortrait 59 | UIInterfaceOrientationPortraitUpsideDown 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Example/Example/Kingfisher/Utility/Box.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Box.swift 3 | // Kingfisher 4 | // 5 | // Created by Wei Wang on 2018/3/17. 6 | // Copyright (c) 2019 Wei Wang 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | import Foundation 27 | 28 | class Box { 29 | var value: T 30 | 31 | init(_ value: T) { 32 | self.value = value 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Example/Example/Kingfisher/Utility/Result.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Result.swift 3 | // Kingfisher 4 | // 5 | // Created by onevcat on 2018/09/22. 6 | // 7 | // Copyright (c) 2019 Wei Wang 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Foundation 28 | 29 | // These helper methods are not public since we do not want them to be exposed or cause any conflicting. 30 | // However, they are just wrapper of `ResultUtil` static methods. 31 | extension Result where Failure: Error { 32 | 33 | /// Evaluates the given transform closures to create a single output value. 34 | /// 35 | /// - Parameters: 36 | /// - onSuccess: A closure that transforms the success value. 37 | /// - onFailure: A closure that transforms the error value. 38 | /// - Returns: A single `Output` value. 39 | func match( 40 | onSuccess: (Success) -> Output, 41 | onFailure: (Failure) -> Output) -> Output 42 | { 43 | switch self { 44 | case let .success(value): 45 | return onSuccess(value) 46 | case let .failure(error): 47 | return onFailure(error) 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Example/Kingfisher/Utility/Runtime.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Runtime.swift 3 | // Kingfisher 4 | // 5 | // Created by Wei Wang on 2018/10/12. 6 | // 7 | // Copyright (c) 2019 Wei Wang 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Foundation 28 | 29 | func getAssociatedObject(_ object: Any, _ key: UnsafeRawPointer) -> T? { 30 | return objc_getAssociatedObject(object, key) as? T 31 | } 32 | 33 | func setRetainedAssociatedObject(_ object: Any, _ key: UnsafeRawPointer, _ value: T) { 34 | objc_setAssociatedObject(object, key, value, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 35 | } 36 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection 27 | #else 28 | import AppKit 29 | public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection 30 | #endif 31 | 32 | 33 | public struct ConstraintConfig { 34 | 35 | public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintDirectionalInsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | #if os(iOS) || os(tvOS) 31 | public protocol ConstraintDirectionalInsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | @available(iOS 11.0, tvOS 11.0, *) 35 | extension ConstraintDirectionalInsets: ConstraintDirectionalInsetTarget { 36 | } 37 | 38 | extension ConstraintDirectionalInsetTarget { 39 | 40 | @available(iOS 11.0, tvOS 11.0, *) 41 | internal var constraintDirectionalInsetTargetValue: ConstraintDirectionalInsets { 42 | if let amount = self as? ConstraintDirectionalInsets { 43 | return amount 44 | } else { 45 | return ConstraintDirectionalInsets(top: 0, leading: 0, bottom: 0, trailing: 0) 46 | } 47 | } 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintDirectionalInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 11.0, tvOS 11.0, *) 33 | public typealias ConstraintDirectionalInsets = NSDirectionalEdgeInsets 34 | #endif 35 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintInsets = UIEdgeInsets 33 | #else 34 | public typealias ConstraintInsets = NSEdgeInsets 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public final class ConstraintItem { 32 | 33 | internal weak var target: AnyObject? 34 | internal let attributes: ConstraintAttributes 35 | 36 | internal init(target: AnyObject?, attributes: ConstraintAttributes) { 37 | self.target = target 38 | self.attributes = attributes 39 | } 40 | 41 | internal var layoutConstraintItem: LayoutConstraintItem? { 42 | return self.target as? LayoutConstraintItem 43 | } 44 | 45 | } 46 | 47 | public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { 48 | // pointer equality 49 | guard lhs !== rhs else { 50 | return true 51 | } 52 | 53 | // must both have valid targets and identical attributes 54 | guard let target1 = lhs.target, 55 | let target2 = rhs.target, 56 | target1 === target2 && lhs.attributes == rhs.attributes else { 57 | return false 58 | } 59 | 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintLayoutGuide+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 9.0, OSX 10.11, *) 30 | public extension ConstraintLayoutGuide { 31 | 32 | var snp: ConstraintLayoutGuideDSL { 33 | return ConstraintLayoutGuideDSL(guide: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintLayoutGuide.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 9.0, *) 33 | public typealias ConstraintLayoutGuide = UILayoutGuide 34 | #else 35 | @available(OSX 10.11, *) 36 | public typealias ConstraintLayoutGuide = NSLayoutGuide 37 | #endif 38 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintLayoutGuideDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 9.0, OSX 10.11, *) 32 | public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { 33 | 34 | @discardableResult 35 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 36 | return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure) 37 | } 38 | 39 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 40 | ConstraintMaker.makeConstraints(item: self.guide, closure: closure) 41 | } 42 | 43 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 44 | ConstraintMaker.remakeConstraints(item: self.guide, closure: closure) 45 | } 46 | 47 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 48 | ConstraintMaker.updateConstraints(item: self.guide, closure: closure) 49 | } 50 | 51 | public func removeConstraints() { 52 | ConstraintMaker.removeConstraints(item: self.guide) 53 | } 54 | 55 | public var target: AnyObject? { 56 | return self.guide 57 | } 58 | 59 | internal let guide: ConstraintLayoutGuide 60 | 61 | internal init(guide: ConstraintLayoutGuide) { 62 | self.guide = guide 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintLayoutSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 8.0, *) 33 | public typealias ConstraintLayoutSupport = UILayoutSupport 34 | #else 35 | public class ConstraintLayoutSupport {} 36 | #endif 37 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintLayoutSupportDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 8.0, *) 32 | public struct ConstraintLayoutSupportDSL: ConstraintDSL { 33 | 34 | public var target: AnyObject? { 35 | return self.support 36 | } 37 | 38 | internal let support: ConstraintLayoutSupport 39 | 40 | internal init(support: ConstraintLayoutSupport) { 41 | self.support = support 42 | 43 | } 44 | 45 | public var top: ConstraintItem { 46 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) 47 | } 48 | 49 | public var bottom: ConstraintItem { 50 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) 51 | } 52 | 53 | public var height: ConstraintItem { 54 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintMakerEditable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerEditable: ConstraintMakerPriortizable { 32 | 33 | @discardableResult 34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 35 | self.description.multiplier = amount 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) 42 | } 43 | 44 | @discardableResult 45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { 46 | self.description.constant = amount.constraintOffsetTargetValue 47 | return self 48 | } 49 | 50 | @discardableResult 51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { 52 | self.description.constant = amount.constraintInsetTargetValue 53 | return self 54 | } 55 | 56 | #if os(iOS) || os(tvOS) 57 | @discardableResult 58 | @available(iOS 11.0, tvOS 11.0, *) 59 | public func inset(_ amount: ConstraintDirectionalInsetTarget) -> ConstraintMakerEditable { 60 | self.description.constant = amount.constraintDirectionalInsetTargetValue 61 | return self 62 | } 63 | #endif 64 | } 65 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintMakerFinalizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerFinalizable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | @discardableResult 40 | public func labeled(_ label: String) -> ConstraintMakerFinalizable { 41 | self.description.label = label 42 | return self 43 | } 44 | 45 | public var constraint: Constraint { 46 | return self.description.constraint! 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintMultiplierTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintMultiplierTarget { 32 | 33 | var constraintMultiplierTargetValue: CGFloat { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintMultiplierTarget { 38 | 39 | public var constraintMultiplierTargetValue: CGFloat { 40 | return CGFloat(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintMultiplierTarget { 46 | 47 | public var constraintMultiplierTargetValue: CGFloat { 48 | return CGFloat(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintMultiplierTarget { 54 | 55 | public var constraintMultiplierTargetValue: CGFloat { 56 | return CGFloat(self) 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintMultiplierTarget { 62 | 63 | public var constraintMultiplierTargetValue: CGFloat { 64 | return CGFloat(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintMultiplierTarget { 70 | 71 | public var constraintMultiplierTargetValue: CGFloat { 72 | return self 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintOffsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintOffsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintOffsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintOffsetTarget { 38 | } 39 | 40 | extension Float: ConstraintOffsetTarget { 41 | } 42 | 43 | extension Double: ConstraintOffsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintOffsetTarget { 47 | } 48 | 49 | extension ConstraintOffsetTarget { 50 | 51 | internal var constraintOffsetTargetValue: CGFloat { 52 | let offset: CGFloat 53 | if let amount = self as? Float { 54 | offset = CGFloat(amount) 55 | } else if let amount = self as? Double { 56 | offset = CGFloat(amount) 57 | } else if let amount = self as? CGFloat { 58 | offset = CGFloat(amount) 59 | } else if let amount = self as? Int { 60 | offset = CGFloat(amount) 61 | } else if let amount = self as? UInt { 62 | offset = CGFloat(amount) 63 | } else { 64 | offset = 0.0 65 | } 66 | return offset 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintPriority.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public struct ConstraintPriority : ExpressibleByFloatLiteral, Equatable, Strideable { 31 | public typealias FloatLiteralType = Float 32 | 33 | public let value: Float 34 | 35 | public init(floatLiteral value: Float) { 36 | self.value = value 37 | } 38 | 39 | public init(_ value: Float) { 40 | self.value = value 41 | } 42 | 43 | public static var required: ConstraintPriority { 44 | return 1000.0 45 | } 46 | 47 | public static var high: ConstraintPriority { 48 | return 750.0 49 | } 50 | 51 | public static var medium: ConstraintPriority { 52 | #if os(OSX) 53 | return 501.0 54 | #else 55 | return 500.0 56 | #endif 57 | 58 | } 59 | 60 | public static var low: ConstraintPriority { 61 | return 250.0 62 | } 63 | 64 | public static func ==(lhs: ConstraintPriority, rhs: ConstraintPriority) -> Bool { 65 | return lhs.value == rhs.value 66 | } 67 | 68 | // MARK: Strideable 69 | 70 | public func advanced(by n: FloatLiteralType) -> ConstraintPriority { 71 | return ConstraintPriority(floatLiteral: value + n) 72 | } 73 | 74 | public func distance(to other: ConstraintPriority) -> FloatLiteralType { 75 | return other.value - value 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintPriorityTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintPriorityTarget { 32 | 33 | var constraintPriorityTargetValue: Float { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintPriorityTarget { 38 | 39 | public var constraintPriorityTargetValue: Float { 40 | return Float(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintPriorityTarget { 46 | 47 | public var constraintPriorityTargetValue: Float { 48 | return Float(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintPriorityTarget { 54 | 55 | public var constraintPriorityTargetValue: Float { 56 | return self 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintPriorityTarget { 62 | 63 | public var constraintPriorityTargetValue: Float { 64 | return Float(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintPriorityTarget { 70 | 71 | public var constraintPriorityTargetValue: Float { 72 | return Float(self) 73 | } 74 | 75 | } 76 | 77 | #if os(iOS) || os(tvOS) 78 | extension UILayoutPriority: ConstraintPriorityTarget { 79 | 80 | public var constraintPriorityTargetValue: Float { 81 | return self.rawValue 82 | } 83 | 84 | } 85 | #endif 86 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintRelatableTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintRelatableTarget { 32 | } 33 | 34 | extension Int: ConstraintRelatableTarget { 35 | } 36 | 37 | extension UInt: ConstraintRelatableTarget { 38 | } 39 | 40 | extension Float: ConstraintRelatableTarget { 41 | } 42 | 43 | extension Double: ConstraintRelatableTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintRelatableTarget { 47 | } 48 | 49 | extension CGSize: ConstraintRelatableTarget { 50 | } 51 | 52 | extension CGPoint: ConstraintRelatableTarget { 53 | } 54 | 55 | extension ConstraintInsets: ConstraintRelatableTarget { 56 | } 57 | 58 | #if os(iOS) || os(tvOS) 59 | @available(iOS 11.0, tvOS 11.0, *) 60 | extension ConstraintDirectionalInsets: ConstraintRelatableTarget { 61 | } 62 | #endif 63 | 64 | extension ConstraintItem: ConstraintRelatableTarget { 65 | } 66 | 67 | extension ConstraintView: ConstraintRelatableTarget { 68 | } 69 | 70 | @available(iOS 9.0, OSX 10.11, *) 71 | extension ConstraintLayoutGuide: ConstraintRelatableTarget { 72 | } 73 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintRelation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | internal enum ConstraintRelation : Int { 32 | case equal = 1 33 | case lessThanOrEqual 34 | case greaterThanOrEqual 35 | 36 | internal var layoutRelation: LayoutRelation { 37 | get { 38 | switch(self) { 39 | case .equal: 40 | return .equal 41 | case .lessThanOrEqual: 42 | return .lessThanOrEqual 43 | case .greaterThanOrEqual: 44 | return .greaterThanOrEqual 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/ConstraintView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintView = UIView 33 | #else 34 | public typealias ConstraintView = NSView 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/LayoutConstraint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class LayoutConstraint : NSLayoutConstraint { 32 | 33 | public var label: String? { 34 | get { 35 | return self.identifier 36 | } 37 | set { 38 | self.identifier = newValue 39 | } 40 | } 41 | 42 | internal weak var constraint: Constraint? = nil 43 | 44 | } 45 | 46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { 47 | // If firstItem or secondItem on either constraint has a dangling pointer 48 | // this comparison can cause a crash. The solution for this is to ensure 49 | // your layout code hold strong references to things like Views, LayoutGuides 50 | // and LayoutAnchors as SnapKit will not keep strong references to any of these. 51 | guard lhs.firstAttribute == rhs.firstAttribute && 52 | lhs.secondAttribute == rhs.secondAttribute && 53 | lhs.relation == rhs.relation && 54 | lhs.priority == rhs.priority && 55 | lhs.multiplier == rhs.multiplier && 56 | lhs.secondItem === rhs.secondItem && 57 | lhs.firstItem === rhs.firstItem else { 58 | return false 59 | } 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/SnapKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | FOUNDATION_EXPORT double SnapKitVersionNumber; 27 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; -------------------------------------------------------------------------------- /Example/Example/SnapKit/Typealiases.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | import Foundation 25 | 26 | #if os(iOS) || os(tvOS) 27 | import UIKit 28 | #if swift(>=4.2) 29 | typealias LayoutRelation = NSLayoutConstraint.Relation 30 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 31 | #else 32 | typealias LayoutRelation = NSLayoutRelation 33 | typealias LayoutAttribute = NSLayoutAttribute 34 | #endif 35 | typealias LayoutPriority = UILayoutPriority 36 | #else 37 | import AppKit 38 | typealias LayoutRelation = NSLayoutConstraint.Relation 39 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 40 | typealias LayoutPriority = NSLayoutConstraint.Priority 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /Example/Example/SnapKit/UILayoutSupport+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 8.0, *) 30 | public extension ConstraintLayoutSupport { 31 | 32 | var snp: ConstraintLayoutSupportDSL { 33 | return ConstraintLayoutSupportDSL(support: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Example/ar.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ar.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/de.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/de.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/es-419.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/es-419.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/fr.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/fr.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/id.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/id.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/it.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/it.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ja.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ja.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ko.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ko.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ms.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ms.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/nl.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/nl.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/pt-BR.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/pt-BR.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ru.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/ru.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/tr.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/tr.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/vi.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/vi.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/zh-Hans.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/zh-Hans.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/zh-Hant.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Example/Example/zh-Hant.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 long 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "ZLPhotoBrowser", 8 | platforms: [.iOS(.v10)], 9 | products: [ 10 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 11 | .library( 12 | name: "ZLPhotoBrowser", 13 | targets: ["ZLPhotoBrowser"]), 14 | ], 15 | targets: [ 16 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 17 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 18 | .target( 19 | name: "ZLPhotoBrowser", 20 | path: "Sources", 21 | exclude: [ 22 | "Info.plist", 23 | "General/ZLWeakProxy.h", 24 | "General/ZLWeakProxy.m" 25 | ], 26 | resources: [ 27 | .process("ZLPhotoBrowser.bundle"), 28 | .copy("PrivacyInfo.xcprivacy") 29 | ] 30 | ) 31 | ] 32 | ) 33 | -------------------------------------------------------------------------------- /Sources/Animation/ZLPhotoPreviewAnimatedTransition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLPhotoPreviewAnimatedTransition.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/9/3. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | class ZLPhotoPreviewAnimatedTransition: NSObject, UIViewControllerAnimatedTransitioning { 30 | func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 31 | return 0.25 32 | } 33 | 34 | func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {} 35 | } 36 | -------------------------------------------------------------------------------- /Sources/Extensions/AVCaptureDevice+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AVCaptureDevice.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by tsinis on 2024/11/1. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import AVFoundation 28 | 29 | extension ZLPhotoBrowserWrapper where Base: AVCaptureDevice { 30 | var defaultZoomFactor: CGFloat { 31 | let fallback: CGFloat = 1.0 32 | guard #available(iOS 13.0, *) else { return fallback } 33 | 34 | if let wideAngleIndex = base.constituentDevices.firstIndex(where: { $0.deviceType == .builtInWideAngleCamera }) { 35 | guard wideAngleIndex >= 1 else { return fallback } 36 | return CGFloat(base.virtualDeviceSwitchOverVideoZoomFactors[wideAngleIndex - 1].doubleValue) 37 | } 38 | 39 | return fallback 40 | } 41 | 42 | func normalizedZoomFactor(for zoomFactor: CGFloat) -> CGFloat { 43 | zoomFactor / self.defaultZoomFactor 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Sources/Extensions/Array+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Array+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/10/9. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Photos 28 | import UIKit 29 | 30 | extension ZLPhotoBrowserWrapper where Base == [PHAsset] { 31 | func removeDuplicate() -> [PHAsset] { 32 | return base.enumerated().filter { index, value -> Bool in 33 | base.firstIndex(of: value) == index 34 | }.map { $0.element } 35 | } 36 | } 37 | 38 | extension ZLPhotoBrowserWrapper where Base == [ZLResultModel] { 39 | func removeDuplicate() -> [ZLResultModel] { 40 | return base.enumerated().filter { index, value -> Bool in 41 | base.firstIndex(of: value) == index 42 | }.map { $0.element } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Sources/Extensions/Bool+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bool+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by ruby109 on 2020/11/3. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Foundation 28 | 29 | extension ZLPhotoBrowserWrapper where Base == Bool { 30 | var intValue: Int { 31 | base ? 1 : 0 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Extensions/CGFloat+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGFloat+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/11/10. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | extension ZLPhotoBrowserWrapper where Base == CGFloat { 30 | var toPi: CGFloat { 31 | return base / 180 * .pi 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Extensions/Cell+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Cell+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/8/13. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | extension ZLPhotoBrowserWrapper where Base: UICollectionViewCell { 30 | static var identifier: String { 31 | NSStringFromClass(Base.self) 32 | } 33 | 34 | static func register(_ collectionView: UICollectionView) { 35 | collectionView.register(Base.self, forCellWithReuseIdentifier: identifier) 36 | } 37 | } 38 | 39 | extension ZLPhotoBrowserWrapper where Base: UITableViewCell { 40 | static var identifier: String { 41 | NSStringFromClass(Base.self) 42 | } 43 | 44 | static func register(_ tableView: UITableView) { 45 | tableView.register(Base.self, forCellReuseIdentifier: identifier) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Sources/Extensions/NSError+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2022/8/3. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Foundation 28 | 29 | extension NSError { 30 | convenience init(message: String) { 31 | let userInfo = [NSLocalizedDescriptionKey: message] 32 | self.init(domain: "com.ZLPhotoBrowser.error", code: -1, userInfo: userInfo) 33 | } 34 | } 35 | 36 | extension NSError { 37 | static let noWriteAuthError = NSError(message: "No permission to write to the album") 38 | 39 | static let videoMergeError = NSError(message: "video merge failed") 40 | 41 | static let videoExportTypeError = NSError(message: "The mediaType of asset must be video") 42 | 43 | static let videoExportError = NSError(message: "Video export failed") 44 | 45 | static let assetSaveError = NSError(message: "Asset save failed") 46 | 47 | static let timeoutError = NSError(message: "timeout") 48 | } 49 | -------------------------------------------------------------------------------- /Sources/Extensions/PHAsset+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PHAsset+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/12/16. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Photos 28 | import MobileCoreServices 29 | 30 | public extension ZLPhotoBrowserWrapper where Base: PHAsset { 31 | var isInCloud: Bool { 32 | guard let resource = resource else { 33 | return false 34 | } 35 | return !(resource.value(forKey: "locallyAvailable") as? Bool ?? true) 36 | } 37 | 38 | var isGif: Bool { 39 | guard let filename = filename else { 40 | return false 41 | } 42 | 43 | return filename.hasSuffix("GIF") 44 | } 45 | 46 | var filename: String? { 47 | base.value(forKey: "filename") as? String 48 | } 49 | 50 | var resource: PHAssetResource? { 51 | PHAssetResource.assetResources(for: base).first 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Sources/Extensions/PHPhotoLibrary+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PHPhotoLibrary+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2024/8/15. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Photos 28 | 29 | extension ZLPhotoBrowserWrapper where Base: PHPhotoLibrary { 30 | enum ZLAccessLevel { 31 | case addOnly 32 | case readWrite 33 | 34 | @available(iOS 14.0, *) 35 | var toPHLevel: PHAccessLevel { 36 | switch self { 37 | case .addOnly: 38 | return .addOnly 39 | case .readWrite: 40 | return .readWrite 41 | } 42 | } 43 | } 44 | 45 | static func authStatus(for level: ZLAccessLevel) -> PHAuthorizationStatus { 46 | if #available(iOS 14.0, *) { 47 | return PHPhotoLibrary.authorizationStatus(for: level.toPHLevel) 48 | } else { 49 | return PHPhotoLibrary.authorizationStatus() 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Sources/Extensions/Runtime+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Runtime+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2025/3/13. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Foundation 28 | 29 | func zl_getAssociatedObject(_ object: Any, _ key: UnsafeRawPointer) -> T? { 30 | return objc_getAssociatedObject(object, key) as? T 31 | } 32 | 33 | func zl_setRetainedAssociatedObject(_ object: Any, _ key: UnsafeRawPointer, _ value: T) { 34 | objc_setAssociatedObject(object, key, value, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 35 | } 36 | -------------------------------------------------------------------------------- /Sources/Extensions/String+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/8/18. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import Foundation 28 | import UIKit 29 | 30 | extension ZLPhotoBrowserWrapper where Base == String { 31 | func boundingRect(font: UIFont, limitSize: CGSize, lineBreakMode: NSLineBreakMode = .byCharWrapping) -> CGSize { 32 | let style = NSMutableParagraphStyle() 33 | style.lineBreakMode = lineBreakMode 34 | 35 | let att = [NSAttributedString.Key.font: font, NSAttributedString.Key.paragraphStyle: style] 36 | 37 | let attContent = NSMutableAttributedString(string: base, attributes: att) 38 | 39 | let size = attContent.boundingRect(with: limitSize, options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).size 40 | 41 | return CGSize(width: ceil(size.width), height: ceil(size.height)) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Sources/Extensions/UIFont+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2022/7/7. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | extension ZLPhotoBrowserWrapper where Base: UIFont { 30 | static func font(ofSize size: CGFloat, bold: Bool = false) -> UIFont { 31 | guard let name = ZLCustomFontDeploy.fontName else { 32 | return UIFont.systemFont(ofSize: size, weight: bold ? .medium : .regular) 33 | } 34 | 35 | return UIFont(name: name, size: size) ?? UIFont.systemFont(ofSize: size, weight: bold ? .medium : .regular) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Sources/Extensions/UIGraphicsImageRenderer+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIGraphicsImageRenderer+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2023/11/23. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | extension ZLPhotoBrowserWrapper where Base: UIGraphicsImageRenderer { 30 | static func renderImage( 31 | size: CGSize, 32 | formatConfig: ((UIGraphicsImageRendererFormat) -> Void)? = nil, 33 | imageActions: ((CGContext) -> Void) 34 | ) -> UIImage { 35 | let format: UIGraphicsImageRendererFormat 36 | if #available(iOS 11.0, *) { 37 | format = .preferred() 38 | } else { 39 | format = .default() 40 | } 41 | formatConfig?(format) 42 | 43 | let renderer = UIGraphicsImageRenderer(size: size, format: format) 44 | return renderer.image { context in 45 | imageActions(context.cgContext) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Sources/Extensions/UIScrollView+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2023/10/8. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | extension ZLPhotoBrowserWrapper where Base: UIScrollView { 30 | var contentInset: UIEdgeInsets { 31 | if #available(iOS 11.0, *) { 32 | return base.adjustedContentInset 33 | } else { 34 | return base.contentInset 35 | } 36 | } 37 | 38 | func scrollToTop(animated: Bool = true) { 39 | base.setContentOffset(CGPoint(x: 0, y: -contentInset.top), animated: animated) 40 | } 41 | 42 | func scrollToBottom(animated: Bool = true) { 43 | let contentSizeH = base.contentSize.height 44 | let insetBottom = contentInset.bottom 45 | let offsetY = contentSizeH + insetBottom - base.zl.height 46 | base.setContentOffset(CGPoint(x: 0, y: offsetY), animated: animated) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Sources/Extensions/UIViewController+ZLPhotoBrowser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ZLPhotoBrowser.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2021/12/28. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | extension ZLPhotoBrowserWrapper where Base: UIViewController { 30 | func showAlertController(_ alertController: UIAlertController) { 31 | if deviceIsiPad() { 32 | alertController.popoverPresentationController?.sourceView = base.view 33 | } 34 | base.showDetailViewController(alertController, sender: nil) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sources/General/ZLAddPhotoCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLAddPhotoCell.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by ruby109 on 2020/11/3. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | import Foundation 29 | 30 | class ZLAddPhotoCell: UICollectionViewCell { 31 | private lazy var imageView: UIImageView = { 32 | let view = UIImageView(image: .zl.getImage("zl_addPhoto")) 33 | view.contentMode = .scaleAspectFit 34 | view.clipsToBounds = true 35 | return view 36 | }() 37 | 38 | override init(frame: CGRect) { 39 | super.init(frame: frame) 40 | setupUI() 41 | } 42 | 43 | deinit { 44 | zl_debugPrint("ZLAddPhotoCell deinit") 45 | } 46 | 47 | @available(*, unavailable) 48 | required init?(coder: NSCoder) { 49 | fatalError("init(coder:) has not been implemented") 50 | } 51 | 52 | override func layoutSubviews() { 53 | super.layoutSubviews() 54 | 55 | imageView.frame = CGRect(x: 0, y: 0, width: bounds.width / 3, height: bounds.width / 3) 56 | imageView.center = CGPoint(x: bounds.midX, y: bounds.midY) 57 | } 58 | 59 | func setupUI() { 60 | if ZLPhotoUIConfiguration.default().cellCornerRadio > 0 { 61 | layer.masksToBounds = true 62 | layer.cornerRadius = ZLPhotoUIConfiguration.default().cellCornerRadio 63 | } 64 | 65 | backgroundColor = .zl.cameraCellBgColor 66 | contentView.addSubview(imageView) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/General/ZLCollectionViewFlowLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLCollectionViewFlowLayout.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2023/4/20. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | class ZLCollectionViewFlowLayout: UICollectionViewFlowLayout { 30 | override var flipsHorizontallyInOppositeLayoutDirection: Bool { isRTL() } 31 | } 32 | -------------------------------------------------------------------------------- /Sources/General/ZLCustomAlertProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLCustomAlertProtocol.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2022/6/29. 6 | // 7 | 8 | import UIKit 9 | 10 | public enum ZLCustomAlertStyle { 11 | case alert 12 | case actionSheet 13 | } 14 | 15 | public protocol ZLCustomAlertProtocol: AnyObject { 16 | /// Should return an instance of ZLCustomAlertProtocol 17 | static func alert(title: String?, message: String, style: ZLCustomAlertStyle) -> ZLCustomAlertProtocol 18 | 19 | func addAction(_ action: ZLCustomAlertAction) 20 | 21 | func show(with parentVC: UIViewController?) 22 | } 23 | 24 | public class ZLCustomAlertAction: NSObject { 25 | public enum Style { 26 | case `default` 27 | case tint 28 | case cancel 29 | case destructive 30 | } 31 | 32 | public let title: String 33 | 34 | public let style: ZLCustomAlertAction.Style 35 | 36 | public let handler: ((ZLCustomAlertAction) -> Void)? 37 | 38 | deinit { 39 | zl_debugPrint("ZLCustomAlertAction deinit") 40 | } 41 | 42 | public init(title: String, style: ZLCustomAlertAction.Style, handler: ((ZLCustomAlertAction) -> Void)?) { 43 | self.title = title 44 | self.style = style 45 | self.handler = handler 46 | super.init() 47 | } 48 | } 49 | 50 | /// internal 51 | extension ZLCustomAlertStyle { 52 | var toSystemAlertStyle: UIAlertController.Style { 53 | switch self { 54 | case .alert: 55 | return .alert 56 | case .actionSheet: 57 | return .actionSheet 58 | } 59 | } 60 | } 61 | 62 | /// internal 63 | extension ZLCustomAlertAction.Style { 64 | var toSystemAlertActionStyle: UIAlertAction.Style { 65 | switch self { 66 | case .default, .tint: 67 | return .default 68 | case .cancel: 69 | return .cancel 70 | case .destructive: 71 | return .destructive 72 | } 73 | } 74 | } 75 | 76 | /// internal 77 | extension ZLCustomAlertAction { 78 | func toSystemAlertAction() -> UIAlertAction { 79 | return UIAlertAction(title: title, style: style.toSystemAlertActionStyle) { _ in 80 | self.handler?(self) 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Sources/General/ZLEnlargeButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLEnlargeButton.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2022/4/24. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | public class ZLEnlargeButton: UIButton { 30 | /// 扩大点击区域 31 | public var enlargeInsets: UIEdgeInsets = .zero 32 | 33 | /// 上下左右均扩大该值的点击范围 34 | public var enlargeInset: CGFloat = 0 { 35 | didSet { 36 | let inset = max(0, enlargeInset) 37 | enlargeInsets = UIEdgeInsets(top: inset, left: inset, bottom: inset, right: inset) 38 | } 39 | } 40 | 41 | override public func point(inside point: CGPoint, with event: UIEvent?) -> Bool { 42 | guard !isHidden, alpha != 0 else { 43 | return false 44 | } 45 | 46 | let rect = enlargeRect() 47 | if rect.equalTo(bounds) { 48 | return super.point(inside: point, with: event) 49 | } 50 | return rect.contains(point) ? true : false 51 | } 52 | 53 | private func enlargeRect() -> CGRect { 54 | guard enlargeInsets != .zero else { 55 | return bounds 56 | } 57 | 58 | let rect = CGRect( 59 | x: bounds.minX - enlargeInsets.left, 60 | y: bounds.minY - enlargeInsets.top, 61 | width: bounds.width + enlargeInsets.left + enlargeInsets.right, 62 | height: bounds.height + enlargeInsets.top + enlargeInsets.bottom 63 | ) 64 | return rect 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Sources/General/ZLImageNavController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLImageNavController.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/8/18. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | import Photos 29 | 30 | public class ZLImageNavController: UINavigationController { 31 | var isSelectedOriginal = false 32 | 33 | var arrSelectedModels: [ZLPhotoModel] = [] 34 | 35 | var selectImageBlock: (() -> Void)? 36 | 37 | var cancelBlock: (() -> Void)? 38 | 39 | deinit { 40 | zl_debugPrint("ZLImageNavController deinit") 41 | } 42 | 43 | public override var preferredStatusBarStyle: UIStatusBarStyle { 44 | return ZLPhotoUIConfiguration.default().statusBarStyle 45 | } 46 | 47 | override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 48 | super.init(nibName: nil, bundle: nil) 49 | } 50 | 51 | override init(rootViewController: UIViewController) { 52 | super.init(rootViewController: rootViewController) 53 | navigationBar.barStyle = .black 54 | navigationBar.isTranslucent = true 55 | modalPresentationStyle = .fullScreen 56 | isNavigationBarHidden = true 57 | } 58 | 59 | @available(*, unavailable) 60 | required init?(coder aDecoder: NSCoder) { 61 | fatalError("init(coder:) has not been implemented") 62 | } 63 | 64 | public override func viewDidLoad() { 65 | super.viewDidLoad() 66 | 67 | // Do any additional setup after loading the view. 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Sources/General/ZLProgressView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLProgressView.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/8/13. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | class ZLProgressView: UIView { 30 | private lazy var progressLayer: CAShapeLayer = { 31 | let layer = CAShapeLayer() 32 | layer.fillColor = UIColor.clear.cgColor 33 | layer.strokeColor = UIColor.white.cgColor 34 | layer.lineCap = .round 35 | layer.lineWidth = 4 36 | return layer 37 | }() 38 | 39 | var progress: CGFloat = 0 { 40 | didSet { 41 | self.setNeedsDisplay() 42 | } 43 | } 44 | 45 | override init(frame: CGRect) { 46 | super.init(frame: frame) 47 | 48 | backgroundColor = .clear 49 | layer.addSublayer(progressLayer) 50 | } 51 | 52 | @available(*, unavailable) 53 | required init?(coder: NSCoder) { 54 | fatalError("init(coder:) has not been implemented") 55 | } 56 | 57 | override func draw(_ rect: CGRect) { 58 | let center = CGPoint(x: rect.width / 2, y: rect.height / 2) 59 | let radius = rect.width / 2 60 | let end = -(.pi / 2) + (.pi * 2 * progress) 61 | progressLayer.frame = bounds 62 | let path = UIBezierPath(arcCenter: center, radius: radius, startAngle: -(.pi / 2), endAngle: end, clockwise: true) 63 | progressLayer.path = path.cgPath 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Sources/General/ZLResultModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLResultModel.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2022/9/7. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | import Photos 29 | 30 | public class ZLResultModel: NSObject { 31 | @objc public let asset: PHAsset 32 | 33 | @objc public let image: UIImage 34 | 35 | /// Whether the picture has been edited. Always false when `saveNewImageAfterEdit = true`. 36 | @objc public let isEdited: Bool 37 | 38 | /// Content of the last edit. Always nil when `saveNewImageAfterEdit = true`. 39 | @objc public let editModel: ZLEditImageModel? 40 | 41 | /// The order in which the user selects the models in the album. This index is not necessarily equal to the order of the model's index in the array, as some PHAssets requests may fail. 42 | @objc public let index: Int 43 | 44 | @objc public init(asset: PHAsset, image: UIImage, isEdited: Bool, editModel: ZLEditImageModel? = nil, index: Int) { 45 | self.asset = asset 46 | self.image = image 47 | self.isEdited = isEdited 48 | self.editModel = editModel 49 | self.index = index 50 | super.init() 51 | } 52 | } 53 | 54 | extension ZLResultModel { 55 | static func ==(lhs: ZLResultModel, rhs: ZLResultModel) -> Bool { 56 | return lhs.asset == rhs.asset 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Sources/General/ZLWeakProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZLWeakProxy.h 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2023/12/5. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | #import 28 | 29 | NS_ASSUME_NONNULL_BEGIN 30 | 31 | @interface ZLWeakProxy : NSObject 32 | 33 | @property (nonatomic, weak, readonly, nullable) id target; 34 | 35 | - (nonnull instancetype)initWithTarget:(nonnull id)target NS_SWIFT_NAME(init(target:)); 36 | + (nonnull instancetype)proxyWithTarget:(nonnull id)target NS_SWIFT_NAME(proxy(target:)); 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /Sources/General/ZLWeakProxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZLWeakProxy.m 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2023/12/5. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | #import "ZLWeakProxy.h" 28 | 29 | @implementation ZLWeakProxy 30 | 31 | - (instancetype)initWithTarget:(id)target { 32 | _target = target; 33 | return self; 34 | } 35 | 36 | + (instancetype)proxyWithTarget:(id)target { 37 | return [[ZLWeakProxy alloc] initWithTarget:target]; 38 | } 39 | 40 | - (id)forwardingTargetForSelector:(SEL)selector { 41 | return _target; 42 | } 43 | 44 | - (void)forwardInvocation:(NSInvocation *)invocation { 45 | void *null = NULL; 46 | [invocation setReturnValue:&null]; 47 | } 48 | 49 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { 50 | return [NSObject instanceMethodSignatureForSelector:@selector(init)]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Sources/General/ZLWeakProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZLWeakProxy.swift 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2024/3/6. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | #if SWIFT_PACKAGE 28 | 29 | import UIKit 30 | 31 | class ZLWeakProxy: NSObject { 32 | private weak var target: NSObjectProtocol? 33 | 34 | init(target: NSObjectProtocol) { 35 | self.target = target 36 | super.init() 37 | } 38 | 39 | class func proxy(target: NSObjectProtocol) -> ZLWeakProxy { 40 | return ZLWeakProxy(target: target) 41 | } 42 | 43 | override func forwardingTarget(for aSelector: Selector!) -> Any? { 44 | return target 45 | } 46 | 47 | override func responds(to aSelector: Selector!) -> Bool { 48 | return target?.responds(to: aSelector) ?? false 49 | } 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sources/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyAccessedAPITypes 6 | 7 | NSPrivacyCollectedDataTypes 8 | 9 | NSPrivacyTrackingDomains 10 | 11 | NSPrivacyTracking 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/ja-US.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "previewCamera" = "カメラ"; 2 | "previewCameraRecord" = "撮影"; 3 | "previewAlbum" = "アルバム"; 4 | "cancel" = "キャンセル"; 5 | 6 | "originalPhoto" = "完全な画像"; 7 | "originalTotalSize" = "合計"; 8 | "done" = "確定"; 9 | "ok" = "確定"; 10 | "editFinish" = "完了"; 11 | "cameraDone" = "確定"; 12 | "inputDone" = "確定"; 13 | 14 | "back" = "戻る"; 15 | "edit" = "編集"; 16 | "revert" = "元に戻す"; 17 | "brightness" = "明度"; 18 | "contrast" = "コントラスト"; 19 | "saturation" = "彩度"; 20 | 21 | "photo" = "写真"; 22 | "preview" = "プレビュー"; 23 | 24 | "noPhotoTips" = "写真がありません"; 25 | 26 | "hudLoading" = "読み込み中"; 27 | "hudProcessing" = "処理中"; 28 | 29 | "exceededMaxSelectCount" = "最大選択数: %ld"; 30 | "longerThanMaxVideoDuration" = "%ld秒より長い動画は選択できません"; 31 | "shorterThanMinVideoDuration" = "%ld秒より短い動画は選択できません"; 32 | "largerThanMaxVideoDataSize" = "%@MBを超える動画は選択できません"; 33 | "smallerThanMinVideoDataSize" = "%@MB未満の動画は選択できません"; 34 | "exceededMaxVideoSelectCount" = "動画の最大選択数: %ld"; 35 | "lessThanMinVideoSelectCount" = "動画の最小選択数: %ld"; 36 | 37 | "noCameraAuthorityAlertMessage" = "「設定」>「プライパシー」>「カメラ」から、%@があなたのデバイスのカメラにアクセスする許可をしてください"; 38 | "noPhotoLibraryAuthorityAlertMessage" = "「設定」>「プライバシー」>「写真」から、%@があなたのアルバムにアクセスする許可をしてください"; 39 | "noMicrophoneAuthorityAlertMessage" = "音声を録音できません。「設定」 >「%@」に移動し、マイクへのアクセスを有効にしてください"; 40 | "unableToAccessAllPhotos" = "%@ は選択した写真にのみアクセスできます。「すべての写真」にアクセスする権限を %@ に許可してください。"; 41 | "noLibraryAuthTitleInThumbList" = "アルバムの写真にアクセスできません"; 42 | "noLibraryAuthDescInThumbList" = "%@ は写真にアクセスできません。「すべての写真」にアクセスする権限を %@ に許可してください。"; 43 | "gotoSystemSettingInThumbList" = "システム設定に移動"; 44 | 45 | "cameraUnavailable" = "カメラは利用できません"; 46 | "keepRecording" = "撮影を続ける"; 47 | "gotoSettings" = "設定に移動"; 48 | 49 | "iCloudVideoLoadFaild" = "iCloudから同期できません"; 50 | "imageLoadFailed" = "ロード失敗"; 51 | 52 | "save" = "セーブ"; 53 | "saveImageError" = "画像の保存に失敗しました"; 54 | "saveVideoError" = "ビデオの保存に失敗しました"; 55 | "timeout" = "タイムアウトしました"; 56 | 57 | "customCameraTips" = "タップして撮影、長押しで記録"; 58 | "customCameraTakePhotoTips" = "タップして撮影できます"; 59 | "customCameraRecordVideoTips" = "長押しで記録できます"; 60 | "customCameraTapToRecordVideoTips" = "タップして記録"; 61 | "minRecordTimeTips" = "最低 %ld秒以上記録してください"; 62 | 63 | "cameraRoll" = "最近の項目"; 64 | "panoramas" = "パノラマ"; 65 | "videos" = "ビデオ"; 66 | "favorites" = "お気に入り"; 67 | "timelapses" = "タイムラプス"; 68 | "recentlyAdded" = "最後に追加した項目"; 69 | "bursts" = "バースト"; 70 | "slomoVideos" = "スローモーション"; 71 | "selfPortraits" = "セルフイー"; 72 | "screenshots" = "スクリーンショット"; 73 | "depthEffect" = "ポートレート"; 74 | "livePhotos" = "Live Photos"; 75 | "animated" = "アニメーション"; 76 | "myPhotoStream" = "マイフォトストリーム"; 77 | 78 | "noTitleAlbumListPlaceholder" = "画像すべて"; 79 | "textStickerRemoveTips" = "ここにドラッグして削除します"; 80 | -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "previewCamera" = "拍照"; 2 | "previewCameraRecord" = "拍摄"; 3 | "previewAlbum" = "相册"; 4 | "cancel" = "取消"; 5 | 6 | "originalPhoto" = "原图"; 7 | "originalTotalSize" = "共"; 8 | "done" = "确定"; 9 | "ok" = "确定"; 10 | "editFinish" = "完成"; 11 | "cameraDone" = "确定"; 12 | "inputDone" = "确定"; 13 | 14 | "back" = "返回"; 15 | "edit" = "编辑"; 16 | "revert" = "还原"; 17 | "brightness" = "亮度"; 18 | "contrast" = "对比度"; 19 | "saturation" = "饱和度"; 20 | 21 | "photo" = "照片"; 22 | "preview" = "预览"; 23 | 24 | "noPhotoTips" = "无照片"; 25 | 26 | "hudLoading" = "正在加载"; 27 | "hudProcessing" = "正在处理"; 28 | 29 | "exceededMaxSelectCount" = "最多只能选择%ld张图片"; 30 | "longerThanMaxVideoDuration" = "不能选择超过%ld秒的视频"; 31 | "shorterThanMinVideoDuration" = "不能选择低于%ld秒的视频"; 32 | "largerThanMaxVideoDataSize" = "不能选择大于%@MB的视频"; 33 | "smallerThanMinVideoDataSize" = "不能选择小于%@MB的视频"; 34 | "exceededMaxVideoSelectCount" = "最多只能选择%ld个视频"; 35 | "lessThanMinVideoSelectCount" = "最少选择%ld个视频"; 36 | 37 | "noCameraAuthorityAlertMessage" = "请在iPhone的\"设置 > 隐私 > 相机\"选项中,允许%@访问你的相机"; 38 | "noPhotoLibraryAuthorityAlertMessage" = "请在iPhone的\"设置 > 隐私 >照片\"选项中,允许%@访问你的照片"; 39 | "noMicrophoneAuthorityAlertMessage" = "无法录制声音,前往\"设置 > %@\"中打开麦克风权限"; 40 | "unableToAccessAllPhotos" = "你已设置%@只能访问相册部分照片,建议允许访问「所有照片」"; 41 | "noLibraryAuthTitleInThumbList" = "无法访问相册中照片"; 42 | "noLibraryAuthDescInThumbList" = "你已关闭%@照片访问权限,建议允许访问「所有照片」"; 43 | "gotoSystemSettingInThumbList" = "前往系统设置"; 44 | 45 | "cameraUnavailable" = "相机不可用"; 46 | "keepRecording" = "继续拍摄"; 47 | "gotoSettings" = "前往设置"; 48 | 49 | "iCloudVideoLoadFaild" = "iCloud无法同步"; 50 | "imageLoadFailed" = "图片加载失败"; 51 | 52 | "save" = "保存"; 53 | "saveImageError" = "图片保存失败"; 54 | "saveVideoError" = "视频保存失败"; 55 | "timeout" = "请求超时"; 56 | 57 | "customCameraTips" = "轻触拍照,按住摄像"; 58 | "customCameraTakePhotoTips" = "轻触拍照"; 59 | "customCameraRecordVideoTips" = "按住摄像"; 60 | "customCameraTapToRecordVideoTips" = "轻触摄像"; 61 | "minRecordTimeTips" = "至少录制%ld秒"; 62 | 63 | "cameraRoll" = "最近项目"; 64 | "panoramas" = "全景照片"; 65 | "videos" = "视频"; 66 | "favorites" = "个人收藏"; 67 | "timelapses" = "延时摄影"; 68 | "recentlyAdded" = "最近添加"; 69 | "bursts" = "连拍快照"; 70 | "slomoVideos" = "慢动作"; 71 | "selfPortraits" = "自拍"; 72 | "screenshots" = "屏幕快照"; 73 | "depthEffect" = "人像"; 74 | "livePhotos" = "Live Photos"; 75 | "animated" = "动图"; 76 | "myPhotoStream" = "我的照片流"; 77 | 78 | "noTitleAlbumListPlaceholder" = "所有照片"; 79 | "textStickerRemoveTips" = "拖到此处删除"; 80 | -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "previewCamera" = "拍照"; 2 | "previewCameraRecord" = "拍攝"; 3 | "previewAlbum" = "相冊"; 4 | "cancel" = "取消"; 5 | 6 | "originalPhoto" = "原圖"; 7 | "originalTotalSize" = "共"; 8 | "done" = "確定"; 9 | "ok" = "確定"; 10 | "editFinish" = "完成"; 11 | "cameraDone" = "確定"; 12 | "inputDone" = "確定"; 13 | 14 | "back" = "返回"; 15 | "edit" = "編輯"; 16 | "revert" = "還原"; 17 | "brightness" = "亮度"; 18 | "contrast" = "對比度"; 19 | "saturation" = "飽和度"; 20 | 21 | "photo" = "照片"; 22 | "preview" = "預覽"; 23 | 24 | "noPhotoTips" = "無照片"; 25 | 26 | "hudLoading" = "正在加載"; 27 | "hudProcessing" = "正在處理"; 28 | 29 | "exceededMaxSelectCount" = "最多只能選擇%ld張圖片"; 30 | "longerThanMaxVideoDuration" = "不能選擇超過%ld秒的視頻"; 31 | "shorterThanMinVideoDuration" = "不能選擇低於%ld秒的視頻"; 32 | "largerThanMaxVideoDataSize" = "不能選擇大於%@MB的視頻"; 33 | "smallerThanMinVideoDataSize" = "不能選擇小於%@MB的視頻"; 34 | "exceededMaxVideoSelectCount" = "最多只能選擇%ld個視頻"; 35 | "lessThanMinVideoSelectCount" = "最少選擇%ld個視頻"; 36 | 37 | "noCameraAuthorityAlertMessage" = "請在iPhone的\"設置 > 隱私 > 相機\"選項中,允許%@訪問你的相機"; 38 | "noPhotoLibraryAuthorityAlertMessage" = "請在iPhone的\"設置 > 隱私 > 相冊\"選項中,允許%@訪問你的照片"; 39 | "noMicrophoneAuthorityAlertMessage" = "無法錄製聲音,前往\"設置 > %@\"中打開麥克風權限"; 40 | "unableToAccessAllPhotos" = "你已設置%@只能訪問相冊部分照片,建議允許訪問「所有照片」"; 41 | "noLibraryAuthTitleInThumbList" = "無法訪問相冊中照片"; 42 | "noLibraryAuthDescInThumbList" = "你已關閉%@照片訪問權限,建議允許訪問「所有照片」"; 43 | "gotoSystemSettingInThumbList" = "前往系統設置"; 44 | 45 | "cameraUnavailable" = "相機不可用"; 46 | "keepRecording" = "繼續拍攝"; 47 | "gotoSettings" = "前往設置"; 48 | 49 | "iCloudVideoLoadFaild" = "iCloud無法同步"; 50 | "imageLoadFailed" = "圖片加載失敗"; 51 | 52 | "save" = "保存"; 53 | "saveImageError" = "圖片保存失敗"; 54 | "saveVideoError" = "視頻保存失敗"; 55 | "timeout" = "請求超時"; 56 | 57 | "customCameraTips" = "輕觸拍照,按住攝像"; 58 | "customCameraTakePhotoTips" = "輕觸拍照"; 59 | "customCameraRecordVideoTips" = "按住攝像"; 60 | "customCameraTapToRecordVideoTips" = "輕觸攝像"; 61 | "minRecordTimeTips" = "至少錄制%ld秒"; 62 | 63 | "cameraRoll" = "最近項目"; 64 | "panoramas" = "全景照片"; 65 | "videos" = "視頻"; 66 | "favorites" = "個人收藏"; 67 | "timelapses" = "延時攝影"; 68 | "recentlyAdded" = "最近添加"; 69 | "bursts" = "連拍快照"; 70 | "slomoVideos" = "慢動作"; 71 | "selfPortraits" = "自拍"; 72 | "screenshots" = "屏幕快照"; 73 | "depthEffect" = "人像"; 74 | "livePhotos" = "Live Photos"; 75 | "animated" = "動圖"; 76 | "myPhotoStream" = "我的照片流"; 77 | 78 | "noTitleAlbumListPlaceholder" = "所有照片"; 79 | "textStickerRemoveTips" = "拖到此處刪除"; 80 | -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ablumList_arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ablumList_arrow@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ablumList_arrow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ablumList_arrow@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_addPhoto@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_addPhoto@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_addPhoto@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_addPhoto@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_adjust@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_adjust@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_adjust@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_adjust@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_adjust_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_adjust_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_adjust_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_adjust_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_albumSelect@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_albumSelect@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_albumSelect@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_albumSelect@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_arrow_down@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_arrow_down@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_arrow_down@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_arrow_down@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ashbin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ashbin@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ashbin@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ashbin@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ashbin_open@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ashbin_open@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ashbin_open@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ashbin_open@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_brightness@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_brightness@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_brightness@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_brightness@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_brightness_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_brightness_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_brightness_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_brightness_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_original_circle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_original_circle@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_original_circle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_original_circle@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_original_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_original_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_original_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_original_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_unselected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_unselected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_unselected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_unselected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_unselected_with_check@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_unselected_with_check@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_btn_unselected_with_check@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_btn_unselected_with_check@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_camera_close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_camera_close@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_camera_close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_camera_close@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_clip@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_clip@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_clip@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_clip@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_close@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_close@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_contrast@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_contrast@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_contrast@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_contrast@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_contrast_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_contrast_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_contrast_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_contrast_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_defaultphoto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_defaultphoto.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_downArrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_downArrow@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_downArrow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_downArrow@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_drawLine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_drawLine@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_drawLine@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_drawLine@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_drawLine_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_drawLine_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_drawLine_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_drawLine_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_editImage_tag@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_editImage_tag@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_editImage_tag@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_editImage_tag@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_eraser@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_eraser@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_eraser@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_eraser@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_eraser_circle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_eraser_circle@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_eraser_circle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_eraser_circle@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_filter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_filter@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_filter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_filter@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_filter_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_filter_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_filter_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_filter_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_flash_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_flash_off@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_flash_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_flash_off@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_flash_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_flash_on@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_flash_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_flash_on@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_focus@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_focus@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_focus@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_focus@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ic_left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ic_left@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ic_left@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ic_left@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ic_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ic_right@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_ic_right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_ic_right@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_imageSticker@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_imageSticker@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_imageSticker@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_imageSticker@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font_bg@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font_bg@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font_bg@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font_shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font_shadow@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font_shadow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font_shadow@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font_stroke@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font_stroke@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_input_font_stroke@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_input_font_stroke@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_livePhoto@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_livePhoto@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_livePhoto@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_livePhoto@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_loading_dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_loading_dark@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_loading_dark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_loading_dark@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_loading_light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_loading_light@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_loading_light@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_loading_light@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_mosaic@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_mosaic@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_mosaic@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_mosaic@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_mosaic_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_mosaic_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_mosaic_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_mosaic_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_navBack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_navBack@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_navBack@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_navBack@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_navClose@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_navClose@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_navClose@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_navClose@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_pauseButtonWhite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_pauseButtonWhite@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_pauseButtonWhite@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_pauseButtonWhite@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_playButtonWhite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_playButtonWhite@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_playButtonWhite@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_playButtonWhite@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_playVideo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_playVideo@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_playVideo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_playVideo@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_redo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_redo@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_redo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_redo@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_redo_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_redo_disable@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_redo_disable@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_redo_disable@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_retake@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_retake@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_retake@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_retake@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_right@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_right@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_right_arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_right_arrow@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_right_arrow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_right_arrow@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_rotateimage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_rotateimage@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_rotateimage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_rotateimage@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_saturation@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_saturation@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_saturation@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_saturation@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_saturation_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_saturation_selected@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_saturation_selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_saturation_selected@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_shadow@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_shadow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_shadow@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_takePhoto@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_takePhoto@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_takePhoto@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_takePhoto@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_textSticker@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_textSticker@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_textSticker@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_textSticker@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_toggle_camera@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_toggle_camera@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_toggle_camera@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_toggle_camera@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_undo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_undo@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_undo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_undo@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_undo_disable@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_undo_disable@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_undo_disable@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_undo_disable@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_video@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_video@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_video@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_video@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_videoLoadFailed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_videoLoadFailed@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_videoLoadFailed@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_videoLoadFailed@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_warning@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_warning@2x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.bundle/zl_warning@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/longitachi/ZLPhotoBrowser/acf3a522e3c5adce10bf013967ddc92f33aad290/Sources/ZLPhotoBrowser.bundle/zl_warning@3x.png -------------------------------------------------------------------------------- /Sources/ZLPhotoBrowser.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZLPhotoBrowser.h 3 | // ZLPhotoBrowser 4 | // 5 | // Created by long on 2020/8/11. 6 | // 7 | // Copyright (c) 2020 Long Zhang <495181165@qq.com> 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | #import 28 | #import 29 | 30 | //! Project version number for ZLPhotoBrowser. 31 | FOUNDATION_EXPORT double ZLPhotoBrowserVersionNumber; 32 | 33 | //! Project version string for ZLPhotoBrowser. 34 | FOUNDATION_EXPORT const unsigned char ZLPhotoBrowserVersionString[]; 35 | 36 | // In this header, you should import all the public headers of your framework using statements like #import 37 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/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 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "idiom" : "universal", 16 | "platform" : "ios", 17 | "size" : "1024x1024" 18 | }, 19 | { 20 | "appearances" : [ 21 | { 22 | "appearance" : "luminosity", 23 | "value" : "tinted" 24 | } 25 | ], 26 | "idiom" : "universal", 27 | "platform" : "ios", 28 | "size" : "1024x1024" 29 | } 30 | ], 31 | "info" : { 32 | "author" : "xcode", 33 | "version" : 1 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleAllowMixedLocalizations 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/PhotoPicker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoPicker.swift 3 | // SwiftUIExample 4 | // 5 | // Created by long on 2025/3/27. 6 | // 7 | 8 | import Foundation 9 | import SwiftUI 10 | import ZLPhotoBrowser 11 | 12 | struct PhotoPickerWrapper: UIViewControllerRepresentable { 13 | var isPreviewResults = false 14 | var index = 0 15 | @Binding var results: [ZLResultModel] 16 | @Binding var isOriginal: Bool 17 | @Environment(\.dismiss) private var dismiss 18 | 19 | func makeUIViewController(context: Context) -> some UIViewController { 20 | let picker = ZLPhotoPicker() 21 | picker.selectImageBlock = { results, isOriginal in 22 | self.results = results 23 | self.isOriginal = isOriginal 24 | } 25 | picker.cancelBlock = { 26 | debugPrint("Cancel Select") 27 | } 28 | 29 | if isPreviewResults { 30 | return picker.previewAssetsForSwiftUI(assets: results.map { $0.asset }, index: index, isOriginal: isOriginal) 31 | } else { 32 | return picker.showPhotoLibraryForSwiftUI() 33 | } 34 | } 35 | 36 | func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIExample/SwiftUIExample/SwiftUIExampleApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIExampleApp.swift 3 | // SwiftUIExample 4 | // 5 | // Created by long on 2025/3/27. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct SwiftUIExampleApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import ZLPhotoBrowserTests 4 | 5 | var tests = [XCTestCaseEntry]() 6 | tests += ZLPhotoBrowserTests.allTests() 7 | XCTMain(tests) 8 | 9 | -------------------------------------------------------------------------------- /Tests/ZLPhotoBrowserTests/XCTestManifests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | #if !canImport(ObjectiveC) 4 | public func allTests() -> [XCTestCaseEntry] { 5 | return [ 6 | testCase(ZLPhotoBrowserTests.allTests), 7 | ] 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /Tests/ZLPhotoBrowserTests/ZLPhotoBrowserTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import ZLPhotoBrowser 3 | 4 | final class ZLPhotoBrowserTests: XCTestCase { 5 | func testExample() { 6 | // This is an example of a functional test case. 7 | // Use XCTAssert and related functions to verify your tests produce the correct 8 | // results. 9 | XCTAssertEqual(ZLPhotoBrowser().text, "Hello, World!") 10 | } 11 | 12 | static var allTests = [ 13 | ("testExample", testExample), 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /ZLPhotoBrowser.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'ZLPhotoBrowser' 3 | s.version = '4.6.0.1' 4 | s.summary = 'A lightweight and pure Swift implemented library for select photos from album' 5 | 6 | s.description = <<-DESC 7 | Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 8 | DESC 9 | 10 | s.homepage = 'https://github.com/longitachi/ZLPhotoBrowser' 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | 13 | s.author = {'longitachi' => 'longitachi@163.com'} 14 | s.social_media_url = 'https://github.com/longitachi' 15 | 16 | s.source = {:git => 'https://github.com/longitachi/ZLPhotoBrowser.git', :tag => s.version} 17 | 18 | s.ios.deployment_target = '10.0' 19 | 20 | s.swift_versions = ['5.0', '5.1', '5.2'] 21 | 22 | s.requires_arc = true 23 | s.frameworks = 'UIKit','Photos','PhotosUI','AVFoundation','CoreMotion', 'Accelerate' 24 | 25 | s.resources = 'Sources/*.{png,bundle}' 26 | s.resource_bundles = {'ZLPhotoBrowser_Privacy' => ['Sources/PrivacyInfo.xcprivacy']} 27 | 28 | s.subspec "Core" do |sp| 29 | sp.source_files = ['Sources/**/*.{swift,h,m}', 'Sources/ZLPhotoBrowser.h'] 30 | sp.exclude_files = ['Sources/General/ZLWeakProxy.swift'] 31 | end 32 | 33 | end 34 | -------------------------------------------------------------------------------- /ZLPhotoBrowser.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZLPhotoBrowser.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ZLPhotoBrowser.xcodeproj/xcshareddata/xcschemes/ZLPhotoBrowser.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /ZLPhotoBrowser.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ZLPhotoBrowser.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------