├── .gitignore ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── Example ├── .swiftpm │ └── xcode │ │ └── package.xcworkspace │ │ └── contents.xcworkspacedata ├── Package.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── SwiftMediator.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ ├── SnapKit │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── 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 │ │ │ ├── ConstraintMakerPrioritizable.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 │ │ │ ├── Typealiases.swift │ │ │ └── UILayoutSupport+Extensions.swift │ ├── SwiftBrick │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── SwiftBrick │ │ │ ├── BaseCell │ │ │ ├── CellProtocol.swift │ │ │ ├── CollectionReusableView.swift │ │ │ ├── CollectionViewCell.swift │ │ │ ├── TableViewCell.swift │ │ │ └── TableViewHeaderFooterView.swift │ │ │ ├── BaseVC │ │ │ ├── BaseVC.swift │ │ │ ├── CollectionViewController.swift │ │ │ ├── SwiftUIVC.swift │ │ │ ├── TableViewController.swift │ │ │ ├── ViewController.swift │ │ │ └── WebViewController.swift │ │ │ ├── Extensions │ │ │ ├── ArrayEx.swift │ │ │ ├── CALayerEx.swift │ │ │ ├── CGSizeEx.swift │ │ │ ├── DictionaryEx.swift │ │ │ ├── DispatchQueueEx.swift │ │ │ ├── LayoutEx.swift │ │ │ ├── NSObjectEx.swift │ │ │ ├── SFSymbolName.swift │ │ │ ├── StatusBaEx.swift │ │ │ ├── StringEx.swift │ │ │ ├── UIButtonEx.swift │ │ │ ├── UIColorEx.swift │ │ │ ├── UIGestureRecognizerEx.swift │ │ │ ├── UIImageEx.swift │ │ │ ├── UINavigationBarEx.swift │ │ │ ├── UINavigationControllerEx.swift │ │ │ ├── UIStackViewEx.swift │ │ │ ├── UITabBarEx.swift │ │ │ ├── UITableViewCellEx.swift │ │ │ ├── UITextViewEx.swift │ │ │ ├── UIViewEx.swift │ │ │ ├── UserDefault.swift │ │ │ └── UserDefaultsEx.swift │ │ │ ├── Resources │ │ │ └── Colors.xcassets │ │ │ │ ├── Contents.json │ │ │ │ ├── backColor.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseBlue.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseColor.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseGray.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseGreen.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseIndigo.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseLine.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseOrange.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── basePink.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── basePurple.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseRed.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseTeal.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── baseYellow.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── bgColor.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── nav_ic_back.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── ziyuan398-2.png │ │ │ │ ├── ziyuan398-3.png │ │ │ │ ├── ziyuan398-4.png │ │ │ │ └── ziyuan398.png │ │ │ │ ├── nav_ic_close.imageset │ │ │ │ ├── Close-2.png │ │ │ │ ├── Close-3.png │ │ │ │ ├── Close-5.png │ │ │ │ ├── Close.png │ │ │ │ └── Contents.json │ │ │ │ ├── textDesColor.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── textLinkColor.colorset │ │ │ │ └── Contents.json │ │ │ │ ├── textSecColor.colorset │ │ │ │ └── Contents.json │ │ │ │ └── textTitleColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── SwiftUI │ │ │ ├── AppStorageEx.swift │ │ │ ├── ColorEx.swift │ │ │ ├── Haptic.swift │ │ │ ├── SwiftUIX │ │ │ │ ├── Angle++.swift │ │ │ │ ├── Binding++.swift │ │ │ │ ├── Font++.swift │ │ │ │ ├── Font.TextStyle++.swift │ │ │ │ ├── ForEach++.swift │ │ │ │ ├── GridIem++.swift │ │ │ │ ├── GridItem.Size++.swift │ │ │ │ ├── Image++.swift │ │ │ │ ├── Label++.swift │ │ │ │ ├── List++.swift │ │ │ │ ├── NavigationLink++.swift │ │ │ │ ├── Section++.swift │ │ │ │ ├── SecureField++.swift │ │ │ │ ├── Shape++.swift │ │ │ │ ├── Text++.swift │ │ │ │ ├── TextField++.swift │ │ │ │ └── View++.swift │ │ │ ├── ViewEx.swift │ │ │ └── WebView.swift │ │ │ ├── Util │ │ │ ├── AppState.swift │ │ │ ├── Application.swift │ │ │ ├── Define.swift │ │ │ ├── Device.swift │ │ │ ├── Font.swift │ │ │ ├── Loader.swift │ │ │ ├── SwiftBrick.swift │ │ │ ├── TapBuzz.swift │ │ │ ├── Then.swift │ │ │ └── Version.swift │ │ │ └── ViewFactory │ │ │ ├── InsetLabel.swift │ │ │ └── UILineView.swift │ ├── SwiftShow │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── SwiftShow │ │ │ └── Show │ │ │ ├── AlertView.swift │ │ │ ├── CommonView.swift │ │ │ ├── Config.swift │ │ │ ├── DropDownView.swift │ │ │ ├── LoadingView.swift │ │ │ ├── PopView.swift │ │ │ ├── Show.swift │ │ │ └── ToastView.swift │ ├── Swift_Form │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ └── SwiftyForm │ │ │ ├── Cells │ │ │ ├── AvatarCell.swift │ │ │ ├── BaseCell.swift │ │ │ ├── ButtonCell.swift │ │ │ ├── CheckCell.swift │ │ │ ├── DatePickerCell.swift │ │ │ ├── ImageCell.swift │ │ │ ├── InlineDatePickerCell.swift │ │ │ ├── InlinePickerCell.swift │ │ │ ├── LabelCell.swift │ │ │ ├── PickerCell.swift │ │ │ ├── SegmentedCell.swift │ │ │ ├── SwitchCell.swift │ │ │ ├── TextFieldCell.swift │ │ │ ├── TextViewCell.swift │ │ │ └── UserCell.swift │ │ │ ├── Core │ │ │ ├── Former.swift │ │ │ ├── FormerProtocol.swift │ │ │ ├── RowFormer.swift │ │ │ ├── SectionFormer.swift │ │ │ └── ViewFormer.swift │ │ │ ├── Formers │ │ │ ├── AvatarRowFormer.swift │ │ │ ├── BaseHeaderFooterFormer.swift │ │ │ ├── BaseRowFormer.swift │ │ │ ├── ButtonHeaderFooterFormer.swift │ │ │ ├── ButtonRowFormer.swift │ │ │ ├── CheckRowFormer.swift │ │ │ ├── CustomHeaderFooterFormer.swift │ │ │ ├── CustomRowFormer.swift │ │ │ ├── DatePickerRowFormer.swift │ │ │ ├── ImageRowFormer.swift │ │ │ ├── InlineDatePickerRowFormer.swift │ │ │ ├── InlinePickerRowFormer.swift │ │ │ ├── LabelHeaderFooterFormer.swift │ │ │ ├── LabelRowFormer.swift │ │ │ ├── PickerRowFormer.swift │ │ │ ├── SegmentedRowFormer.swift │ │ │ ├── SwitchRowFormer.swift │ │ │ ├── TextFieldRowFormer.swift │ │ │ ├── TextViewRowFormer.swift │ │ │ └── UserRowFormer.swift │ │ │ └── HeaderFooters │ │ │ ├── BaseHeaderFooterView.swift │ │ │ ├── ButtonFooterView.swift │ │ │ ├── LabelFooterView.swift │ │ │ └── LabelHeaderFooterView.swift │ └── Target Support Files │ │ ├── Pods-Example │ │ ├── Pods-Example-Info.plist │ │ ├── Pods-Example-acknowledgements.markdown │ │ ├── Pods-Example-acknowledgements.plist │ │ ├── Pods-Example-dummy.m │ │ ├── Pods-Example-frameworks-Debug-input-files.xcfilelist │ │ ├── Pods-Example-frameworks-Debug-output-files.xcfilelist │ │ ├── Pods-Example-frameworks-Release-input-files.xcfilelist │ │ ├── Pods-Example-frameworks-Release-output-files.xcfilelist │ │ ├── Pods-Example-frameworks.sh │ │ ├── Pods-Example-umbrella.h │ │ ├── Pods-Example.debug.xcconfig │ │ ├── Pods-Example.modulemap │ │ └── Pods-Example.release.xcconfig │ │ ├── SnapKit │ │ ├── SnapKit-Info.plist │ │ ├── SnapKit-dummy.m │ │ ├── SnapKit-prefix.pch │ │ ├── SnapKit-umbrella.h │ │ ├── SnapKit.debug.xcconfig │ │ ├── SnapKit.modulemap │ │ └── SnapKit.release.xcconfig │ │ ├── SwiftBrick │ │ ├── ResourceBundle-SwiftBrick-SwiftBrick-Info.plist │ │ ├── SwiftBrick-Info.plist │ │ ├── SwiftBrick-dummy.m │ │ ├── SwiftBrick-prefix.pch │ │ ├── SwiftBrick-umbrella.h │ │ ├── SwiftBrick.debug.xcconfig │ │ ├── SwiftBrick.modulemap │ │ └── SwiftBrick.release.xcconfig │ │ ├── SwiftMediator │ │ ├── SwiftMediator-Info.plist │ │ ├── SwiftMediator-dummy.m │ │ ├── SwiftMediator-prefix.pch │ │ ├── SwiftMediator-umbrella.h │ │ ├── SwiftMediator.debug.xcconfig │ │ ├── SwiftMediator.modulemap │ │ └── SwiftMediator.release.xcconfig │ │ ├── SwiftShow │ │ ├── SwiftShow-Info.plist │ │ ├── SwiftShow-dummy.m │ │ ├── SwiftShow-prefix.pch │ │ ├── SwiftShow-umbrella.h │ │ ├── SwiftShow.debug.xcconfig │ │ ├── SwiftShow.modulemap │ │ └── SwiftShow.release.xcconfig │ │ └── Swift_Form │ │ ├── Swift_Form-Info.plist │ │ ├── Swift_Form-dummy.m │ │ ├── Swift_Form-prefix.pch │ │ ├── Swift_Form-umbrella.h │ │ ├── Swift_Form.debug.xcconfig │ │ ├── Swift_Form.modulemap │ │ └── Swift_Form.release.xcconfig ├── SwiftMediator.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Example.xcscheme ├── SwiftMediator.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── SwiftMediator │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Demo │ │ ├── DelegateMediator.swift │ │ ├── TestClass.swift │ │ ├── TestObjc.swift │ │ └── TestVC.swift │ ├── DemoViewController.swift │ ├── Info.plist │ ├── SceneDelegate.swift │ └── SwiftUIView.swift ├── pod_install ├── pod_update └── pod_update-no-repo ├── Image ├── 1.png ├── 2.png ├── Package.swift └── logo.png ├── Package.swift ├── README.md ├── README_ZH.md ├── Sources └── SwiftMediator │ ├── Delegate │ ├── AppDelegateMediator.swift │ └── SceneDelegateMediator.swift │ ├── Target-Action │ ├── Init++.swift │ ├── Method++.swift │ ├── Model++.swift │ ├── Navigation++.swift │ ├── Property++.swift │ ├── SwiftMediator.swift │ ├── SwiftUI++.swift │ └── URL++.swift │ └── Tools │ ├── ViewController++.swift │ └── Window++.swift ├── SwiftMediator.podspec └── fastlane ├── Fastfile ├── Package.swift ├── README.md ├── actions └── remove_git_tag.rb ├── fastlane_pod ├── fastlane_tag └── report.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.2 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "Example", 7 | products: [], 8 | targets: [] 9 | ) 10 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | platform :ios, '11.0' 4 | 5 | target 'Example' do 6 | pod 'SwiftMediator', :path => '../' 7 | pod 'SnapKit' 8 | pod 'Swift_Form' 9 | pod 'SwiftBrick' 10 | pod 'SwiftShow' 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SnapKit (5.6.0) 3 | - Swift_Form (1.1.0): 4 | - SnapKit 5 | - SwiftBrick (2.3.8): 6 | - SwiftBrick/BaseCell (= 2.3.8) 7 | - SwiftBrick/BaseVC (= 2.3.8) 8 | - SwiftBrick/Extensions (= 2.3.8) 9 | - SwiftBrick/SwiftUI (= 2.3.8) 10 | - SwiftBrick/Util (= 2.3.8) 11 | - SwiftBrick/ViewFactory (= 2.3.8) 12 | - SwiftBrick/BaseCell (2.3.8): 13 | - SwiftBrick/Extensions 14 | - SwiftBrick/BaseVC (2.3.8): 15 | - SwiftBrick/BaseCell 16 | - SwiftBrick/Extensions 17 | - SwiftBrick/Util 18 | - SwiftBrick/Extensions (2.3.8): 19 | - SwiftBrick/Util 20 | - SwiftBrick/SwiftUI (2.3.8): 21 | - SwiftBrick/BaseVC 22 | - SwiftBrick/Extensions 23 | - SwiftBrick/Util (2.3.8) 24 | - SwiftBrick/ViewFactory (2.3.8): 25 | - SwiftBrick/Extensions 26 | - SwiftBrick/Util 27 | - SwiftMediator (1.2.6): 28 | - SwiftMediator/Delegate (= 1.2.6) 29 | - SwiftMediator/Target-Action (= 1.2.6) 30 | - SwiftMediator/Tools (= 1.2.6) 31 | - SwiftMediator/Delegate (1.2.6) 32 | - SwiftMediator/Target-Action (1.2.6): 33 | - SwiftMediator/Delegate 34 | - SwiftMediator/Tools 35 | - SwiftMediator/Tools (1.2.6) 36 | - SwiftShow (0.7.6): 37 | - SwiftShow/Class (= 0.7.6) 38 | - SwiftShow/Class (0.7.6): 39 | - SnapKit 40 | 41 | DEPENDENCIES: 42 | - SnapKit 43 | - Swift_Form 44 | - SwiftBrick 45 | - SwiftMediator (from `../`) 46 | - SwiftShow 47 | 48 | SPEC REPOS: 49 | trunk: 50 | - SnapKit 51 | - Swift_Form 52 | - SwiftBrick 53 | - SwiftShow 54 | 55 | EXTERNAL SOURCES: 56 | SwiftMediator: 57 | :path: "../" 58 | 59 | SPEC CHECKSUMS: 60 | SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 61 | Swift_Form: 2d4a3318f33540707a1173ee857233cd39acd961 62 | SwiftBrick: 05cf4fee475bd133db2b5e7f348e75025d339534 63 | SwiftMediator: c00f0b158e98d42dd864ecfe4c805234af740959 64 | SwiftShow: 5cd3fa366dd87d330ab2a7c0cfee167ccc924a3b 65 | 66 | PODFILE CHECKSUM: ca5aede2a6c4855f875f5ef2b750ee294af7daaa 67 | 68 | COCOAPODS: 1.12.1 69 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/SwiftMediator.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SwiftMediator", 3 | "version": "1.2.6", 4 | "summary": "路由.", 5 | "description": "工具.", 6 | "homepage": "https://github.com/jackiehu/", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "HU": "814030966@qq.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/jackiehu/SwiftMediator.git", 16 | "tag": "1.2.6" 17 | }, 18 | "platforms": { 19 | "ios": "11.0" 20 | }, 21 | "swift_versions": [ 22 | "5.0", 23 | "5.1", 24 | "5.2" 25 | ], 26 | "requires_arc": true, 27 | "frameworks": [ 28 | "UIKit", 29 | "Foundation", 30 | "SwiftUI" 31 | ], 32 | "subspecs": [ 33 | { 34 | "name": "Target-Action", 35 | "dependencies": { 36 | "SwiftMediator/Delegate": [ 37 | 38 | ], 39 | "SwiftMediator/Tools": [ 40 | 41 | ] 42 | }, 43 | "source_files": "Sources/SwiftMediator/Target-Action/**/*" 44 | }, 45 | { 46 | "name": "Delegate", 47 | "source_files": "Sources/SwiftMediator/Delegate/**/*" 48 | }, 49 | { 50 | "name": "Tools", 51 | "source_files": "Sources/SwiftMediator/Tools/**/*" 52 | } 53 | ], 54 | "swift_version": "5.2" 55 | } 56 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SnapKit (5.6.0) 3 | - Swift_Form (1.1.0): 4 | - SnapKit 5 | - SwiftBrick (2.3.8): 6 | - SwiftBrick/BaseCell (= 2.3.8) 7 | - SwiftBrick/BaseVC (= 2.3.8) 8 | - SwiftBrick/Extensions (= 2.3.8) 9 | - SwiftBrick/SwiftUI (= 2.3.8) 10 | - SwiftBrick/Util (= 2.3.8) 11 | - SwiftBrick/ViewFactory (= 2.3.8) 12 | - SwiftBrick/BaseCell (2.3.8): 13 | - SwiftBrick/Extensions 14 | - SwiftBrick/BaseVC (2.3.8): 15 | - SwiftBrick/BaseCell 16 | - SwiftBrick/Extensions 17 | - SwiftBrick/Util 18 | - SwiftBrick/Extensions (2.3.8): 19 | - SwiftBrick/Util 20 | - SwiftBrick/SwiftUI (2.3.8): 21 | - SwiftBrick/BaseVC 22 | - SwiftBrick/Extensions 23 | - SwiftBrick/Util (2.3.8) 24 | - SwiftBrick/ViewFactory (2.3.8): 25 | - SwiftBrick/Extensions 26 | - SwiftBrick/Util 27 | - SwiftMediator (1.2.6): 28 | - SwiftMediator/Delegate (= 1.2.6) 29 | - SwiftMediator/Target-Action (= 1.2.6) 30 | - SwiftMediator/Tools (= 1.2.6) 31 | - SwiftMediator/Delegate (1.2.6) 32 | - SwiftMediator/Target-Action (1.2.6): 33 | - SwiftMediator/Delegate 34 | - SwiftMediator/Tools 35 | - SwiftMediator/Tools (1.2.6) 36 | - SwiftShow (0.7.6): 37 | - SwiftShow/Class (= 0.7.6) 38 | - SwiftShow/Class (0.7.6): 39 | - SnapKit 40 | 41 | DEPENDENCIES: 42 | - SnapKit 43 | - Swift_Form 44 | - SwiftBrick 45 | - SwiftMediator (from `../`) 46 | - SwiftShow 47 | 48 | SPEC REPOS: 49 | trunk: 50 | - SnapKit 51 | - Swift_Form 52 | - SwiftBrick 53 | - SwiftShow 54 | 55 | EXTERNAL SOURCES: 56 | SwiftMediator: 57 | :path: "../" 58 | 59 | SPEC CHECKSUMS: 60 | SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25 61 | Swift_Form: 2d4a3318f33540707a1173ee857233cd39acd961 62 | SwiftBrick: 05cf4fee475bd133db2b5e7f348e75025d339534 63 | SwiftMediator: c00f0b158e98d42dd864ecfe4c805234af740959 64 | SwiftShow: 5cd3fa366dd87d330ab2a7c0cfee167ccc924a3b 65 | 66 | PODFILE CHECKSUM: ca5aede2a6c4855f875f5ef2b750ee294af7daaa 67 | 68 | COCOAPODS: 1.12.1 69 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SnapKit/Sources/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/Pods/SwiftBrick/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 张金虎 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 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/BaseCell/CollectionReusableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JHCollectionReusableView.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 19/11/2019. 6 | // Copyright © 2019 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | // MARK: ===================================Cell基类:UICollectionReusableView========================================= 11 | open class CollectionReusableView: UICollectionReusableView, Reusable{ 12 | 13 | /// 样式,header还是footer 14 | public enum ReusableViewType { 15 | case SectionHeader//UICollectionElementKindSectionHeader 16 | case SectionFooter//UICollectionElementKindSectionFooter 17 | } 18 | 19 | public override init(frame: CGRect) { 20 | super.init(frame: frame) 21 | setupCellViews() 22 | backgroundColor = .clear 23 | } 24 | 25 | required public init?(coder: NSCoder) { 26 | fatalError("init(coder:) has not been implemented") 27 | } 28 | 29 | // MARK: - 继承 在内部实现布局 30 | /// 子类重写,进行view布局 31 | open func setupCellViews() { 32 | 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/BaseCell/CollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JHCollectionViewCell.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 19/11/2019. 6 | // Copyright © 2019 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | // MARK: ===================================Cell基类:UICollectionViewCell========================================= 11 | open class CollectionViewCell: UICollectionViewCell, Reusable{ 12 | 13 | public override init(frame: CGRect) { 14 | super.init(frame: frame) 15 | setupCellViews() 16 | contentView.backgroundColor = .clear 17 | } 18 | 19 | required public init?(coder: NSCoder) { 20 | fatalError("init(coder:) has not been implemented") 21 | } 22 | 23 | // MARK: - 继承 在内部实现布局 24 | /// 子类重写,进行view布局 25 | open func setupCellViews() { 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/BaseCell/TableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JHBaseTableViewCell.swift 3 | // JHToolsModule_Swift 4 | // 5 | // Created by iOS on 18/11/2019. 6 | // Copyright © 2019 HU. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | // MARK: ===================================Cell基类:UITableViewCell========================================= 11 | open class TableViewCell: UITableViewCell, Reusable{ 12 | 13 | override open func awakeFromNib() { 14 | super.awakeFromNib() 15 | 16 | } 17 | 18 | override open func setSelected(_ selected: Bool, animated: Bool) { 19 | super.setSelected(selected, animated: animated) 20 | 21 | } 22 | 23 | required public init?(coder: NSCoder) { 24 | fatalError("init(coder:) has not been implemented") 25 | } 26 | 27 | public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String? = String(describing: TableViewCell.self)) { 28 | super.init(style: style, reuseIdentifier: reuseIdentifier) 29 | contentView.backgroundColor = .clear 30 | setupCellViews() 31 | } 32 | 33 | // MARK: - 继承 在内部实现布局 34 | /// 子类重写,进行view布局 35 | open func setupCellViews() { 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/BaseCell/TableViewHeaderFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JHTableViewHeaderFooterView.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 19/11/2019. 6 | // Copyright © 2019 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | // MARK: ===================================Cell基类:UITableViewHeaderFooterView========================================= 11 | open class TableViewHeaderFooterView: UITableViewHeaderFooterView, Reusable{ 12 | 13 | public var backColor: UIColor? { 14 | didSet{ 15 | backgroundView?.backgroundColor = backColor 16 | } 17 | } 18 | 19 | public override init(reuseIdentifier: String? = String(describing: TableViewHeaderFooterView.self)) { 20 | super.init(reuseIdentifier: reuseIdentifier) 21 | backgroundView = UIView(frame: bounds) 22 | backgroundView?.backgroundColor = .clear 23 | setupCellViews() 24 | } 25 | 26 | required public init?(coder: NSCoder) { 27 | fatalError("init(coder:) has not been implemented") 28 | } 29 | 30 | // MARK: - 继承 在内部实现布局 31 | /// 子类重写,进行view布局 32 | open func setupCellViews() { 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/BaseVC/SwiftUIVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JHSwiftUIVC.swift 3 | // SwiftBrick 4 | // 5 | // Created by 狄烨 on 2023/5/13. 6 | // Copyright © 2023 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | @available(iOS 13.0, *) 12 | open class SwiftUIVC: ViewController { 13 | 14 | private var hostVC: UIHostingController 15 | 16 | public init(_ view: T) { 17 | self.hostVC = UIHostingController(rootView: view) 18 | super.init(nibName: nil, bundle: nil) 19 | } 20 | 21 | required public init?(coder: NSCoder) { 22 | fatalError("init(coder:) has not been implemented") 23 | } 24 | 25 | open override func viewDidLoad() { 26 | super.viewDidLoad() 27 | hostVC.view.frame = view.bounds 28 | addChild(hostVC) 29 | view.addSubview(hostVC.view) 30 | hostVC.didMove(toParent: self) 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/CGSizeEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGSizeEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2023/5/9. 6 | // Copyright © 2023 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | extension CGSize { 11 | public static var greatestFiniteSize: CGSize { 12 | .init( 13 | width: CGFloat.greatestFiniteMagnitude, 14 | height: CGFloat.greatestFiniteMagnitude 15 | ) 16 | } 17 | 18 | public var minimumDimensionLength: CGFloat { 19 | min(width, height) 20 | } 21 | 22 | public var maximumDimensionLength: CGFloat { 23 | max(width, height) 24 | } 25 | 26 | var isAreaZero: Bool { 27 | minimumDimensionLength.isZero 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/DictionaryEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DictionaryEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2021/11/4. 6 | // Copyright © 2021 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | // MARK: - 一、基本的扩展 11 | public extension Dictionary { 12 | 13 | // MARK: 1.1、检查字典里面是否有某个 key 14 | /// 检查字典里面是否有某个 key 15 | func has(_ key: Key) -> Bool { 16 | return index(forKey: key) != nil 17 | } 18 | 19 | // MARK: 1.2、字典的key或者value组成的数组 20 | /// 字典的key或者value组成的数组 21 | /// - Parameter map: map 22 | /// - Returns: 数组 23 | func toArray(_ map: (Key, Value) -> V) -> [V] { 24 | return self.map(map) 25 | } 26 | 27 | // MARK: 1.3、JSON字符串 -> 字典 28 | /// JsonString转为字典 29 | /// - Parameter json: JSON字符串 30 | /// - Returns: 字典 31 | static func jsonToDictionary(json: String) -> Dictionary? { 32 | if let data = (try? JSONSerialization.jsonObject( 33 | with: json.data(using: String.Encoding.utf8, 34 | allowLossyConversion: true)!, 35 | options: JSONSerialization.ReadingOptions.mutableContainers)) as? Dictionary { 36 | return data 37 | } else { 38 | return nil 39 | } 40 | } 41 | 42 | // MARK: 1.4、字典 -> JSON字符串 43 | /// 字典转换为JSONString 44 | func toJSON() -> String? { 45 | if let jsonData = try? JSONSerialization.data(withJSONObject: self, options: JSONSerialization.WritingOptions()) { 46 | let jsonStr = String(data: jsonData, encoding: String.Encoding(rawValue: String.Encoding.utf8.rawValue)) 47 | return String(jsonStr ?? "") 48 | } 49 | return nil 50 | } 51 | 52 | // MARK: 1.5、字典里面所有的 key 53 | /// 字典里面所有的key 54 | /// - Returns: key 数组 55 | func allKeys() -> [Key] { 56 | /* 57 | shuffled:不会改变原数组,返回一个新的随机化的数组。 可以用于let 数组 58 | */ 59 | return self.keys.shuffled() 60 | } 61 | 62 | // MARK: 1.6、字典里面所有的 value 63 | /// 字典里面所有的value 64 | /// - Returns: value 数组 65 | func allValues() -> [Value] { 66 | return self.values.shuffled() 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/LayoutEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LayoutEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by 狄烨 on 2022/6/13. 6 | // Copyright © 2022 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | ///方便自适应布局进行等比例宽高 等同于 FitWidth FitHight 11 | public extension CGFloat { 12 | /// 比例缩放 width 13 | /// 14 | /// - Parameter size: origin width 15 | /// - Returns: 比例缩放后的 width 没有除以2.0 16 | func scaleWidth() -> CGFloat { 17 | return SwiftBrick.Define.screenWidth / 375 * self 18 | } 19 | /// 比例缩放 height 20 | /// 21 | /// - Parameter size: origin height 22 | /// - Returns: 比例缩放后的 height 没有除以2.0 23 | func scaleHeight() -> CGFloat { 24 | return SwiftBrick.Define.screenHeight / 667 * self 25 | } 26 | } 27 | ///方便自适应布局进行等比例宽高 等同于 FitWidth FitHight 28 | public extension Int { 29 | /// 比例缩放 width 30 | /// 31 | /// - Parameter size: origin width 32 | /// - Returns: 比例缩放后的 width 没有除以2.0 33 | func scaleWidth() -> CGFloat { 34 | return SwiftBrick.Define.screenWidth / 375 * CGFloat(self) 35 | } 36 | /// 比例缩放 height 37 | /// 38 | /// - Parameter size: origin height 39 | /// - Returns: 比例缩放后的 height 没有除以2.0 40 | func scaleHeight() -> CGFloat { 41 | return SwiftBrick.Define.screenHeight / 667 * CGFloat(self) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/NSObjectEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSObjectEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2021/11/26. 6 | // Copyright © 2021 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public extension NSObject { 12 | 13 | static func swizzling(_ forClass: AnyClass, originalSelector: Selector, swizzledSelector: Selector) { 14 | guard let originalMethod = class_getInstanceMethod(forClass, originalSelector), 15 | let swizzledMethod = class_getInstanceMethod(forClass, swizzledSelector) else { 16 | return 17 | } 18 | 19 | let isAddSuccess = class_addMethod(forClass, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod)) 20 | if isAddSuccess { 21 | class_replaceMethod(forClass, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod)) 22 | } else { 23 | method_exchangeImplementations(originalMethod, swizzledMethod) 24 | } 25 | } 26 | } 27 | 28 | 29 | public extension NSObject { 30 | 31 | func decode(coder aDecoder:NSCoder) { 32 | let mirror = Mirror(reflecting: self) 33 | 34 | for child in mirror.children { 35 | guard let label = child.label, 36 | let value = aDecoder.decodeObject(forKey: label) else { 37 | return 38 | } 39 | setValue(value, forKey: label) 40 | } 41 | } 42 | 43 | // MARK: 归档 44 | func encode(with aCoder: NSCoder) { 45 | // MARK: 利用反射获取类的所有属性 46 | let mirror = Mirror(reflecting: self) 47 | 48 | for (label, value) in mirror.children { 49 | if let label = label { 50 | aCoder.encode(value, forKey: label) 51 | } 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/StringEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StringEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2020/10/10. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CommonCrypto 11 | 12 | // MARK: ===================================扩展: 字符串sha256========================================= 13 | extension String { 14 | 15 | var sha256: String { 16 | let utf8 = cString(using: .utf8) 17 | var digest = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) 18 | CC_SHA256(utf8, CC_LONG(utf8!.count - 1), &digest) 19 | return digest.reduce("") { $0 + String(format:"%02x", $1) } 20 | } 21 | 22 | /// Json字符串转Dic 23 | /// - Returns: 字典 24 | func toDictionary() -> [String : Any] { 25 | var result = [String : Any]() 26 | guard !self.isEmpty else { return result } 27 | guard let dataSelf = self.data(using: .utf8) else { 28 | return result 29 | } 30 | if let dic = try? JSONSerialization.jsonObject(with: dataSelf, 31 | options: .mutableContainers) as? [String : Any] { 32 | result = dic 33 | } 34 | return result 35 | 36 | } 37 | 38 | } 39 | 40 | extension String { 41 | var localizedString: String { 42 | Bundle.current.localizedString(forKey: self) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/UIGestureRecognizerEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIGestureRecognizerExtension.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 21/11/2019. 6 | // Copyright © 2019 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | // MARK: ===================================扩展: UIGestureRecognizer 点击手势闭包========================================= 12 | public extension UIGestureRecognizer { 13 | private class GestureAction { 14 | var action: (UIGestureRecognizer) -> Void 15 | 16 | init(action closure: @escaping (UIGestureRecognizer) -> Void) { 17 | action = closure 18 | } 19 | } 20 | 21 | private struct AssociatedKeys { 22 | static var ActionName = "action" 23 | } 24 | 25 | private var gestureAction: GestureAction? { 26 | set { objc_setAssociatedObject(self, &AssociatedKeys.ActionName, newValue, .OBJC_ASSOCIATION_RETAIN) } 27 | get { return objc_getAssociatedObject(self, &AssociatedKeys.ActionName) as? GestureAction } 28 | } 29 | 30 | convenience init(action: @escaping (UIGestureRecognizer) -> Void) { 31 | self.init() 32 | gestureAction = GestureAction(action: action) 33 | addTarget(self, action: #selector(handleAction(_:))) 34 | } 35 | 36 | @objc dynamic private func handleAction(_ recognizer: UIGestureRecognizer) { 37 | gestureAction?.action(recognizer) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/UIStackViewEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIStackViewSnapEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2020/10/10. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIStackView { 12 | 13 | convenience init(axis: NSLayoutConstraint.Axis, 14 | spacing: CGFloat = 0.0, 15 | alignment: UIStackView.Alignment = .fill, 16 | distribution: UIStackView.Distribution = .fill, 17 | autoLayout: Bool = false) { 18 | self.init() 19 | self.axis = axis 20 | self.spacing = spacing 21 | self.alignment = alignment 22 | self.distribution = distribution 23 | if !autoLayout { 24 | self.translatesAutoresizingMaskIntoConstraints = false 25 | self.setContentCompressionResistancePriority(UILayoutPriority.required, for: axis) 26 | } 27 | 28 | } 29 | 30 | func addBackground(color: UIColor = .clear, cornerRadius: CGFloat = 0) { 31 | let subView = UIView(frame: bounds) 32 | subView.backgroundColor = color 33 | subView.autoresizingMask = [.flexibleWidth, .flexibleHeight] 34 | insertSubview(subView, at: 0) 35 | 36 | subView.layer.cornerRadius = cornerRadius 37 | subView.layer.masksToBounds = true 38 | subView.clipsToBounds = true 39 | } 40 | 41 | func addArrangedSubviews(_ views: [UIView]) { 42 | views.forEach { (view) in 43 | addArrangedSubview(view) 44 | } 45 | } 46 | 47 | func removeArrangedView(_ view: UIView){ 48 | removeArrangedSubview(view) 49 | view.removeFromSuperview() 50 | } 51 | 52 | func removeArrangedSubviews() { 53 | arrangedSubviews.forEach { (view) in 54 | removeArrangedView(view) 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/UserDefault.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // 4 | // 5 | // Created by iOS on 2020/11/20. 6 | // 7 | 8 | import Foundation 9 | ///https://www.jianshu.com/p/6e963d82b129 10 | // MARK: ===================================工具类:UserDefault属性包裹器========================================= 11 | @propertyWrapper 12 | public struct UserDefault { 13 | private let key: String 14 | private let defaultValue: T? 15 | 16 | public init(_ key: String, defaultValue: T? = nil) { 17 | self.key = key 18 | self.defaultValue = defaultValue 19 | } 20 | 21 | public var wrappedValue: T? { 22 | get { 23 | return UserDefaults.standard.object(forKey: key) as? T ?? defaultValue 24 | } 25 | set { 26 | if newValue == nil { 27 | UserDefaults.standard.removeObject(forKey: key) 28 | } else { 29 | UserDefaults.standard.set(newValue, forKey: key) 30 | } 31 | } 32 | } 33 | } 34 | 35 | @propertyWrapper 36 | public struct UserDefaultSuite { 37 | private let suiteName: String 38 | private let key: String 39 | private let defaultValue: T? 40 | 41 | public init(_ suiteName: String, key: String, defaultValue: T? = nil) { 42 | self.key = key 43 | self.defaultValue = defaultValue 44 | self.suiteName = suiteName 45 | } 46 | 47 | public var wrappedValue: T? { 48 | get { 49 | return UserDefaults(suiteName: suiteName)?.object(forKey: key) as? T ?? defaultValue 50 | } 51 | set { 52 | if newValue == nil { 53 | UserDefaults(suiteName: suiteName)?.removeObject(forKey: key) 54 | } else { 55 | UserDefaults(suiteName: suiteName)?.set(newValue, forKey: key) 56 | } 57 | } 58 | } 59 | } 60 | 61 | //MARK: 使用示例 62 | // 63 | /////封装一个UserDefault配置文件 64 | //struct UserDefaultsConfig { 65 | // @UserDefault(key: "username", defaultValue: "123") 66 | // static var username: String 67 | //} 68 | 69 | //struct UserDefaultsSu { 70 | // @UserDefaultSuite(suiteName: "app", key: "test", defaultValue: "123") 71 | // static var test: String 72 | //} 73 | // 74 | 75 | /////具体的业务代码。 76 | //print("修改前\(UserDefaultsConfig.username)") 77 | //UserDefaultsConfig.username = "789" 78 | //print("修改后\(UserDefaultsConfig.username)") 79 | 80 | //print("修改前\(UserDefaultsSu.test)") 81 | //UserDefaultsSu.test = "789" 82 | //print("修改后\(UserDefaultsSu.test)") 83 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Extensions/UserDefaultsEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserDefaultsEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2020/11/20. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | // MARK: ===================================扩展: UserDefaults========================================= 11 | public extension UserDefaults { 12 | 13 | func setT(object: T, forKey: String) throws { 14 | 15 | let jsonData = try JSONEncoder().encode(object) 16 | set(jsonData, forKey: forKey) 17 | } 18 | 19 | func getT(objectType: T.Type, forKey: String) throws -> T? { 20 | 21 | guard let result = value(forKey: forKey) as? Data else { 22 | return nil 23 | } 24 | 25 | return try JSONDecoder().decode(objectType, from: result) 26 | } 27 | 28 | ///下标脚本 29 | subscript(key: String) -> Any? { 30 | get { 31 | return object(forKey: key) 32 | } 33 | set { 34 | set(newValue, forKey: key) 35 | } 36 | } 37 | 38 | func float(forKey key: String) -> Float? { 39 | return object(forKey: key) as? Float 40 | } 41 | 42 | func date(forKey key: String) -> Date? { 43 | return object(forKey: key) as? Date 44 | } 45 | 46 | func object(_ type: T.Type, with key: String, usingDecoder decoder: JSONDecoder = JSONDecoder()) -> T? { 47 | guard let data = value(forKey: key) as? Data else { return nil } 48 | return try? decoder.decode(type.self, from: data) 49 | } 50 | 51 | func set(object: T, forKey key: String, usingEncoder encoder: JSONEncoder = JSONEncoder()) { 52 | let data = try? encoder.encode(object) 53 | set(data, forKey: key) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/backColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "1.000", 9 | "green" : "1.000", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.118", 27 | "green" : "0.110", 28 | "red" : "0.110" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseBlue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "255", 9 | "green" : "122", 10 | "red" : "0" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "255", 27 | "green" : "132", 28 | "red" : "10" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0", 9 | "green" : "102", 10 | "red" : "255" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0", 27 | "green" : "126", 28 | "red" : "255" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseGray.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "147", 9 | "green" : "142", 10 | "red" : "142" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "157", 27 | "green" : "152", 28 | "red" : "152" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseGreen.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "89", 9 | "green" : "199", 10 | "red" : "52" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "88", 27 | "green" : "209", 28 | "red" : "48" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseIndigo.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "214", 9 | "green" : "86", 10 | "red" : "88" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "230", 27 | "green" : "92", 28 | "red" : "94" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseLine.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "227", 9 | "green" : "227", 10 | "red" : "227" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "67", 27 | "green" : "67", 28 | "red" : "67" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseOrange.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0", 9 | "green" : "149", 10 | "red" : "255" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "10", 27 | "green" : "159", 28 | "red" : "255" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/basePink.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "85", 9 | "green" : "45", 10 | "red" : "255" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "95", 27 | "green" : "55", 28 | "red" : "255" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/basePurple.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "222", 9 | "green" : "82", 10 | "red" : "175" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "242", 27 | "green" : "90", 28 | "red" : "191" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseRed.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "48", 9 | "green" : "59", 10 | "red" : "255" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "48", 27 | "green" : "69", 28 | "red" : "255" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseTeal.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "250", 9 | "green" : "200", 10 | "red" : "90" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "255", 27 | "green" : "210", 28 | "red" : "100" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/baseYellow.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0", 9 | "green" : "204", 10 | "red" : "255" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "10", 27 | "green" : "214", 28 | "red" : "255" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/bgColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "242", 9 | "green" : "242", 10 | "red" : "242" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0", 27 | "green" : "0", 28 | "red" : "0" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "filename" : "ziyuan398-2.png", 19 | "idiom" : "universal", 20 | "scale" : "2x" 21 | }, 22 | { 23 | "appearances" : [ 24 | { 25 | "appearance" : "luminosity", 26 | "value" : "dark" 27 | } 28 | ], 29 | "filename" : "ziyuan398-3.png", 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "filename" : "ziyuan398.png", 35 | "idiom" : "universal", 36 | "scale" : "3x" 37 | }, 38 | { 39 | "appearances" : [ 40 | { 41 | "appearance" : "luminosity", 42 | "value" : "dark" 43 | } 44 | ], 45 | "filename" : "ziyuan398-4.png", 46 | "idiom" : "universal", 47 | "scale" : "3x" 48 | } 49 | ], 50 | "info" : { 51 | "author" : "xcode", 52 | "version" : 1 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398-2.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398-3.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398-4.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_back.imageset/ziyuan398.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close-2.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close-3.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close-5.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Close.png -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/nav_ic_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "idiom" : "universal", 15 | "scale" : "1x" 16 | }, 17 | { 18 | "filename" : "Close-2.png", 19 | "idiom" : "universal", 20 | "scale" : "2x" 21 | }, 22 | { 23 | "appearances" : [ 24 | { 25 | "appearance" : "luminosity", 26 | "value" : "dark" 27 | } 28 | ], 29 | "filename" : "Close.png", 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "filename" : "Close-3.png", 35 | "idiom" : "universal", 36 | "scale" : "3x" 37 | }, 38 | { 39 | "appearances" : [ 40 | { 41 | "appearance" : "luminosity", 42 | "value" : "dark" 43 | } 44 | ], 45 | "filename" : "Close-5.png", 46 | "idiom" : "universal", 47 | "scale" : "3x" 48 | } 49 | ], 50 | "info" : { 51 | "author" : "xcode", 52 | "version" : 1 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/textDesColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "153", 9 | "green" : "153", 10 | "red" : "153" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "102", 27 | "green" : "99", 28 | "red" : "99" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/textLinkColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "252", 9 | "green" : "127", 10 | "red" : "0" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "255", 27 | "green" : "137", 28 | "red" : "0" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/textSecColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "90", 9 | "green" : "90", 10 | "red" : "90" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "151", 27 | "green" : "151", 28 | "red" : "151" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Resources/Colors.xcassets/textTitleColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0", 9 | "green" : "0", 10 | "red" : "0" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "247", 27 | "green" : "242", 28 | "red" : "242" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Angle++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension Angle { 10 | @inlinable 11 | public static var pi: Angle { 12 | return .init(radians: Double.pi) 13 | } 14 | 15 | @inlinable 16 | public func remainder(dividingBy other: Angle) -> Angle { 17 | .init(radians: radians.remainder(dividingBy: other.radians)) 18 | } 19 | 20 | @inlinable 21 | public init(degrees: CGFloat) { 22 | self.init(degrees: Double(degrees)) 23 | } 24 | 25 | @inlinable 26 | public init(degrees: Int) { 27 | self.init(degrees: Double(degrees)) 28 | } 29 | 30 | @inlinable 31 | public init(radians: CGFloat) { 32 | self.init(radians: Double(radians)) 33 | } 34 | 35 | @inlinable 36 | public init(radians: Int) { 37 | self.init(radians: Double(radians)) 38 | } 39 | 40 | public static func degrees(_ value: CGFloat) -> Angle { 41 | return .init(degrees: value) 42 | } 43 | 44 | public static func degrees(_ value: Int) -> Angle { 45 | return .init(degrees: value) 46 | } 47 | 48 | public static func radians(_ value: CGFloat) -> Angle { 49 | return .init(radians: value) 50 | } 51 | 52 | public static func radians(_ value: Int) -> Angle { 53 | return .init(radians: value) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Font++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FontEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2023/5/9. 6 | // Copyright © 2023 狄烨 . All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | @available(iOS 13.0, *) 12 | extension Text { 13 | @inlinable 14 | public func font(_ font: Font, weight: Font.Weight?) -> Text { 15 | if let weight { 16 | return self.font(font.weight(weight)) 17 | } else { 18 | return self.font(font) 19 | } 20 | } 21 | } 22 | 23 | @available(iOS 13.0, *) 24 | extension View { 25 | 26 | @inlinable 27 | @ViewBuilder 28 | public func font(_ font: Font, weight: Font.Weight?) -> some View { 29 | if let weight { 30 | self.font(font.weight(weight)) 31 | } else { 32 | self.font(font) 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Font.TextStyle++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension Font.TextStyle { 10 | 11 | public var defaultMetrics: (weight: Font.Weight, size: CGFloat, leading: CGFloat) { 12 | switch self { 13 | case .largeTitle: 14 | return (.regular, 34, 41) 15 | case .title: 16 | return (.regular, 28, 34) 17 | case .headline: 18 | return (.semibold, 17, 22) 19 | case .subheadline: 20 | return (.regular, 15, 20) 21 | case .body: 22 | return (.regular, 17, 22) 23 | case .callout: 24 | return (.regular, 16, 21) 25 | case .footnote: 26 | return (.regular, 13, 18) 27 | case .caption: 28 | return (.regular, 12, 16) 29 | 30 | default: do { 31 | if #available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) { 32 | switch self { 33 | case .title2: 34 | return (.regular, 22, 28) 35 | case .title3: 36 | return (.regular, 20, 25) 37 | case .caption2: 38 | return (.regular, 11, 13) 39 | default: do { 40 | assertionFailure() 41 | 42 | return Self.body.defaultMetrics 43 | } 44 | } 45 | } else { 46 | assertionFailure() 47 | 48 | return Self.body.defaultMetrics 49 | } 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/GridIem++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) 9 | extension GridItem { 10 | public static func flexible( 11 | spacing: CGFloat? = nil, 12 | alignment: Alignment? = nil 13 | ) -> Self { 14 | GridItem(.flexible(), spacing: spacing, alignment: alignment) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/GridItem.Size++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) 9 | extension GridItem.Size { 10 | public static func adaptive(_ size: CGFloat) -> Self { 11 | .adaptive(minimum: size, maximum: size) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Image++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import SwiftUI 6 | 7 | @available(iOS 13.0, *) 8 | extension Image { 9 | 10 | public func sizeToFit( 11 | width: CGFloat? = nil, 12 | height: CGFloat? = nil, 13 | alignment: Alignment = .center 14 | ) -> some View { 15 | resizable() 16 | .aspectRatio(contentMode: .fit) 17 | .frame(width: width, height: height, alignment: alignment) 18 | } 19 | 20 | @_disfavoredOverload 21 | public func sizeToFit( 22 | _ size: CGSize? = nil, 23 | alignment: Alignment = .center 24 | ) -> some View { 25 | sizeToFit(width: size?.width, height: size?.height, alignment: alignment) 26 | } 27 | 28 | public func sizeToFitSquare( 29 | sideLength: CGFloat?, 30 | alignment: Alignment = .center 31 | ) -> some View { 32 | sizeToFit(width: sideLength, height: sideLength, alignment: alignment) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Label++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 14.0, OSX 10.16, tvOS 14.0, watchOS 7.0, *) 9 | extension Label where Title == Text { 10 | /// Creates a label with a system icon image and a title generated from a 11 | /// localized string. 12 | @available(iOS 14.0, OSX 10.16, tvOS 14.0, watchOS 7.0, *) 13 | public init(_ titleKey: LocalizedStringKey, @ViewBuilder icon: () -> Icon) { 14 | self.init(title: { Text(titleKey) }, icon: icon) 15 | } 16 | 17 | /// Creates a label with a system icon image and a title generated from a 18 | /// string. 19 | @available(iOS 14.0, OSX 10.16, tvOS 14.0, watchOS 7.0, *) 20 | public init(_ title: S, @ViewBuilder icon: () -> Icon) { 21 | self.init(title: { Text(title) }, icon: icon) 22 | } 23 | } 24 | 25 | @available(iOS 14.0, OSX 10.16, tvOS 14.0, watchOS 7.0, *) 26 | extension Label where Title == Text, Icon == Image { 27 | /// Creates a label with a system icon image and a title generated from a 28 | /// localized string. 29 | @available(iOS 14.0, OSX 10.16, tvOS 14.0, watchOS 7.0, *) 30 | public init(_ titleKey: LocalizedStringKey, systemImage name: SFSymbolName) { 31 | self.init(titleKey, systemImage: name.rawValue) 32 | } 33 | 34 | /// Creates a label with a system icon image and a title generated from a 35 | /// string. 36 | @available(iOS 14.0, OSX 10.16, tvOS 14.0, watchOS 7.0, *) 37 | public init(_ title: S, systemImage name: SFSymbolName) { 38 | self.init(title, systemImage: name.rawValue) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/NavigationLink++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension NavigationLink { 10 | @_disfavoredOverload 11 | public init( 12 | @ViewBuilder destination: () -> Destination, 13 | @ViewBuilder label: () -> Label 14 | ) { 15 | self.init(destination: destination(), label: label) 16 | } 17 | } 18 | 19 | @available(iOS 13.0, *) 20 | extension NavigationLink where Label == Text { 21 | /// Creates an instance that presents `destination`, with a Text label generated from a title string. 22 | public init(_ title: LocalizedStringKey, @ViewBuilder destination: () -> Destination) { 23 | self.init(title, destination: destination()) 24 | } 25 | 26 | /// Creates an instance that presents `destination`, with a Text label generated from a title string. 27 | public init(_ title: S, @ViewBuilder destination: () -> Destination) { 28 | self.init(title, destination: destination()) 29 | } 30 | 31 | @_disfavoredOverload 32 | public init( 33 | _ title: String, 34 | isActive: Binding, 35 | @ViewBuilder destination: () -> Destination 36 | ) { 37 | self.init(title, destination: destination(), isActive: isActive) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Section++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension Section { 10 | public var header: Parent { 11 | unsafeBitCast(self, to: (Parent, Content, Footer).self).0 12 | } 13 | 14 | public var content: Content { 15 | unsafeBitCast(self, to: (Parent, Content, Footer).self).1 16 | } 17 | 18 | public var footer: Footer { 19 | unsafeBitCast(self, to: (Parent, Content, Footer).self).2 20 | } 21 | } 22 | 23 | @available(iOS 13.0, *) 24 | extension Section where Parent == Text, Content: View, Footer == EmptyView { 25 | @_disfavoredOverload 26 | public init(_ header: S, @ViewBuilder content: () -> Content) { 27 | self.init(header: Text(header), content: content) 28 | } 29 | 30 | @_disfavoredOverload 31 | public init(_ header: LocalizedStringKey, @ViewBuilder content: () -> Content) { 32 | self.init(header: Text(header), content: content) 33 | } 34 | 35 | @_disfavoredOverload 36 | public init(header: S, @ViewBuilder content: () -> Content) { 37 | self.init(header: Text(header), content: content) 38 | } 39 | } 40 | 41 | @available(iOS 13.0, *) 42 | extension Section where Parent == Text, Content: View, Footer == Text { 43 | public init( 44 | header: S, 45 | footer: S, 46 | @ViewBuilder content: () -> Content 47 | ) { 48 | self.init(header: Text(header), footer: Text(footer), content: content) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/SecureField++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension SecureField where Label == Text { 10 | public init( 11 | _ title: LocalizedStringKey, 12 | text: Binding, 13 | onCommit: @escaping () -> Void = { } 14 | ) { 15 | self.init( 16 | title, 17 | text: text.withDefaultValue(""), 18 | onCommit: onCommit 19 | ) 20 | } 21 | 22 | public init( 23 | _ title: S, 24 | text: Binding, 25 | onCommit: @escaping () -> Void = { } 26 | ) { 27 | self.init( 28 | title, 29 | text: text.withDefaultValue(""), 30 | onCommit: onCommit 31 | ) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Shape++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension Shape { 10 | public func fill( 11 | _ fillContent: S, 12 | stroke strokeStyle: StrokeStyle 13 | ) -> some View { 14 | ZStack { 15 | fill(fillContent) 16 | stroke(style: strokeStyle) 17 | } 18 | } 19 | 20 | public func fillAndStrokeBorder( 21 | _ fillContent: S, 22 | borderColor: Color, 23 | borderWidth: CGFloat, 24 | antialiased: Bool = true 25 | ) -> some View where Self: InsettableShape { 26 | ZStack { 27 | inset(by: borderWidth / 2).fill(fillContent) 28 | 29 | self.strokeBorder( 30 | borderColor, 31 | lineWidth: borderWidth, 32 | antialiased: antialiased 33 | ) 34 | } 35 | .compositingGroup() 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/Text++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension Text { 10 | /// Applies a semi-bold font weight to the text. 11 | public func semibold() -> Text { 12 | fontWeight(.semibold) 13 | } 14 | 15 | public func bold() -> Text { 16 | fontWeight(.bold) 17 | } 18 | 19 | public func medium() -> Text { 20 | fontWeight(.medium) 21 | } 22 | } 23 | 24 | @available(iOS 13.0, *) 25 | extension Text { 26 | /// Applies a linear foreground gradient to the text. 27 | public func foregroundLinearGradient( 28 | _ gradient: Gradient, 29 | startPoint: UnitPoint = .leading, 30 | endPoint: UnitPoint = .trailing 31 | ) -> some View { 32 | overlay( 33 | LinearGradient( 34 | gradient: gradient, 35 | startPoint: startPoint, 36 | endPoint: endPoint 37 | ) 38 | ) 39 | .mask(self) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/SwiftUIX/TextField++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) Vatsal Manot 3 | // 4 | 5 | import Swift 6 | import SwiftUI 7 | 8 | @available(iOS 13.0, *) 9 | extension TextField where Label == Text { 10 | public init( 11 | _ title: LocalizedStringKey, 12 | text: Binding, 13 | isEditing: Binding, 14 | onCommit: @escaping () -> Void = { } 15 | ) { 16 | self.init( 17 | title, 18 | text: text, 19 | onEditingChanged: { isEditing.wrappedValue = $0 }, 20 | onCommit: onCommit 21 | ) 22 | } 23 | 24 | public init( 25 | _ title: LocalizedStringKey, 26 | text: Binding, 27 | onEditingChanged: @escaping (Bool) -> Void = { _ in }, 28 | onCommit: @escaping () -> Void = { } 29 | ) { 30 | self.init( 31 | title, 32 | text: text.withDefaultValue(""), 33 | onEditingChanged: onEditingChanged, 34 | onCommit: onCommit 35 | ) 36 | } 37 | 38 | public init( 39 | _ title: LocalizedStringKey, 40 | text: Binding, 41 | isEditing: Binding, 42 | onCommit: @escaping () -> Void = { } 43 | ) { 44 | self.init( 45 | title, 46 | text: text, 47 | onEditingChanged: { isEditing.wrappedValue = $0 }, 48 | onCommit: onCommit 49 | ) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/ViewEx.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewEx.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2023/4/20. 6 | // Copyright © 2023 狄烨 . All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | @available(iOS 13.0, *) 12 | public struct RoundedCorner: Shape { 13 | 14 | public var radius: CGFloat = .infinity 15 | public var corners: UIRectCorner = .allCorners 16 | 17 | public func path(in rect: CGRect) -> Path { 18 | let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius)) 19 | return Path(path.cgPath) 20 | } 21 | } 22 | 23 | @available(iOS 13.0, *) 24 | public extension View { 25 | func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View { 26 | clipShape( RoundedCorner(radius: radius, corners: corners) ) 27 | } 28 | } 29 | 30 | @available(iOS 13.0, *) 31 | public extension Spacer { 32 | @ViewBuilder static func width(_ value: CGFloat?) -> some View { 33 | switch value { 34 | case .some(let value): Spacer().frame(width: max(value, 0)) 35 | case nil: Spacer() 36 | } 37 | } 38 | 39 | @ViewBuilder static func height(_ value: CGFloat?) -> some View { 40 | switch value { 41 | case .some(let value): Spacer().frame(height: max(value, 0)) 42 | case nil: Spacer() 43 | } 44 | } 45 | } 46 | 47 | @available(iOS 13.0, *) 48 | public extension View { 49 | func readHeight(onChange action: @escaping (CGFloat) -> ()) -> some View { 50 | background(heightReader) 51 | .onPreferenceChange(HeightPreferenceKey.self, perform: action) 52 | } 53 | } 54 | 55 | @available(iOS 13.0, *) 56 | private extension View { 57 | var heightReader: some View { 58 | GeometryReader { 59 | Color.clear 60 | .preference(key: HeightPreferenceKey.self, value: $0.size.height) 61 | } 62 | } 63 | } 64 | 65 | fileprivate struct HeightPreferenceKey: PreferenceKey { 66 | static var defaultValue: CGFloat = 0 67 | static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {} 68 | } 69 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/SwiftUI/WebView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebView.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2023/4/20. 6 | // Copyright © 2023 狄烨 . All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | public struct WebView: UIViewControllerRepresentable { 12 | public let urlString: String 13 | 14 | public init(urlString: String) { 15 | self.urlString = urlString 16 | } 17 | 18 | public func makeUIViewController(context: Context) -> WebViewController { 19 | let webviewController = WebViewController() 20 | return webviewController 21 | } 22 | 23 | public func updateUIViewController(_ webviewController: WebViewController, context: Context){ 24 | guard let url = URL(string: urlString) else { 25 | return 26 | } 27 | let request = URLRequest(url: url, cachePolicy: .returnCacheDataElseLoad) 28 | DispatchQueue.main.async { 29 | webviewController.webView.load(request) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Util/AppState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppState.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2020/11/18. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | // MARK: ===================================工具类:APP当前状态========================================= 11 | extension SwiftBrick{ 12 | public enum AppStateMode { 13 | case debug 14 | case testFlight 15 | case appStore 16 | } 17 | 18 | public struct AppState { 19 | 20 | fileprivate static let isTestFlight = Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" 21 | 22 | public static var isDebug: Bool { 23 | #if DEBUG 24 | return true 25 | #else 26 | return false 27 | #endif 28 | } 29 | 30 | public static var state: AppStateMode { 31 | if isDebug { 32 | return .debug 33 | } else if isTestFlight { 34 | return .testFlight 35 | } else { 36 | return .appStore 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Util/Application.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Application.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2023/4/20. 6 | // Copyright © 2023 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | // MARK:- App信息 11 | extension SwiftBrick{ 12 | public struct Application { 13 | 14 | public static var appDisplayName: String { 15 | return Bundle.main.infoDictionary?["CFBundleDisplayName"] as! String 16 | } 17 | 18 | public static var appName: String { 19 | return Bundle.main.infoDictionary?[kCFBundleNameKey as String] as! String 20 | } 21 | 22 | public static var appBundleID: String { 23 | return Bundle.main.bundleIdentifier! 24 | } 25 | 26 | public static var version: String { 27 | return Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String 28 | } 29 | 30 | public static var build: String { 31 | return Bundle.main.object(forInfoDictionaryKey: kCFBundleVersionKey as String) as! String 32 | } 33 | 34 | public static var completeAppVersion: String { 35 | return "\(Application.version) (\(Application.build))" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Util/Loader.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JHImageLoader.swift 3 | // JHToolsModule_Swift 4 | // 5 | // Created by iOS on 18/11/2019. 6 | // Copyright © 2019 HU. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | // MARK: ===================================工具类:用于加载当前命名空间的资源文件========================================= 11 | extension Bundle { 12 | 13 | #if !ENABLE_SPM 14 | private class _BundleClass { } 15 | #endif 16 | 17 | static var current: Bundle { 18 | #if ENABLE_SPM 19 | return Bundle.module 20 | #else 21 | return Bundle(for: _BundleClass.self) 22 | #endif 23 | } 24 | 25 | func localizedString(forKey key: String) -> String { 26 | self.localizedString(forKey: key, value: nil, table: nil) 27 | } 28 | } 29 | 30 | public struct L{ 31 | 32 | static var bundle: Bundle = { 33 | let path = Bundle.current.path(forResource: "SwiftBrick", ofType: "bundle", inDirectory: nil) 34 | let bundle = Bundle(path: path ?? "") 35 | return bundle ?? Bundle.current 36 | }() 37 | 38 | public static func color(_ named: String) -> UIColor { 39 | guard let color = UIColor(named: named, in: bundle, compatibleWith: nil) else { 40 | return UIColor(named: named) ?? UIColor.clear 41 | } 42 | return color 43 | } 44 | 45 | public static func image(_ named: String) -> UIImage { 46 | guard let image = UIImage(named: named, in: bundle, compatibleWith: nil) else { 47 | let image = UIImage(named: named) 48 | return image ?? UIImage() 49 | } 50 | return image 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Util/SwiftBrick.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftBrick.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2020/11/30. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | // MARK: ===================================VC基类:协议========================================= 12 | public struct SwiftBrick{ 13 | ///如果使用导航栏的功能可以全局设置下 14 | ///统一设置返回按钮图片(默认) 15 | public static var navBarNorBackImage: UIImage? 16 | ///统一设置返回按钮图片(按下) 17 | public static var navBarHigBackImage: UIImage? 18 | ///导航栏左按钮修正距离,默认按钮距离边缘为20:左移为-,右移为+ 19 | public static var navBarLeftFixSpace: CGFloat = 0 20 | ///导航栏右按钮修正距离,默认按钮距离边缘为20:左移为+,右移为- 21 | public static var navBarRightFixSpace: CGFloat = 0 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/Util/Then.swift: -------------------------------------------------------------------------------- 1 | 2 | import Foundation 3 | #if !os(Linux) 4 | import CoreGraphics 5 | #endif 6 | #if os(iOS) || os(tvOS) 7 | import UIKit.UIGeometry 8 | #endif 9 | // MARK: ===================================工具类:初始化闭包========================================= 10 | public protocol Then {} 11 | 12 | extension Then where Self: Any { 13 | 14 | @inlinable 15 | public func with(_ block: (inout Self) throws -> Void) rethrows -> Self { 16 | var copy = self 17 | try block(©) 18 | return copy 19 | } 20 | 21 | @inlinable 22 | public func `do`(_ block: (Self) throws -> Void) rethrows { 23 | try block(self) 24 | } 25 | 26 | } 27 | 28 | extension Then where Self: AnyObject { 29 | 30 | @inlinable 31 | public func then(_ block: (Self) throws -> Void) rethrows -> Self { 32 | try block(self) 33 | return self 34 | } 35 | 36 | } 37 | 38 | extension NSObject: Then {} 39 | 40 | #if !os(Linux) 41 | extension CGPoint: Then {} 42 | extension CGRect: Then {} 43 | extension CGSize: Then {} 44 | extension CGVector: Then {} 45 | #endif 46 | 47 | extension Array: Then {} 48 | extension Dictionary: Then {} 49 | extension Set: Then {} 50 | 51 | #if os(iOS) || os(tvOS) 52 | extension UIEdgeInsets: Then {} 53 | extension UIOffset: Then {} 54 | extension UIRectEdge: Then {} 55 | #endif 56 | -------------------------------------------------------------------------------- /Example/Pods/SwiftBrick/Sources/SwiftBrick/ViewFactory/InsetLabel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InsetLabel.swift 3 | // SwiftBrick 4 | // 5 | // Created by iOS on 2021/3/16. 6 | // Copyright © 2021 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | // MARK: ===================================工厂类:带内边距UILabel========================================= 11 | public class InsetLabel: UILabel { 12 | // 1.定义一个接受间距的属性 13 | public var textInsets = UIEdgeInsets.zero 14 | 15 | //2. 返回 label 重新计算过 text 的 rectangle 16 | public override func textRect(forBounds bounds: CGRect, limitedToNumberOfLines numberOfLines: Int) -> CGRect { 17 | guard text != nil else { 18 | return super.textRect(forBounds: bounds, limitedToNumberOfLines: numberOfLines) 19 | } 20 | 21 | let insetRect = bounds.inset(by: textInsets) 22 | let textRect = super.textRect(forBounds: insetRect, limitedToNumberOfLines: numberOfLines) 23 | let invertedInsets = UIEdgeInsets(top: -textInsets.top, 24 | left: -textInsets.left, 25 | bottom: -textInsets.bottom, 26 | right: -textInsets.right) 27 | return textRect.inset(by: invertedInsets) 28 | } 29 | 30 | //3. 绘制文本时,对当前 rectangle 添加间距 31 | public override func drawText(in rect: CGRect) { 32 | super.drawText(in: rect.inset(by: textInsets)) 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Example/Pods/SwiftShow/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 张金虎 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 | -------------------------------------------------------------------------------- /Example/Pods/SwiftShow/Sources/SwiftShow/Show/ToastView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ToastView.swift 3 | // SwiftShow 4 | // 5 | // Created by iOS on 2020/1/16. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SnapKit 11 | 12 | 13 | class ToastView: UIView { 14 | 15 | required init?(coder: NSCoder) { 16 | fatalError("init(coder:) has not been implemented") 17 | } 18 | 19 | init(title: String, 20 | subTitle: String? = nil, 21 | image: UIImage? = nil, 22 | config : ShowToastConfig) { 23 | 24 | super.init(frame: CGRect.zero) 25 | 26 | let containerView = UIView() 27 | addSubview(containerView) 28 | containerView.backgroundColor = config.bgColor 29 | containerView.layer.cornerRadius = config.cornerRadius 30 | if config.shadowColor != UIColor.clear.cgColor { 31 | containerView.layer.shadowColor = config.shadowColor 32 | containerView.layer.shadowOpacity = config.shadowOpacity 33 | containerView.layer.shadowRadius = config.shadowRadius 34 | containerView.layer.shadowOffset = CGSize.zero 35 | } 36 | containerView.snp.makeConstraints { (make) in 37 | make.top.left.right.bottom.equalToSuperview() 38 | } 39 | let view = CommonView(title: title, 40 | subtitle: subTitle, 41 | image: image, 42 | imageType: config.imageType, 43 | spaceImage: config.spaceImage, 44 | spaceText: config.spaceText) 45 | 46 | view.titleLabel.textColor = config.titleColor 47 | view.titleLabel.font = config.titleFont 48 | 49 | view.subtitleLabel.textColor = config.subTitleColor 50 | view.subtitleLabel.font = config.subTitleFont 51 | 52 | containerView.addSubview(view) 53 | 54 | view.snp.makeConstraints { (make) in 55 | make.top.left.equalToSuperview().offset(config.padding) 56 | make.bottom.right.equalToSuperview().offset(-config.padding) 57 | make.width.lessThanOrEqualTo(config.maxWidth) 58 | make.height.lessThanOrEqualTo(config.maxHeight) 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 张金虎 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 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Cells/BaseCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FormCell.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SnapKit 11 | ///基础cell 12 | open class BaseCell: UITableViewCell, FormableRow { 13 | open func updateWithRowFormer(_ rowFormer: RowFormer) { 14 | 15 | } 16 | 17 | required public init?(coder aDecoder: NSCoder) { 18 | super.init(coder: aDecoder) 19 | setup() 20 | } 21 | 22 | override public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 23 | super.init(style: style, reuseIdentifier: reuseIdentifier) 24 | setup() 25 | } 26 | 27 | 28 | open func setup() { 29 | selectionStyle = .none 30 | contentView.backgroundColor = .clear 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Cells/ButtonCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonCell.swift 3 | // SwiftyForm 4 | // 5 | // Created by 张金虎 on 2020/6/6. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | /// 按钮样式cell 左侧leftButton 右侧rightButton 需要单个按钮请隐藏leftButton 11 | public class ButtonRow: ButtonRowFormer { 12 | 13 | } 14 | 15 | open class ButtonCell: BaseCell, ButtonFormableRow { 16 | 17 | public private(set) weak var leftButton: UIButton! 18 | public private(set) weak var rightButton: UIButton! 19 | ///获取左侧按钮(可修改属性) 20 | public func formLeftButton() -> UIButton { 21 | return leftButton 22 | } 23 | ///获取右侧按钮(可修改属性) 24 | public func formRightButton() -> UIButton { 25 | return rightButton 26 | } 27 | 28 | open override func setup() { 29 | super.setup() 30 | 31 | let leftButton = UIButton() 32 | contentView.addSubview(leftButton) 33 | self.leftButton = leftButton 34 | leftButton.snp.makeConstraints { (make) in 35 | make.left.equalToSuperview().offset(20) 36 | make.right.equalTo(contentView.snp.centerX).offset(-5) 37 | make.centerY.equalToSuperview() 38 | make.height.equalTo(50) 39 | } 40 | 41 | let rightButton = UIButton() 42 | contentView.addSubview(rightButton) 43 | self.rightButton = rightButton 44 | rightButton.snp.makeConstraints { (make) in 45 | make.right.equalToSuperview().offset(-20) 46 | make.left.equalTo(contentView.snp.centerX).offset(5) 47 | make.centerY.equalToSuperview() 48 | make.height.equalTo(50) 49 | } 50 | } 51 | 52 | open override func updateWithRowFormer(_ rowFormer: RowFormer) { 53 | 54 | rightButton.snp.remakeConstraints { (make) in 55 | make.right.equalToSuperview().offset(-20) 56 | make.centerY.equalToSuperview() 57 | make.height.equalTo(50) 58 | if leftButton.isHidden{ 59 | make.left.equalToSuperview().offset(20) 60 | }else{ 61 | make.left.equalTo(contentView.snp.centerX).offset(5) 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Cells/CheckCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCellFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | /// Mark选中样式cell 左侧 titleImageView titleLabel 右侧mark标记(cell自带) 11 | public class CheckRow: CheckRowFormer { 12 | 13 | } 14 | 15 | open class CheckCell: BaseCell, CheckFormableRow { 16 | 17 | public private(set) weak var titleImageView: UIImageView! 18 | public private(set) weak var titleLabel: UILabel! 19 | /// 标题左侧图标(可修改属性) 20 | public func formTitleImageView() -> UIImageView? { 21 | return titleImageView 22 | } 23 | /// 标题Label(可修改属性) 24 | public func formTitleLabel() -> UILabel? { 25 | return titleLabel 26 | } 27 | 28 | open override func setup() { 29 | super.setup() 30 | 31 | let titleImageView = UIImageView() 32 | titleImageView.clipsToBounds = true 33 | titleImageView.setContentHuggingPriority(.defaultHigh, for: .horizontal) 34 | titleImageView.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal) 35 | contentView.addSubview(titleImageView) 36 | self.titleImageView = titleImageView 37 | titleImageView.snp.makeConstraints { (make) in 38 | make.centerY.equalToSuperview() 39 | make.left.equalToSuperview().offset(20) 40 | } 41 | 42 | let titleLabel = UILabel() 43 | titleLabel.translatesAutoresizingMaskIntoConstraints = false 44 | contentView.addSubview(titleLabel) 45 | self.titleLabel = titleLabel 46 | titleLabel.snp.makeConstraints { (make) in 47 | make.top.bottom.equalToSuperview() 48 | make.left.equalToSuperview().offset(20) 49 | } 50 | } 51 | 52 | open override func updateWithRowFormer(_ rowFormer: RowFormer) { 53 | 54 | titleLabel.snp.remakeConstraints { (make) in 55 | make.top.bottom.equalToSuperview() 56 | if titleImageView.image == nil{ 57 | make.left.equalToSuperview().offset(20) 58 | }else{ 59 | make.left.equalTo(titleImageView.snp.right).offset(5) 60 | } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Cells/DatePickerCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCellFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | /// 日期选择picker cell 11 | public class DatePickerRow: DatePickerRowFormer { 12 | 13 | } 14 | 15 | open class DatePickerCell: BaseCell, DatePickerFormableRow { 16 | 17 | public private(set) weak var datePicker: UIDatePicker! 18 | ///获取UIDatePicker(可修改属性) 19 | public func formDatePicker() -> UIDatePicker { 20 | return datePicker 21 | } 22 | 23 | open override func setup() { 24 | super.setup() 25 | 26 | let datePicker = UIDatePicker() 27 | datePicker.translatesAutoresizingMaskIntoConstraints = false 28 | if #available(iOS 13.4, *) { 29 | datePicker.preferredDatePickerStyle = .wheels 30 | } 31 | contentView.addSubview(datePicker) 32 | self.datePicker = datePicker 33 | datePicker.snp.makeConstraints { (make) in 34 | make.top.equalToSuperview().offset(5) 35 | make.left.equalToSuperview().offset(5) 36 | make.right.equalToSuperview().offset(-5) 37 | make.bottom.equalToSuperview().offset(-5) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Cells/PickerCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCellFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | /// picker cell 11 | public class PickerRow: PickerRowFormer { 12 | 13 | } 14 | 15 | open class PickerCell: BaseCell, PickerFormableRow { 16 | 17 | public private(set) weak var pickerView: UIPickerView! 18 | ///获取UIPickerView(可修改属性) 19 | public func formPickerView() -> UIPickerView { 20 | return pickerView 21 | } 22 | 23 | open override func setup() { 24 | super.setup() 25 | 26 | let pickerView = UIPickerView() 27 | pickerView.translatesAutoresizingMaskIntoConstraints = false 28 | contentView.addSubview(pickerView) 29 | self.pickerView = pickerView 30 | pickerView.snp.makeConstraints { (make) in 31 | make.top.equalToSuperview().offset(5) 32 | make.left.equalToSuperview().offset(5) 33 | make.right.equalToSuperview().offset(-5) 34 | make.bottom.equalToSuperview().offset(-5) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Core/ViewFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HeaderFooterFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol FormableHeaderFooter{ 12 | 13 | func updateHeaderFooterFormer(_ headerFooterFormer: ViewFormer) 14 | } 15 | 16 | open class ViewFormer { 17 | 18 | open var viewHeight: CGFloat = .leastNormalMagnitude 19 | 20 | internal func viewInstanceInitialized(_ view: UITableViewHeaderFooterView) { 21 | 22 | } 23 | 24 | private var _viewInstance: UITableViewHeaderFooterView? 25 | private final let viewType: UITableViewHeaderFooterView.Type 26 | internal final var viewSetup: ((UITableViewHeaderFooterView) -> Void)? 27 | 28 | public init(withViewType type: T.Type) { 29 | viewType = type 30 | initialized() 31 | } 32 | 33 | @discardableResult 34 | public final func viewSetup(_ handler: @escaping ((UITableViewHeaderFooterView) -> Void)) -> Self { 35 | viewSetup = handler 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dynamicViewHeight(_ handler: @escaping ((UITableView, /*section:*/Int) -> CGFloat)) -> Self { 41 | dynamicViewHeight = handler 42 | return self 43 | } 44 | 45 | open func initialized() { 46 | 47 | } 48 | 49 | open func update() { 50 | if let formableView = viewInstance as? FormableHeaderFooter { 51 | formableView.updateHeaderFooterFormer(self) 52 | } 53 | } 54 | 55 | internal final var dynamicViewHeight: ((UITableView, Int) -> CGFloat)? 56 | 57 | internal final var viewInstance: UITableViewHeaderFooterView { 58 | if _viewInstance == nil { 59 | _viewInstance = viewType.init(reuseIdentifier: nil) 60 | viewInstanceInitialized(_viewInstance!) 61 | viewSetup?(_viewInstance!) 62 | } 63 | return _viewInstance! 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/AvatarRowFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AvatarRowFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// AvatarForm协议 12 | public protocol AvatarFormableRow: FormableRow { 13 | 14 | func formTitleLabel() -> UILabel? 15 | func formTitleImageView() -> UIImageView? 16 | func formAvatarView() -> UIImageView? 17 | } 18 | 19 | /// AvatarForm 20 | open class AvatarRowFormer : BaseRowFormer, Formable where T: AvatarFormableRow { 21 | ///头像图片 22 | public var avatarImage: UIImage? 23 | ///头像圆角 24 | public var avatarRadius: CGFloat = 4 25 | /// AvatarForm初始化 26 | open override func initialized() { 27 | rowHeight = 80 28 | } 29 | /// AvatarForm初始化 30 | open override func cellInitialized(_ cell: T) { 31 | let titleImageView = cell.formTitleImageView() 32 | titleImageView?.image = titleImage 33 | } 34 | 35 | open override func cellSelected(indexPath: IndexPath) { 36 | super.cellSelected(indexPath: indexPath) 37 | former?.deselect(animated: true) 38 | } 39 | 40 | /// AvatarForm数据更新 41 | open override func update() { 42 | super.update() 43 | 44 | let textLabel = cell.formTitleLabel() 45 | let avatarView = cell.formAvatarView() 46 | if let title = title { 47 | textLabel?.text = title 48 | } 49 | 50 | if let attributedTitle = attributedTitle{ 51 | textLabel?.attributedText = attributedTitle 52 | } 53 | avatarView?.image = avatarImage 54 | avatarView?.layer.cornerRadius = avatarRadius 55 | if enabled { 56 | _ = titleColor.map { textLabel?.textColor = $0 } 57 | titleColor = nil 58 | } else { 59 | if titleColor == nil { titleColor = textLabel?.textColor ?? .black } 60 | textLabel?.textColor = titleDisabledColor 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/BaseHeaderFooterFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseHeaderFooterFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class BaseHeaderFooterFormer : ViewFormer, ConfigurableForm { 12 | 13 | 14 | /// 获取form中的headerfooter 15 | public var headerFooter: T { 16 | return viewInstance as! T 17 | } 18 | 19 | public init() { 20 | super.init(withViewType: T.self) 21 | } 22 | 23 | /// 创建headerFooter上控件 24 | /// - Parameter handler: handler description 25 | /// - Returns: description 26 | public final func viewSetup(handler: ((T) -> Void)) -> Self { 27 | handler(headerFooter) 28 | return self 29 | } 30 | 31 | /// headerFooter 更新 32 | /// - Parameter update: update description 33 | /// - Returns: description 34 | public final func viewUpdate(update: ((T) -> Void)) -> Self { 35 | update(headerFooter) 36 | return self 37 | } 38 | 39 | /// headerFooter初始化 40 | /// - Parameter view: view description 41 | open func viewInitialized(_ view: T) { 42 | 43 | } 44 | 45 | /// headerFooter初始化 46 | /// - Parameter view: view description 47 | override func viewInstanceInitialized(_ view: UITableViewHeaderFooterView) { 48 | viewInitialized(view as! T) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/BaseRowFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCellFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class BaseRowFormer: RowFormer { 12 | ///cell不可点击是标题颜色 13 | public var titleDisabledColor: UIColor? = .lightGray 14 | ///cell标题颜色 15 | public var titleColor: UIColor? 16 | 17 | /// 获取form里的cell 18 | public var cell: T { 19 | return cellInstance as! T 20 | } 21 | 22 | public init() { 23 | super.init(withCellType: T.self) 24 | } 25 | 26 | /// 设置cell内视图 27 | /// - Parameter handler: 回调闭包 28 | /// - Returns: 返回former 29 | @discardableResult public final func cellSetup(_ handler: @escaping ((T) -> Void)) -> Self { 30 | cellSetup = { handler(($0 as! T)) } 31 | return self 32 | } 33 | 34 | /// cell更新 35 | /// - Parameter update: 回调闭包 36 | /// - Returns: 返回former 37 | @discardableResult public final func cellUpdate(_ update: ((T) -> Void)) -> Self { 38 | update(cell) 39 | return self 40 | } 41 | 42 | /// cell初始化 43 | /// - Parameter cell: cell泛型 44 | open func cellInitialized(_ cell: T) { 45 | 46 | } 47 | 48 | 49 | /// cell初始化 50 | /// - Parameter cell: cell 51 | override func cellInstanceInitialized(_ cell: UITableViewCell) { 52 | cellInitialized(cell as! T) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/ButtonHeaderFooterFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonHeaderFooterFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/9/25. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol ButtonFormableView: FormableHeaderFooter { 12 | func formButton() -> UIButton 13 | } 14 | 15 | open class ButtonHeaderFooterFormer: BaseHeaderFooterFormer where T: ButtonFormableView { 16 | ///按钮背景色 17 | public var buttonBGColor: UIColor? = .clear 18 | ///按钮标题 19 | public var buttonTitle: String? 20 | ///按钮字体 21 | public var buttonTitleFont: UIFont? 22 | ///按钮标题 默认颜色 23 | public var buttonTitleNorColor: UIColor? 24 | ///按钮标题 按下颜色 25 | public var buttonTitleHigColor: UIColor? 26 | ///按钮 默认图片 27 | public var buttonNorImage: UIImage? 28 | ///按钮 按下图片 29 | public var buttonHigImage: UIImage? 30 | ///按钮 圆角 31 | public var buttonCornerRadius: CGFloat = 4 32 | ///点击回调 33 | fileprivate var buttonClick: (() -> Void)? 34 | 35 | /// 右侧按钮点击 36 | /// - Parameter handler: handler description 37 | /// - Returns: description 38 | @discardableResult public func onButtonClick(_ handler: @escaping (() -> Void)) -> Self { 39 | buttonClick = handler 40 | return self 41 | } 42 | 43 | @objc private dynamic func buttonAction(_ sender: UIButton) { 44 | buttonClick?() 45 | } 46 | 47 | open override func initialized() { 48 | viewHeight = 60 49 | } 50 | 51 | open override func viewInitialized(_ view: T) { 52 | headerFooter.formButton().addTarget(self, action: #selector(buttonAction(_:)), for: .touchUpInside) 53 | } 54 | 55 | open override func update() { 56 | super.update() 57 | 58 | let button = headerFooter.formButton() 59 | button.backgroundColor = buttonBGColor 60 | button.titleLabel?.font = buttonTitleFont 61 | button.setTitle(buttonTitle, for: .normal) 62 | button.setTitleColor(buttonTitleNorColor, for: .normal) 63 | button.setTitleColor(buttonTitleHigColor, for: .highlighted) 64 | button.setImage(buttonNorImage, for: .normal) 65 | button.setImage(buttonHigImage, for: .highlighted) 66 | button.layer.cornerRadius = buttonCornerRadius 67 | button.clipsToBounds = true 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/CustomHeaderFooterFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomHeaderFooterFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// 自定义Form 12 | open class CustomHeaderFooterFormer : BaseHeaderFooterFormer { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/CustomRowFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomRowFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// 自定义Form 12 | public final class CustomRowFormer: BaseRowFormer, Formable { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/DatePickerRowFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCellFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol DatePickerFormableRow: FormableRow { 12 | 13 | func formDatePicker() -> UIDatePicker 14 | } 15 | 16 | open class DatePickerRowFormer: BaseRowFormer, Formable where T: DatePickerFormableRow { 17 | ///初始日期数据 18 | public var date: Date = Date() 19 | ///选择日期后回调 20 | public var onDateChanged: ((Date) -> Void)? 21 | 22 | @discardableResult 23 | public final func onDateChanged(_ handler: @escaping ((Date) -> Void)) -> Self { 24 | onDateChanged = handler 25 | return self 26 | } 27 | 28 | open override func initialized() { 29 | rowHeight = 216 30 | } 31 | 32 | open override func cellInitialized(_ cell: T) { 33 | cell.formDatePicker().addTarget(self, action: #selector(DatePickerRowFormer.dateChanged(datePicker:)), for: .valueChanged) 34 | } 35 | 36 | open override func update() { 37 | super.update() 38 | 39 | cell.selectionStyle = .none 40 | let datePicker = cell.formDatePicker() 41 | datePicker.setDate(date, animated: false) 42 | datePicker.isUserInteractionEnabled = enabled 43 | datePicker.layer.opacity = enabled ? 1 : 0.5 44 | } 45 | 46 | @objc private dynamic func dateChanged(datePicker: UIDatePicker) { 47 | if enabled { 48 | let date = datePicker.date 49 | self.date = date 50 | onDateChanged?(date) 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/LabelHeaderFooterFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LabelHeaderFooterFormer.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// 图文header footer Form协议 12 | public protocol LabelFormableView: FormableHeaderFooter { 13 | func formTitleImageView() -> UIImageView? 14 | func formTitleLabel() -> UILabel 15 | } 16 | /// 图文header footer Form 17 | open class LabelHeaderFooterFormer: BaseHeaderFooterFormer where T: LabelFormableView { 18 | /// HeaderFooter 标题 19 | public var title: String? 20 | /// HeaderFooter 左侧小图片 21 | public var titleImage: UIImage? 22 | 23 | open override func initialized() { 24 | viewHeight = 30 25 | } 26 | 27 | open override func viewInitialized(_ view: T) { 28 | headerFooter.formTitleImageView()?.image = titleImage 29 | } 30 | open override func update() { 31 | super.update() 32 | headerFooter.formTitleLabel().text = title 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/Formers/LabelRowFormer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LabelFormableRow.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// LabelForm 协议 12 | public protocol LabelFormableRow: FormableRow { 13 | 14 | func formTitleLabel() -> UILabel? 15 | func formTitleImageView() -> UIImageView? 16 | func formSubTitleLabel() -> UILabel? 17 | } 18 | 19 | /// LabelForm 20 | open class LabelRowFormer : BaseRowFormer, Formable where T: LabelFormableRow { 21 | ///副标题 22 | public var subTitle: String? 23 | ///不可用时副标题颜色 24 | public var subTitleDisabledColor: UIColor? = .lightGray 25 | ///副标题颜色 26 | public var subTitleColor: UIColor? 27 | 28 | /// LabelForm初始化 29 | open override func initialized() { 30 | rowHeight = 60 31 | } 32 | 33 | /// LabelForm初始化 34 | /// - Parameter cell: cell 泛型 35 | open override func cellInitialized(_ cell: T) { 36 | let titleImageView = cell.formTitleImageView() 37 | titleImageView?.image = titleImage 38 | } 39 | 40 | open override func cellSelected(indexPath: IndexPath) { 41 | super.cellSelected(indexPath: indexPath) 42 | former?.deselect(animated: true) 43 | } 44 | 45 | /// LabelForm数据更新 46 | open override func update() { 47 | super.update() 48 | 49 | let textLabel = cell.formTitleLabel() 50 | let subTitleLabel = cell.formSubTitleLabel() 51 | if let title = title { 52 | textLabel?.text = title 53 | } 54 | 55 | if let attributedTitle = attributedTitle{ 56 | textLabel?.attributedText = attributedTitle 57 | } 58 | subTitleLabel?.text = subTitle 59 | 60 | if enabled { 61 | _ = titleColor.map { textLabel?.textColor = $0 } 62 | _ = subTitleColor.map { subTitleLabel?.textColor = $0 } 63 | titleColor = nil 64 | subTitleColor = nil 65 | } else { 66 | if titleColor == nil { titleColor = textLabel?.textColor ?? .black } 67 | if subTitleColor == nil { subTitleColor = subTitleLabel?.textColor ?? .black } 68 | textLabel?.textColor = titleDisabledColor 69 | subTitleLabel?.textColor = subTitleDisabledColor 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/HeaderFooters/BaseHeaderFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FormHeaderFooterView.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SnapKit 11 | 12 | open class BaseHeaderFooterView: UITableViewHeaderFooterView, FormableHeaderFooter { 13 | 14 | public var backColor : UIColor? { 15 | didSet{ 16 | self.backgroundView?.backgroundColor = backColor 17 | } 18 | } 19 | 20 | open func updateHeaderFooterFormer(_ headerFooterFormer: ViewFormer) { 21 | 22 | } 23 | 24 | required public init?(coder aDecoder: NSCoder) { 25 | super.init(coder: aDecoder) 26 | self.backgroundView = UIView(frame: self.bounds) 27 | self.backgroundView?.backgroundColor = .clear 28 | setup() 29 | } 30 | 31 | override public init(reuseIdentifier: String?) { 32 | super.init(reuseIdentifier: reuseIdentifier) 33 | self.backgroundView = UIView(frame: self.bounds) 34 | self.backgroundView?.backgroundColor = .clear 35 | setup() 36 | } 37 | 38 | open func setup() { 39 | contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/HeaderFooters/ButtonFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonFooterView.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/9/25. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class ButtonFooter: ButtonHeaderFooterFormer { 12 | 13 | } 14 | 15 | open class ButtonFooterView: BaseHeaderFooterView,ButtonFormableView{ 16 | ///获取按钮(可修改属性) 17 | public func formButton() -> UIButton { 18 | return button 19 | } 20 | 21 | weak var button: UIButton! 22 | 23 | 24 | override open func setup() { 25 | super.setup() 26 | 27 | let button = UIButton() 28 | contentView.addSubview(button) 29 | button.snp.makeConstraints { (make) in 30 | make.center.equalToSuperview() 31 | make.height.equalTo(50) 32 | make.width.equalTo(190) 33 | } 34 | self.button = button 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/HeaderFooters/LabelFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FormLabelFooterView.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class LabelFooter: LabelHeaderFooterFormer { 12 | 13 | } 14 | 15 | open class LabelFooterView: BaseHeaderFooterView, LabelFormableView { 16 | 17 | public private(set) weak var titleLabel: UILabel! 18 | public private(set) weak var titleImageView: UIImageView! 19 | 20 | public func formTitleLabel() -> UILabel { 21 | return titleLabel 22 | } 23 | 24 | public func formTitleImageView() -> UIImageView? { 25 | return titleImageView 26 | } 27 | 28 | override open func setup() { 29 | super.setup() 30 | 31 | let titleImageView = UIImageView() 32 | titleImageView.clipsToBounds = true 33 | contentView.addSubview(titleImageView) 34 | self.titleImageView = titleImageView 35 | titleImageView.snp.makeConstraints { (make) in 36 | make.centerY.equalToSuperview() 37 | make.left.equalToSuperview().offset(20) 38 | } 39 | 40 | let titleLabel = UILabel() 41 | titleLabel.numberOfLines = 0 42 | contentView.insertSubview(titleLabel, at: 0) 43 | titleLabel.snp.makeConstraints { (make) in 44 | make.top.bottom.equalToSuperview() 45 | make.left.equalToSuperview().offset(20) 46 | make.right.equalToSuperview().offset(-20) 47 | } 48 | self.titleLabel = titleLabel 49 | } 50 | 51 | open override func updateHeaderFooterFormer(_ headerFooterFormer: ViewFormer) { 52 | 53 | titleLabel.snp.updateConstraints { (make) in 54 | if titleImageView.image == nil{ 55 | make.left.equalToSuperview().offset(20) 56 | }else{ 57 | make.left.equalToSuperview().offset(50) 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Example/Pods/Swift_Form/Sources/SwiftyForm/HeaderFooters/LabelHeaderFooterView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FormLabelHeaderView.swift 3 | // SwiftyForm 4 | // 5 | // Created by iOS on 2020/6/5. 6 | // Copyright © 2020 iOS. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class LabelHeaderFooter: LabelHeaderFooterFormer { 12 | 13 | } 14 | 15 | open class LabelHeaderFooterView: BaseHeaderFooterView, LabelFormableView { 16 | 17 | public private(set) weak var titleLabel: UILabel! 18 | public private(set) weak var titleImageView: UIImageView! 19 | ///标题Label(可修改属性) 20 | public func formTitleLabel() -> UILabel { 21 | return titleLabel 22 | } 23 | ///标题左侧图标(可修改属性) 24 | public func formTitleImageView() -> UIImageView? { 25 | return titleImageView 26 | } 27 | 28 | open override func setup() { 29 | super.setup() 30 | 31 | let titleImageView = UIImageView() 32 | titleImageView.clipsToBounds = true 33 | contentView.addSubview(titleImageView) 34 | titleImageView.snp.makeConstraints { (make) in 35 | make.centerY.equalToSuperview() 36 | make.left.equalToSuperview().offset(20) 37 | } 38 | self.titleImageView = titleImageView 39 | 40 | let titleLabel = UILabel() 41 | titleLabel.numberOfLines = 0 42 | contentView.addSubview(titleLabel) 43 | titleLabel.snp.makeConstraints { (make) in 44 | make.top.bottom.equalToSuperview() 45 | make.left.equalToSuperview().offset(20) 46 | make.right.equalToSuperview().offset(-20) 47 | } 48 | self.titleLabel = titleLabel 49 | } 50 | 51 | open override func updateHeaderFooterFormer(_ headerFooterFormer: ViewFormer) { 52 | 53 | titleLabel.snp.remakeConstraints { (make) in 54 | make.top.bottom.equalToSuperview() 55 | make.right.equalToSuperview().offset(-20) 56 | if titleImageView.image == nil{ 57 | make.left.equalToSuperview().offset(20) 58 | }else{ 59 | make.left.equalTo(titleImageView.snp.right).offset(5) 60 | } 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework 3 | ${BUILT_PRODUCTS_DIR}/SwiftBrick/SwiftBrick.framework 4 | ${BUILT_PRODUCTS_DIR}/SwiftMediator/SwiftMediator.framework 5 | ${BUILT_PRODUCTS_DIR}/SwiftShow/SwiftShow.framework 6 | ${BUILT_PRODUCTS_DIR}/Swift_Form/Swift_Form.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework 2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftBrick.framework 3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftMediator.framework 4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftShow.framework 5 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Swift_Form.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework 3 | ${BUILT_PRODUCTS_DIR}/SwiftBrick/SwiftBrick.framework 4 | ${BUILT_PRODUCTS_DIR}/SwiftMediator/SwiftMediator.framework 5 | ${BUILT_PRODUCTS_DIR}/SwiftShow/SwiftShow.framework 6 | ${BUILT_PRODUCTS_DIR}/Swift_Form/Swift_Form.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework 2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftBrick.framework 3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftMediator.framework 4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftShow.framework 5 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Swift_Form.framework -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftBrick" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftMediator" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftShow" "${PODS_CONFIGURATION_BUILD_DIR}/Swift_Form" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftBrick/SwiftBrick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftMediator/SwiftMediator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftShow/SwiftShow.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swift_Form/Swift_Form.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SnapKit" -framework "SwiftBrick" -framework "SwiftMediator" -framework "SwiftShow" -framework "SwiftUI" -framework "Swift_Form" -framework "UIKit" -framework "WebKit" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Example { 2 | umbrella header "Pods-Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftBrick" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftMediator" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftShow" "${PODS_CONFIGURATION_BUILD_DIR}/Swift_Form" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftBrick/SwiftBrick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftMediator/SwiftMediator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftShow/SwiftShow.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swift_Form/Swift_Form.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SnapKit" -framework "SwiftBrick" -framework "SwiftMediator" -framework "SwiftShow" -framework "SwiftUI" -framework "Swift_Form" -framework "UIKit" -framework "WebKit" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_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 | FMWK 17 | CFBundleShortVersionString 18 | 5.6.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SnapKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SnapKit { 2 | umbrella header "SnapKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/ResourceBundle-SwiftBrick-SwiftBrick-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 2.3.8 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_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 | FMWK 17 | CFBundleShortVersionString 18 | 2.3.8 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftBrick : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftBrick 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SwiftBrickVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SwiftBrickVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftBrick 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SwiftUI" -framework "UIKit" -framework "WebKit" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftBrick 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftBrick { 2 | umbrella header "SwiftBrick-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftBrick/SwiftBrick.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftBrick 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SwiftUI" -framework "UIKit" -framework "WebKit" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftBrick 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_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 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.6 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftMediator : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftMediator 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SwiftMediatorVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SwiftMediatorVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftMediator 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SwiftUI" -framework "UIKit" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftMediator { 2 | umbrella header "SwiftMediator-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftMediator/SwiftMediator.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftMediator 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "SwiftUI" -framework "UIKit" 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 14 | SKIP_INSTALL = YES 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_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 | FMWK 17 | CFBundleShortVersionString 18 | 0.7.6 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftShow : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftShow 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SwiftShowVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SwiftShowVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftShow 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftShow 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 15 | SKIP_INSTALL = YES 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftShow { 2 | umbrella header "SwiftShow-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftShow/SwiftShow.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftShow 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftShow 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 15 | SKIP_INSTALL = YES 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_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 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Swift_Form : NSObject 3 | @end 4 | @implementation PodsDummy_Swift_Form 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Swift_FormVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Swift_FormVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Swift_Form 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" -framework "UIKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Swift_Form 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 15 | SKIP_INSTALL = YES 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form.modulemap: -------------------------------------------------------------------------------- 1 | framework module Swift_Form { 2 | umbrella header "Swift_Form-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Swift_Form/Swift_Form.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Swift_Form 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" -framework "UIKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 11 | PODS_ROOT = ${SRCROOT} 12 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Swift_Form 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 15 | SKIP_INSTALL = YES 16 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 17 | -------------------------------------------------------------------------------- /Example/SwiftMediator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SwiftMediator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SwiftMediator.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SwiftMediator.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/SwiftMediator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2023/5/11. 6 | // 7 | 8 | import UIKit 9 | import SwiftMediator 10 | import SwiftBrick 11 | @main 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | lazy var manager: AppDelegateManager = { 17 | return AppDelegateManager.init(delegates: [AppDe.init(window)]) 18 | }() 19 | 20 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 21 | manager.application(application, didFinishLaunchingWithOptions: launchOptions) 22 | 23 | return true 24 | } 25 | 26 | func applicationWillEnterForeground(_ application: UIApplication) { 27 | print("即将进入前台") 28 | } 29 | // /// 过渡到活动状态 30 | func applicationDidBecomeActive(_ application: UIApplication) { 31 | print("进入前台") 32 | } 33 | // 34 | // /// 即将进入非活动状态,在此期间,App不接收消息或事件 35 | // /// 如:来电话 36 | func applicationWillResignActive(_ application: UIApplication) { 37 | print("即将进入后台") 38 | manager.applicationWillResignActive(application) 39 | } 40 | // /// 已过渡到后台 41 | func applicationDidEnterBackground(_ application: UIApplication) { 42 | print("进入后台") 43 | } 44 | 45 | // MARK: UISceneSession Lifecycle 46 | @available(iOS 13.0, *) 47 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 48 | // Called when a new scene session is being created. 49 | // Use this method to select a configuration to create the new scene with. 50 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 51 | } 52 | @available(iOS 13.0, *) 53 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 54 | // Called when the user discards a scene session. 55 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 56 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 57 | } 58 | 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Example/SwiftMediator/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/SwiftMediator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Example/SwiftMediator/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Example/SwiftMediator/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/SwiftMediator/Demo/DelegateMediator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDe.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2020/1/10. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftMediator 11 | @available(iOS 13.0, *) 12 | class SceneDe: SceneDelegateMediator{ 13 | var window: UIWindow? 14 | init(_ win : UIWindow?) { 15 | window = win 16 | } 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | print("UIScene starts here") 19 | guard let _ = (scene as? UIWindowScene) else { return } 20 | } 21 | 22 | func sceneWillResignActive(_ scene: UIScene) { 23 | print("UIScene is about to enter the background") 24 | } 25 | } 26 | 27 | 28 | class AppDe: AppDelegateMediator{ 29 | var window: UIWindow? 30 | init(_ win : UIWindow?) { 31 | window = win 32 | } 33 | 34 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { 35 | print("UIApplication starts here") 36 | return true 37 | } 38 | 39 | func applicationWillResignActive(_ application: UIApplication) { 40 | print("UIApplication will enter the background here") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/SwiftMediator/Demo/TestClass.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestClass.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2020/1/9. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftShow 11 | class TestClass { 12 | 13 | @objc 14 | class func callMethodReturn(_ name: String)->String{ 15 | print("Class method passing parameters\(name)") 16 | Show.toast("Class method passing parameters:\(name)") 17 | return "Class method return parameter: laile" 18 | } 19 | 20 | @objc 21 | class func callMethodNoReturn(_ name: String){ 22 | print("Class method passing parameters\(name)") 23 | Show.toast("Class method passing parameters:\(name)") 24 | } 25 | 26 | @objc 27 | class func callMethod(){ 28 | Show.toast("Class method call") 29 | } 30 | 31 | @objc 32 | class func callMethodBlock(_ block: @escaping (Int) -> ()){ 33 | block(100) 34 | Show.toast("Instance method passing parameters") 35 | } 36 | 37 | @objc 38 | static func callMethodBlockWithParame(_ name: String, block: @escaping (Int) -> ()){ 39 | print("instance method passing parameters\(name)") 40 | block(100) 41 | Show.toast("Instance method passing parameters") 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Example/SwiftMediator/Demo/TestObjc.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestObjc.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2020/6/17. 6 | // Copyright © 2020 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftShow 11 | class TestObjc: NSObject { 12 | 13 | @objc 14 | func callMethodReturn(_ name: String)->String{ 15 | print("instance method passing parameters\(name)") 16 | Show.toast("Instance method passing parameters:\(name)") 17 | return "Instance method return parameter: back" 18 | } 19 | 20 | @objc 21 | func callMethodBlock(_ block: @escaping (Int) -> ()){ 22 | block(100) 23 | Show.toast("Instance method passing parameters") 24 | } 25 | 26 | @objc 27 | func callMethodBlockWithParame(_ name: String, block: @escaping (Int) -> ()){ 28 | print("instance method passing parameters\(name)") 29 | block(100) 30 | Show.toast("Instance method passing parameters") 31 | } 32 | 33 | @objc 34 | func callMethod(){ 35 | Show.toast("instance method call") 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/SwiftMediator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | UIApplicationSceneManifest 11 | 12 | UIApplicationSupportsMultipleScenes 13 | 14 | UISceneConfigurations 15 | 16 | UIWindowSceneSessionRoleApplication 17 | 18 | 19 | UISceneConfigurationName 20 | Default Configuration 21 | UISceneDelegateClassName 22 | $(PRODUCT_MODULE_NAME).SceneDelegate 23 | UISceneStoryboardFile 24 | Main 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Example/SwiftMediator/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2023/5/11. 6 | // 7 | 8 | import UIKit 9 | import SwiftMediator 10 | @available(iOS 13.0, *) 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | lazy var manager: SceneDelegateManager = { 16 | return SceneDelegateManager.init(delegates: [SceneDe.init(window)]) 17 | }() 18 | 19 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 20 | 21 | manager.scene(scene, willConnectTo: session, options: connectionOptions) 22 | guard let _ = (scene as? UIWindowScene) else { return } 23 | 24 | // 设置按钮颜色 25 | UINavigationBar.appearance().tintColor = .red 26 | } 27 | 28 | func sceneDidDisconnect(_ scene: UIScene) { 29 | 30 | } 31 | 32 | func sceneDidBecomeActive(_ scene: UIScene) { 33 | 34 | print("进入前台") 35 | } 36 | 37 | func sceneWillResignActive(_ scene: UIScene) { 38 | 39 | print("即将进入后台") 40 | manager.sceneWillResignActive(scene) 41 | } 42 | 43 | func sceneWillEnterForeground(_ scene: UIScene) { 44 | 45 | print("即将进入前台") 46 | } 47 | 48 | func sceneDidEnterBackground(_ scene: UIScene) { 49 | 50 | print("进入后台") 51 | } 52 | 53 | } 54 | 55 | -------------------------------------------------------------------------------- /Example/pod_install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 获取工程根目录 4 | fadir() 5 | { 6 | local this_dir=`pwd` 7 | local child_dir="$1" 8 | dirname "$child_dir" 9 | cd $this_dir 10 | } 11 | CUR_DIR=$(cd `dirname $0` && pwd -P ) 12 | 13 | cd $CUR_DIR 14 | 15 | echo "当前文件路径 $CUR_DIR" 16 | 17 | pod install 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Example/pod_update: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 获取工程根目录 4 | fadir() 5 | { 6 | local this_dir=`pwd` 7 | local child_dir="$1" 8 | dirname "$child_dir" 9 | cd $this_dir 10 | } 11 | CUR_DIR=$(cd `dirname $0` && pwd -P ) 12 | 13 | cd $CUR_DIR 14 | 15 | echo "当前文件路径 $CUR_DIR" 16 | 17 | pod update 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Example/pod_update-no-repo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 获取工程根目录 4 | fadir() 5 | { 6 | local this_dir=`pwd` 7 | local child_dir="$1" 8 | dirname "$child_dir" 9 | cd $this_dir 10 | } 11 | CUR_DIR=$(cd `dirname $0` && pwd -P ) 12 | 13 | cd $CUR_DIR 14 | 15 | echo "当前文件路径 $CUR_DIR" 16 | 17 | pod update --verbose --no-repo-update 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Image/1.png -------------------------------------------------------------------------------- /Image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Image/2.png -------------------------------------------------------------------------------- /Image/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.2 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "image", 7 | products: [], 8 | targets: [] 9 | ) 10 | -------------------------------------------------------------------------------- /Image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjinhu/SwiftMediator/87d1c00c2c8b8511812047aa71a332a04b09c733/Image/logo.png -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.2 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: "SwiftMediator", 8 | platforms: [ 9 | .iOS(.v11) 10 | ], 11 | products: [ 12 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 13 | .library( 14 | name: "SwiftMediator", 15 | targets: ["SwiftMediator"]) 16 | ], 17 | dependencies: [ 18 | // Dependencies declare other packages that this package depends on. 19 | // .package(url: /* package url */, from: "1.0.0"), 20 | ], 21 | targets: [ 22 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 23 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 24 | .target( 25 | name: "SwiftMediator", 26 | dependencies: []), 27 | ], 28 | swiftLanguageVersions: [ 29 | .v5 30 | ] 31 | ) 32 | -------------------------------------------------------------------------------- /Sources/SwiftMediator/Target-Action/Property++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftMediator+Property.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2023/5/25. 6 | // 7 | 8 | import Foundation 9 | //MARK:--Inspect property--Swift 10 | extension SwiftMediator { 11 | /// Determine whether the attribute exists 12 | /// - Parameters: 13 | /// - name: attribute name 14 | /// - obj: target object 15 | func getTypeOfProperty (_ name: String, obj: AnyObject) -> Bool{ 16 | // Note: obj is an instance (object), if it is a class, its properties cannot be obtained 17 | let morror = Mirror(reflecting: obj) 18 | let superMorror = Mirror(reflecting: obj).superclassMirror 19 | 20 | for (key,_) in morror.children { 21 | if key == name { 22 | return true 23 | } 24 | } 25 | 26 | guard let superM = superMorror else { 27 | return false 28 | } 29 | 30 | for (key,_) in superM.children { 31 | if key == name { 32 | return true 33 | } 34 | } 35 | return false 36 | } 37 | 38 | /// KVC assigns values to attributes 39 | /// - Parameters: 40 | /// - obj: target object 41 | /// - paramsDic: The parameter dictionary Key must correspond to the attribute name 42 | func setObjectParams(obj: AnyObject, paramsDic: [String: Any]?) { 43 | if let paramsDic = paramsDic { 44 | for (key,value) in paramsDic { 45 | if getTypeOfProperty(key, obj: obj){ 46 | obj.setValue(value, forKey: key) 47 | } 48 | } 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /Sources/SwiftMediator/Target-Action/SwiftMediator.swift: -------------------------------------------------------------------------------- 1 | //MARK:--initialize object--Swift// 2 | // SwiftMediator.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 27/11/2019. 6 | // Copyright © 2019 狄烨 . All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | public class SwiftMediator { 12 | public static let shared = SwiftMediator() 13 | private init(){ } 14 | } 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Sources/SwiftMediator/Target-Action/SwiftUI++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUI++.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2023/5/25. 6 | // 7 | 8 | import SwiftUI 9 | import UIKit 10 | //MARK:--route jump--code jump SwiftUI 11 | @available(iOS 13.0, *) 12 | extension SwiftMediator { 13 | 14 | /// push SwiftUI View 15 | /// - Parameters: 16 | /// - view: View 17 | /// - title: title 18 | public func push(_ view: V, title: String? = nil) { 19 | pushToView(view: view, title: title) 20 | } 21 | 22 | /// The current SwiftUI View pops to the specified title 23 | /// - Parameter navigationBarTitle 24 | /// - Returns: Bool 25 | @discardableResult 26 | public func popToTitle(_ navigationBarTitle: String) -> Bool { 27 | return popTo(navigationBarTitle) 28 | } 29 | 30 | /// Set the current View to Navigation Root 31 | /// - Parameter view: View 32 | fileprivate func pushToView(view: V, title: String? = nil) { 33 | guard let navigationController = UIViewController.currentNavigationController() else { 34 | return 35 | } 36 | 37 | let targetVC = view.getVC() 38 | 39 | if let title { 40 | targetVC.title = title 41 | } 42 | 43 | if !navigationController.children.contains(targetVC) { 44 | navigationController.pushViewController(targetVC, animated: true) 45 | } 46 | } 47 | 48 | } 49 | 50 | @available(iOS 13.0, *) 51 | public extension View { 52 | func getVC() -> UIViewController { 53 | return UIHostingController(rootView: self) 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Sources/SwiftMediator/Target-Action/URL++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftMediator+Url.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2023/5/25. 6 | // 7 | 8 | import Foundation 9 | //MARK:--URL routing jump--Swift 10 | extension SwiftMediator { 11 | /// URL routing jump Jump to distinguish Push, present, fullScreen 12 | /// - Parameter urlString: Call native page function scheme ://push/moduleName/vcName?quereyParams 13 | /// - Note here that the string encoded into the URL cannot contain special characters. URL encoding is required. It does not support the queryParams parameter with url and query in the url (if you want the URL to have a token, intercept it and use the routing code jump) 14 | public func openUrl(_ urlString: String?) { 15 | 16 | guard let str = urlString, let url = URL(string: str) else { return } 17 | let path = url.path as String 18 | let startIndex = path.index(path.startIndex, offsetBy: 1) 19 | let pathArray = path.suffix(from: startIndex).components(separatedBy: "/") 20 | guard pathArray.count == 2 , let first = pathArray.first , let last = pathArray.last else { return } 21 | 22 | switch url.host { 23 | case "push": 24 | push(last, moduleName: first, paramsDic: url.parameters) 25 | case "fullScreen": 26 | present(last, moduleName: first, paramsDic: url.parameters) 27 | default: 28 | if #available(iOS 13.0, *) { 29 | present(last, moduleName: first, paramsDic: url.parameters, modelStyle: .automatic) 30 | } else { 31 | present(last, moduleName: first, paramsDic: url.parameters) 32 | } 33 | } 34 | } 35 | } 36 | 37 | public extension URL { 38 | 39 | var parameters: [String: Any]? { 40 | guard let components = URLComponents(url: self, resolvingAgainstBaseURL: true), 41 | let queryItems = components.queryItems else { return nil } 42 | return queryItems.reduce(into: [String: Any]()) { (result, item) in 43 | result[item.name] = item.value 44 | } 45 | } 46 | 47 | } 48 | //MARK:--URL codec 49 | public extension String { 50 | //Encode the original url into a valid url 51 | func urlEncoded() -> String { 52 | self.addingPercentEncoding(withAllowedCharacters:.urlQueryAllowed) ?? "" 53 | } 54 | 55 | //convert the encoded url back to the original url 56 | func urlDecoded() -> String { 57 | self.removingPercentEncoding ?? "" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Sources/SwiftMediator/Tools/Window++.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow+.swift 3 | // SwiftMediator 4 | // 5 | // Created by iOS on 2023/5/25. 6 | // 7 | 8 | import UIKit 9 | import Foundation 10 | 11 | extension UIWindow { 12 | /// get window 13 | public static var keyWindow: UIWindow? { 14 | if #available(iOS 13.0, *) { 15 | return UIApplication.shared.connectedScenes 16 | .sorted { $0.activationState.sortPriority < $1.activationState.sortPriority } 17 | .compactMap { $0 as? UIWindowScene } 18 | .compactMap { $0.windows.first { $0.isKeyWindow } } 19 | .first 20 | } else { 21 | return UIApplication.shared.keyWindow 22 | } 23 | } 24 | } 25 | 26 | @available(iOS 13.0, *) 27 | extension UIWindowScene { 28 | /// Get UIWindowScene 29 | public static var currentWindowSence: UIWindowScene? { 30 | for scene in UIApplication.shared.connectedScenes{ 31 | if scene.activationState == .foregroundActive{ 32 | return scene as? UIWindowScene 33 | } 34 | } 35 | return nil 36 | } 37 | } 38 | 39 | @available(iOS 13.0, *) 40 | private extension UIScene.ActivationState { 41 | var sortPriority: Int { 42 | switch self { 43 | case .foregroundActive: return 1 44 | case .foregroundInactive: return 2 45 | case .background: return 3 46 | case .unattached: return 4 47 | @unknown default: return 5 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /SwiftMediator.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = 'SwiftMediator' 4 | s.version = '1.3.1' 5 | s.summary = '路由.' 6 | 7 | s.description = <<-DESC 8 | 工具. 9 | DESC 10 | 11 | s.homepage = 'https://github.com/jackiehu/' 12 | s.license = { :type => 'MIT', :file => 'LICENSE' } 13 | s.author = { 'HU' => '814030966@qq.com' } 14 | s.source = { :git => 'https://github.com/jackiehu/SwiftMediator.git', :tag => s.version.to_s } 15 | 16 | s.ios.deployment_target = "11.0" 17 | s.swift_versions = ['5.0','5.1','5.2'] 18 | s.requires_arc = true 19 | 20 | s.frameworks = "UIKit","Foundation","SwiftUI" #支持的框架 21 | 22 | s.subspec 'Target-Action' do |ss| 23 | ss.dependency 'SwiftMediator/Delegate' 24 | ss.dependency 'SwiftMediator/Tools' 25 | ss.source_files = 'Sources/SwiftMediator/Target-Action/**/*' 26 | end 27 | 28 | s.subspec 'Delegate' do |ss| 29 | ss.source_files = 'Sources/SwiftMediator/Delegate/**/*' 30 | end 31 | 32 | s.subspec 'Tools' do |ss| 33 | ss.source_files = 'Sources/SwiftMediator/Tools/**/*' 34 | end 35 | 36 | end 37 | -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | lane :release_pod do |options| 2 | 3 | target_version = options[:t] 4 | 5 | target_project = options[:p] 6 | 7 | target_repo = options[:r] 8 | 9 | update_message = options[:m] 10 | 11 | if_pod = options[:i] 12 | 13 | spec_path = "#{target_project}.podspec" 14 | 15 | # git pull 16 | git_pull(only_tags: true) 17 | 18 | # 确认是 master 分支 19 | ensure_git_branch 20 | # 确认是 main 分支 21 | # ensure_git_branch( branch: 'main' ) 22 | 23 | if if_pod 24 | # 修改 spec 为即将发布的版本 25 | version_bump_podspec(path: spec_path, version_number: target_version) 26 | end 27 | 28 | # 将本地代码加入本地仓库里 29 | git_add(path: '.') 30 | 31 | # 提交修改到本地仓库 32 | git_commit(path: '.', message: update_message) 33 | 34 | if if_pod 35 | # 在push之前, 查看spec是否配置有问题,验证 spec 文件 36 | pod_lib_lint(verbose: true, allow_warnings: true) 37 | # 私有仓需要添加验证仓Sources 38 | # pod_lib_lint(verbose: true, allow_warnings: true, sources: 'https://github.com/CocoaPods/Specs.git,https://codeup.aliyun.com/6279dbf7487c500c27f5744e/group1/ModuleSpace.git') 39 | end 40 | 41 | # 推送master分支的代码到名称为origin的远程仓库 42 | push_to_git_remote 43 | 44 | # 检查对于 tag 是否已经存在 45 | if git_tag_exists(tag: target_version) 46 | # 删除对应 tag 47 | remove_git_tag(tag: target_version) 48 | end 49 | 50 | # 添加 tag 51 | add_git_tag(tag: target_version) 52 | 53 | # 提交 tag 54 | push_git_tags 55 | 56 | if if_pod 57 | # # pod trunk push 'spec_path' 58 | # pod_push(path: spec_path, allow_warnings: true,verbose: true) 59 | # 检查是否传了 repo 参数 60 | if target_repo 61 | # pod repo push 'target_repo' 'spec_path' 62 | 63 | pod_push(path: spec_path, repo: target_repo, allow_warnings: true, verbose: true) 64 | 65 | else 66 | # pod trunk push 'spec_path' 67 | 68 | pod_push(path: spec_path, allow_warnings: true, verbose: true) 69 | 70 | end 71 | end 72 | end -------------------------------------------------------------------------------- /fastlane/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.2 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "fastlane", 7 | products: [], 8 | targets: [] 9 | ) 10 | -------------------------------------------------------------------------------- /fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ---- 3 | 4 | # Installation 5 | 6 | Make sure you have the latest version of the Xcode command line tools installed: 7 | 8 | ```sh 9 | xcode-select --install 10 | ``` 11 | 12 | For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) 13 | 14 | # Available Actions 15 | 16 | ### release_pod 17 | 18 | ```sh 19 | [bundle exec] fastlane release_pod 20 | ``` 21 | 22 | 23 | 24 | ---- 25 | 26 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. 27 | 28 | More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). 29 | 30 | The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 31 | -------------------------------------------------------------------------------- /fastlane/fastlane_pod: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 计时 4 | SECONDS=0 5 | # 获取工程根目录 6 | 7 | fadir() 8 | { 9 | local this_dir=`pwd` 10 | local child_dir="$1" 11 | dirname "$child_dir" 12 | cd $this_dir 13 | } 14 | CUR_DIR=$(cd `dirname $0` && pwd -P ) 15 | echo "当前文件路径 $CUR_DIR" 16 | cd $CUR_DIR 17 | cd ../ 18 | 19 | echo " 20 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 " 21 | echo " 22 | 请选择要发布的podspec序号:" 23 | 24 | echo " 25 | (0) 退出 26 | " 27 | 28 | #查找文件 29 | a=1 30 | list=`find . -type f -name "*.podspec"` 31 | for i in $list 32 | do 33 | echo "($a) $i 34 | " 35 | array[$a]=$i 36 | a=$(($a+1)) 37 | done 38 | echo " 39 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 " 40 | read input 41 | 42 | case $input in 43 | 44 | [1-9]) 45 | # 处理文件名 46 | name1=${array[$input]} 47 | # echo "111$name1" 48 | # 截取掉/左边的 49 | name2=${name1#*/} 50 | # echo "222$name2" 51 | # 截取掉。后边的 52 | podspec=${name2%.*} 53 | # echo "333$podspec" 54 | 55 | echo " 56 | 🚀 已经选择仓库名称为:$podspec" 57 | 58 | read -p " 59 | 🚀 请输入版本号: " user_tags 60 | 61 | echo " 62 | 🚀 版本号: V $user_tags " 63 | 64 | 65 | read -p " 66 | 🚀 请输入更新内容(注意不要用空格): " update_message 67 | 68 | echo " 69 | 🚀 更新内容: $update_message " 70 | 71 | ;; 72 | 0) 73 | exit 74 | esac 75 | 76 | 77 | echo " 78 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉" 79 | 80 | echo " 81 | 是否发布pod到私有仓库?:" 82 | 83 | echo " 84 | (0) 不是 85 | " 86 | #查找文件 87 | b=1 88 | listRepo=`ls ~/.cocoapods/repos` 89 | for i in $listRepo 90 | do 91 | echo "($b) $i 92 | " 93 | arrayRepo[$b]=$i 94 | b=$(($b+1)) 95 | done 96 | echo "🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 97 | " 98 | read input 99 | 100 | case $input in 101 | 102 | [1-99]) 103 | 104 | repo=${arrayRepo[$input]} 105 | echo " 106 | 🚀 已经选择Repo名称为:$repo 107 | " 108 | 109 | echo " 110 | 🚀 即将发布 V $user_tags 版本的 $podspec 到 $repo, 更新: $update_message 111 | " 112 | fastlane release_pod t:$user_tags p:$podspec r:$repo m:$update_message i:true 113 | ;; 114 | 115 | 0) 116 | 117 | echo " 118 | 🚀 即将发布 V $user_tags 版本的 $podspec, 更新: $update_message 119 | " 120 | fastlane release_pod t:$user_tags p:$podspec m:$update_message i:true 121 | ;; 122 | esac 123 | 124 | echo "🚀 总用时: ${SECONDS}s" 125 | exit 126 | 127 | 128 | -------------------------------------------------------------------------------- /fastlane/fastlane_tag: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 计时 4 | SECONDS=0 5 | # 获取工程根目录 6 | 7 | fadir() 8 | { 9 | local this_dir=`pwd` 10 | local child_dir="$1" 11 | dirname "$child_dir" 12 | cd $this_dir 13 | } 14 | CUR_DIR=$(cd `dirname $0` && pwd -P ) 15 | echo "当前文件路径 $CUR_DIR" 16 | cd $CUR_DIR 17 | cd ../ 18 | 19 | echo " 20 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 " 21 | 22 | read -p " 23 | 🚀 请输入版本号: " user_tags 24 | 25 | echo " 26 | 🚀 版本号: V $user_tags " 27 | 28 | 29 | read -p " 30 | 🚀 请输入更新内容(注意不要用空格): " update_message 31 | 32 | echo " 33 | 🚀 更新内容: $update_message " 34 | 35 | echo " 36 | 🚀 即将发布 V $user_tags 版本的 $podspec, 更新: $update_message 37 | " 38 | fastlane release_pod t:$user_tags p:$podspec m:$update_message i:false 39 | 40 | echo "🚀 总用时: ${SECONDS}s" 41 | exit 42 | 43 | 44 | --------------------------------------------------------------------------------