├── .gitignore
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── Example
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Local Podspecs
│ │ └── Swift_Form.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
│ ├── SwiftyAttributes
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── SwiftyAttributes
│ │ │ └── Sources
│ │ │ ├── common
│ │ │ ├── Attribute+Sequence.swift
│ │ │ ├── Attribute.swift
│ │ │ ├── Ligatures.swift
│ │ │ ├── NSAttributedString+SwiftyAttributes.swift
│ │ │ ├── NSMutableAttributedString+SwiftyAttributes.swift
│ │ │ ├── NSString+SwiftyAttributes.swift
│ │ │ ├── Operators.swift
│ │ │ ├── String+SwiftyAttributes.swift
│ │ │ ├── SwiftyAttributedStringBuilder.swift
│ │ │ ├── TextEffect.swift
│ │ │ ├── VerticalGlyphForm.swift
│ │ │ └── WritingDirection.swift
│ │ │ └── iOS_tvOS
│ │ │ └── UIKit+SwiftyAttributes.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
│ │ ├── 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
│ │ └── SwiftyAttributes
│ │ ├── SwiftyAttributes-Info.plist
│ │ ├── SwiftyAttributes-dummy.m
│ │ ├── SwiftyAttributes-prefix.pch
│ │ ├── SwiftyAttributes-umbrella.h
│ │ ├── SwiftyAttributes.debug.xcconfig
│ │ ├── SwiftyAttributes.modulemap
│ │ └── SwiftyAttributes.release.xcconfig
├── Swift_Form.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Example.xcscheme
├── Swift_Form.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Swift_Form
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── FormViewController.swift
│ ├── Info.plist
│ └── SceneDelegate.swift
├── pod_install
├── pod_update
└── pod_update-no-repo
├── Image
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
└── logo.png
├── LICENSE
├── Package.resolved
├── Package.swift
├── 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
├── Swift_Form.podspec
├── fastlane
├── Fastfile
├── README.md
├── actions
│ └── remove_git_tag.rb
└── report.xml
├── fastlane_pod
├── pod_lib_create
└── swift_package_init
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 |
28 | ## App packaging
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | # Package.resolved
43 | # *.xcodeproj
44 | #
45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46 | # hence it is not needed unless you have added a package configuration file to your project
47 | # .swiftpm
48 |
49 | .build/
50 |
51 | # CocoaPods
52 | #
53 | # We recommend against adding the Pods directory to your .gitignore. However
54 | # you should judge for yourself, the pros and cons are mentioned at:
55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56 | #
57 | # Pods/
58 | #
59 | # Add this line if you want to avoid checking in source code from the Xcode workspace
60 | # *.xcworkspace
61 |
62 | # Carthage
63 | #
64 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
65 | # Carthage/Checkouts
66 |
67 | Carthage/Build/
68 |
69 | # Accio dependency management
70 | Dependencies/
71 | .accio/
72 |
73 | # fastlane
74 | #
75 | # It is recommended to not store the screenshots in the git repo.
76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed.
77 | # For more information about the recommended setup visit:
78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
79 |
80 |
81 | # Code Injection
82 | #
83 | # After new code Injection tools there's a generated folder /iOSInjectionProject
84 | # https://github.com/johnno1962/injectionforxcode
85 |
86 | iOSInjectionProject/
87 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | use_frameworks!
2 |
3 | platform :ios, '11.0'
4 |
5 | target 'Example' do
6 | pod 'Swift_Form', :path => '../'
7 |
8 | pod 'SwiftBrick'
9 | pod 'SwiftyAttributes'
10 | end
11 |
--------------------------------------------------------------------------------
/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 | - SwiftyAttributes (5.3.0)
28 |
29 | DEPENDENCIES:
30 | - Swift_Form (from `../`)
31 | - SwiftBrick
32 | - SwiftyAttributes
33 |
34 | SPEC REPOS:
35 | trunk:
36 | - SnapKit
37 | - SwiftBrick
38 | - SwiftyAttributes
39 |
40 | EXTERNAL SOURCES:
41 | Swift_Form:
42 | :path: "../"
43 |
44 | SPEC CHECKSUMS:
45 | SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
46 | Swift_Form: 2d4a3318f33540707a1173ee857233cd39acd961
47 | SwiftBrick: 05cf4fee475bd133db2b5e7f348e75025d339534
48 | SwiftyAttributes: 6d7386e90ac611b6acac8b59e38f34bfa4621c80
49 |
50 | PODFILE CHECKSUM: 3287016a6d42bc126b3d19a8cd06dbff8ebad86b
51 |
52 | COCOAPODS: 1.12.1
53 |
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/Swift_Form.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Swift_Form",
3 | "version": "1.1.0",
4 | "summary": "A short description of SwiftyForm.",
5 | "description": "form",
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/SwiftyForm.git",
16 | "tag": "1.1.0"
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": "UIKit",
28 | "dependencies": {
29 | "SnapKit": [
30 |
31 | ]
32 | },
33 | "source_files": "Sources/**/*",
34 | "swift_version": "5.2"
35 | }
36 |
--------------------------------------------------------------------------------
/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 | - SwiftyAttributes (5.3.0)
28 |
29 | DEPENDENCIES:
30 | - Swift_Form (from `../`)
31 | - SwiftBrick
32 | - SwiftyAttributes
33 |
34 | SPEC REPOS:
35 | trunk:
36 | - SnapKit
37 | - SwiftBrick
38 | - SwiftyAttributes
39 |
40 | EXTERNAL SOURCES:
41 | Swift_Form:
42 | :path: "../"
43 |
44 | SPEC CHECKSUMS:
45 | SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
46 | Swift_Form: 2d4a3318f33540707a1173ee857233cd39acd961
47 | SwiftBrick: 05cf4fee475bd133db2b5e7f348e75025d339534
48 | SwiftyAttributes: 6d7386e90ac611b6acac8b59e38f34bfa4621c80
49 |
50 | PODFILE CHECKSUM: 3287016a6d42bc126b3d19a8cd06dbff8ebad86b
51 |
52 | COCOAPODS: 1.12.1
53 |
--------------------------------------------------------------------------------
/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/ConstraintPriorityTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public protocol ConstraintPriorityTarget {
32 |
33 | var constraintPriorityTargetValue: Float { get }
34 |
35 | }
36 |
37 | extension Int: ConstraintPriorityTarget {
38 |
39 | public var constraintPriorityTargetValue: Float {
40 | return Float(self)
41 | }
42 |
43 | }
44 |
45 | extension UInt: ConstraintPriorityTarget {
46 |
47 | public var constraintPriorityTargetValue: Float {
48 | return Float(self)
49 | }
50 |
51 | }
52 |
53 | extension Float: ConstraintPriorityTarget {
54 |
55 | public var constraintPriorityTargetValue: Float {
56 | return self
57 | }
58 |
59 | }
60 |
61 | extension Double: ConstraintPriorityTarget {
62 |
63 | public var constraintPriorityTargetValue: Float {
64 | return Float(self)
65 | }
66 |
67 | }
68 |
69 | extension CGFloat: ConstraintPriorityTarget {
70 |
71 | public var constraintPriorityTargetValue: Float {
72 | return Float(self)
73 | }
74 |
75 | }
76 |
77 | #if os(iOS) || os(tvOS)
78 | extension UILayoutPriority: ConstraintPriorityTarget {
79 |
80 | public var constraintPriorityTargetValue: Float {
81 | return self.rawValue
82 | }
83 |
84 | }
85 | #endif
86 |
--------------------------------------------------------------------------------
/Example/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/LayoutConstraint.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SnapKit
3 | //
4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 |
24 | #if os(iOS) || os(tvOS)
25 | import UIKit
26 | #else
27 | import AppKit
28 | #endif
29 |
30 |
31 | public class LayoutConstraint : NSLayoutConstraint {
32 |
33 | public var label: String? {
34 | get {
35 | return self.identifier
36 | }
37 | set {
38 | self.identifier = newValue
39 | }
40 | }
41 |
42 | internal weak var constraint: Constraint? = nil
43 |
44 | }
45 |
46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool {
47 | // If firstItem or secondItem on either constraint has a dangling pointer
48 | // this comparison can cause a crash. The solution for this is to ensure
49 | // your layout code hold strong references to things like Views, LayoutGuides
50 | // and LayoutAnchors as SnapKit will not keep strong references to any of these.
51 | guard lhs.firstAttribute == rhs.firstAttribute &&
52 | lhs.secondAttribute == rhs.secondAttribute &&
53 | lhs.relation == rhs.relation &&
54 | lhs.priority == rhs.priority &&
55 | lhs.multiplier == rhs.multiplier &&
56 | lhs.secondItem === rhs.secondItem &&
57 | lhs.firstItem === rhs.firstItem else {
58 | return false
59 | }
60 | return true
61 | }
62 |
--------------------------------------------------------------------------------
/Example/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/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/Util/Version.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Version.swift
3 | // SwiftBrick
4 | //
5 | // Created by iOS on 2021/3/25.
6 | // Copyright © 2021 狄烨 . All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | // MARK: ===================================工具类:iOS系统版本号对比=========================================
12 | public struct Version {
13 |
14 | public let major: Int
15 | public let minor: Int
16 | public let patch: Int
17 |
18 | /// 默认初始化,当前系统的iOS版本号
19 | public init() {
20 | major = ProcessInfo.processInfo.operatingSystemVersion.majorVersion
21 | minor = ProcessInfo.processInfo.operatingSystemVersion.minorVersion
22 | patch = ProcessInfo.processInfo.operatingSystemVersion.patchVersion
23 | }
24 |
25 | /// 使用自定义的版本号初始化
26 | /// - Parameters:
27 | /// - major: 版本号
28 | /// - minor: 版本号
29 | /// - patch: 版本号
30 | public init(_ major: Int, _ minor: Int, _ patch: Int) {
31 | self.major = major
32 | self.minor = minor
33 | self.patch = patch
34 | }
35 | }
36 |
37 | extension Version: Comparable {
38 |
39 | fileprivate static func compare(lhs: T, rhs: T) -> ComparisonResult {
40 | if lhs < rhs {
41 | return .orderedAscending
42 | } else if lhs > rhs {
43 | return .orderedDescending
44 | } else {
45 | return .orderedSame
46 | }
47 | }
48 |
49 | /// 系统版本号比对
50 | /// - Parameters:
51 | /// - lhs: 左
52 | /// - rhs: 右
53 | /// - Returns: true/false
54 | public static func == (lhs: Version, rhs: Version) -> Bool {
55 | return lhs.major == rhs.major && lhs.minor == rhs.minor && lhs.patch == rhs.patch
56 | }
57 |
58 | /// 系统版本号比对
59 | /// - Parameters:
60 | /// - lhs: 左
61 | /// - rhs: 右
62 | /// - Returns: true/false
63 | public static func < (lhs: Version, rhs: Version) -> Bool {
64 | let majorComparison = Version.compare(lhs: lhs.major, rhs: rhs.major)
65 | if majorComparison != .orderedSame {
66 | return majorComparison == .orderedAscending
67 | }
68 |
69 | let minorComparison = Version.compare(lhs: lhs.minor, rhs: rhs.minor)
70 | if minorComparison != .orderedSame {
71 | return minorComparison == .orderedAscending
72 | }
73 |
74 | let patchComparison = Version.compare(lhs: lhs.patch, rhs: rhs.patch)
75 | if patchComparison != .orderedSame {
76 | return patchComparison == .orderedAscending
77 | }
78 |
79 | return false
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/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/SwiftyAttributes/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Eddie Kaiger
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/Attribute+Sequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AttributeConversions.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Eddie Kaiger on 11/23/16.
6 | // Copyright © 2016 Eddie Kaiger. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | An extension on dictionaries that allows us to convert a Foundation-based dictionary of attributes to an array of `Attribute`s.
13 | */
14 |
15 | extension Dictionary where Key == NSAttributedString.Key {
16 |
17 | /// Returns an array of `Attribute`s converted from the dictionary of attributes. Use this whenever you want to convert [NSAttributeStringKey: Any] to [Attribute].
18 | public var swiftyAttributes: [Attribute] {
19 | return map(Attribute.init)
20 | }
21 |
22 | }
23 |
24 | extension Sequence where Iterator.Element == Attribute {
25 |
26 | /// Returns the attribute dictionary required by Foundation's API for attributed strings. Use this whenever you need to convert [Attribute] to [String: Any].
27 | public var foundationAttributes: [NSAttributedString.Key: Any] {
28 | return reduce([NSAttributedString.Key: Any]()) { dictionary, attribute in
29 | var dict = dictionary
30 | dict[attribute.keyName] = attribute.foundationValue
31 | return dict
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/Ligatures.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Ligatures.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Eddie Kaiger on 10/5/16.
6 | // Copyright © 2016 Eddie Kaiger. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | Ligatures cause specific character combinations to be rendered using a single custom glyph that corresponds to those characters.
13 | */
14 | public enum Ligatures: Int {
15 |
16 | /// Correspond to no ligatures.
17 | case none
18 |
19 | /// Corresponds to the use of the default ligatures.
20 | case `default`
21 | }
22 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/NSString+SwiftyAttributes.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+SwiftyAttributes.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Roman Podymov on 26/05/19.
6 | // Copyright © 2019 Roman Podymov. All rights reserved.
7 | //
8 |
9 | #if os(macOS)
10 | import AppKit
11 | public typealias Point = NSPoint
12 | public typealias Size = NSSize
13 | public typealias Rect = NSRect
14 | public typealias DrawingOptions = NSString.DrawingOptions
15 | #else
16 | import UIKit
17 | public typealias Point = CGPoint
18 | public typealias Size = CGSize
19 | public typealias Rect = CGRect
20 | public typealias DrawingOptions = NSStringDrawingOptions
21 | #endif
22 |
23 | public typealias DrawingContext = NSStringDrawingContext
24 |
25 | extension NSString {
26 |
27 | /**
28 | Get string size with the specified attributes.
29 |
30 | - parameter attrs: The attributes to use.
31 | */
32 | public func swiftySize(withSwiftyAttributes attrs: [Attribute]? = nil) -> Size {
33 | return size(withAttributes: attrs?.foundationAttributes)
34 | }
35 |
36 | /**
37 | Get string bounding rectangle with the specified attributes.
38 |
39 | - parameter size: Size of bounding rectangle.
40 | - parameter options: Aditional options.
41 | - parameter swiftyAttributes: The attributes to use.
42 | - parameter context: Drawing context.
43 | */
44 | public func swiftyBoundingRect(with size: Size, options: DrawingOptions = [], swiftyAttributes: [Attribute]? = nil, context: DrawingContext?) -> Rect {
45 | return boundingRect(with: size, options: options, attributes: swiftyAttributes?.foundationAttributes, context: context)
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/Operators.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Operators.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Eddie Kaiger on 10/25/16.
6 | // Copyright © 2016 Eddie Kaiger. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | Overloaded addition operator for attributed strings. Creates a concatenated NSAttributedString.
13 | */
14 | public func + (lhs: NSAttributedString, rhs: NSAttributedString) -> NSMutableAttributedString {
15 | let combinedString = lhs.mutableCopy() as! NSMutableAttributedString
16 | combinedString.append(rhs)
17 | return combinedString
18 | }
19 |
20 | /**
21 | Addition and assign operator. Creates a concatenated string and assigns it to the left value.
22 | */
23 | public func += (lhs: inout NSAttributedString, rhs: NSAttributedString) {
24 | lhs = lhs + rhs
25 | }
26 |
27 | public func += (lhs: inout NSMutableAttributedString, rhs: NSAttributedString) {
28 | lhs = lhs + rhs
29 | }
30 |
31 | public func += (lhs: inout NSAttributedString, rhs: NSMutableAttributedString) {
32 | lhs = lhs + rhs
33 | }
34 |
35 | public func += (lhs: inout NSMutableAttributedString, rhs: NSMutableAttributedString) {
36 | lhs = lhs + rhs
37 | }
38 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/SwiftyAttributedStringBuilder.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyAttributedStringBuilder.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Roman Podymov on 09/09/21.
6 | // Copyright © 2021 Roman Podymov. All rights reserved.
7 | //
8 |
9 | #if swift(>=5.4)
10 | import Foundation
11 |
12 | public protocol AttributesProvider {
13 | var attributes: [Attribute] { get }
14 | }
15 |
16 | extension Attribute: AttributesProvider {
17 | public var attributes: [Attribute] { [self] }
18 | }
19 |
20 | extension Array: AttributesProvider where Element == Attribute {
21 | public var attributes: [Attribute] { self }
22 | }
23 |
24 | @resultBuilder
25 | public struct SwiftyAttributedStringBuilder {
26 | public static func buildBlock(_ components: AttributesProvider...) -> [Attribute] {
27 | components.flatMap { $0.attributes }
28 | }
29 |
30 | public static func buildEither(first components: [AttributesProvider]) -> [Attribute] {
31 | components.flatMap { $0.attributes }
32 | }
33 |
34 | public static func buildEither(second components: [AttributesProvider]) -> [Attribute] {
35 | components.flatMap { $0.attributes }
36 | }
37 |
38 | public static func buildOptional(_ components: [Attribute]?) -> [Attribute] {
39 | components?.flatMap { $0.attributes } ?? []
40 | }
41 |
42 | public static func buildFinalResult(_ components: [Attribute]) -> [NSAttributedString.Key: Any] {
43 | dictionary(from: components)
44 | }
45 | }
46 | #endif
47 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/TextEffect.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TextEffect.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Eddie Kaiger on 10/28/16.
6 | // Copyright © 2016 Eddie Kaiger. All rights reserved.
7 | //
8 |
9 | #if os(macOS)
10 | import AppKit
11 | #else
12 | import UIKit
13 | #endif
14 |
15 | /**
16 | An enum describing the possible values for text effects on attributed strings.
17 | */
18 | public enum TextEffect: RawRepresentable {
19 |
20 | /// A graphical text effect giving glyphs the appearance of letterpress printing, in which type is pressed into the paper.
21 | case letterPressStyle
22 |
23 | public init?(rawValue: String) {
24 | switch rawValue {
25 | case NSAttributedString.TextEffectStyle.letterpressStyle.rawValue:
26 | self = .letterPressStyle
27 | default:
28 | return nil
29 | }
30 | }
31 |
32 | public var rawValue: String {
33 | switch self {
34 | case .letterPressStyle:
35 | return NSAttributedString.TextEffectStyle.letterpressStyle.rawValue
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/common/VerticalGlyphForm.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VerticalGlyphForm.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Eddie Kaiger on 11/16/16.
6 | // Copyright © 2016 Eddie Kaiger. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | An enum to indicate horizontal or vertical writing direction. On iOS, only horizontal form is valid.
13 | */
14 | public enum VerticalGlyphForm: Int {
15 |
16 | /// Horizontal writing direction.
17 | case horizontal = 0
18 |
19 | #if os(macOS)
20 | /// Vertical writing direction.
21 | case vertical = 1
22 | #endif
23 | }
24 |
--------------------------------------------------------------------------------
/Example/Pods/SwiftyAttributes/SwiftyAttributes/Sources/iOS_tvOS/UIKit+SwiftyAttributes.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIKit+SwiftyAttributes.swift
3 | // SwiftyAttributes
4 | //
5 | // Created by Roman Podymov on 26/05/19.
6 | // Copyright © 2019 Roman Podymov. All rights reserved.
7 | //
8 |
9 | #if os(macOS)
10 | #elseif os(watchOS)
11 | #else
12 | import UIKit
13 | extension UINavigationBar {
14 |
15 | /// A swifty wrapper for UINavigationBar.titleTextAttributes. Use it if you prefer [Attribute] to [NSAttributedString.Key:Any].
16 | public var swiftyTitleTextAttributes: [Attribute]? {
17 | set {
18 | titleTextAttributes = newValue?.foundationAttributes
19 | }
20 |
21 | get {
22 | return titleTextAttributes?.swiftyAttributes
23 | }
24 | }
25 |
26 | /// A swifty wrapper for UINavigationBar.largeTitleTextAttributes. Use it if you prefer [Attribute] to [NSAttributedString.Key:Any].
27 | #if os(iOS)
28 | @available(iOS 11, *)
29 | public var swiftyLargeTitleTextAttributes: [Attribute]? {
30 | set {
31 | largeTitleTextAttributes = newValue?.foundationAttributes
32 | }
33 |
34 | get {
35 | return largeTitleTextAttributes?.swiftyAttributes
36 | }
37 | }
38 | #endif
39 | }
40 | #endif
41 |
--------------------------------------------------------------------------------
/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}/Swift_Form/Swift_Form.framework
5 | ${BUILT_PRODUCTS_DIR}/SwiftyAttributes/SwiftyAttributes.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}/Swift_Form.framework
4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyAttributes.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}/Swift_Form/Swift_Form.framework
5 | ${BUILT_PRODUCTS_DIR}/SwiftyAttributes/SwiftyAttributes.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}/Swift_Form.framework
4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyAttributes.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}/Swift_Form" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyAttributes"
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}/Swift_Form/Swift_Form.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyAttributes/SwiftyAttributes.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 "SwiftUI" -framework "Swift_Form" -framework "SwiftyAttributes" -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}/Swift_Form" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyAttributes"
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}/Swift_Form/Swift_Form.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyAttributes/SwiftyAttributes.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 "SwiftUI" -framework "Swift_Form" -framework "SwiftyAttributes" -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/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}/../..
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}/../..
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/SwiftyAttributes/SwiftyAttributes-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.3.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SwiftyAttributes/SwiftyAttributes-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SwiftyAttributes : NSObject
3 | @end
4 | @implementation PodsDummy_SwiftyAttributes
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SwiftyAttributes/SwiftyAttributes-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/SwiftyAttributes/SwiftyAttributes-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 SwiftyAttributesVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char SwiftyAttributesVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SwiftyAttributes/SwiftyAttributes.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyAttributes
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}/SwiftyAttributes
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/SwiftyAttributes/SwiftyAttributes.modulemap:
--------------------------------------------------------------------------------
1 | framework module SwiftyAttributes {
2 | umbrella header "SwiftyAttributes-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/SwiftyAttributes/SwiftyAttributes.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyAttributes
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}/SwiftyAttributes
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/Swift_Form.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Swift_Form.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Swift_Form.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/Swift_Form.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Swift_Form/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Swift_Form
4 | //
5 | // Created by iOS on 2023/5/11.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 |
14 |
15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16 | // Override point for customization after application launch.
17 | return true
18 | }
19 |
20 | // MARK: UISceneSession Lifecycle
21 | @available(iOS 13.0, *)
22 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
23 | // Called when a new scene session is being created.
24 | // Use this method to select a configuration to create the new scene with.
25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
26 | }
27 | @available(iOS 13.0, *)
28 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
29 | // Called when the user discards a scene session.
30 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
31 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/Example/Swift_Form/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/Swift_Form/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/Swift_Form/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Swift_Form/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/Swift_Form/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Example/Swift_Form/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/Swift_Form/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // Swift_Form
4 | //
5 | // Created by iOS on 2023/5/11.
6 | //
7 |
8 | import UIKit
9 | @available(iOS 13.0, *)
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 |
15 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
16 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
17 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
18 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
19 | guard let _ = (scene as? UIWindowScene) else { return }
20 | }
21 |
22 | func sceneDidDisconnect(_ scene: UIScene) {
23 | // Called as the scene is being released by the system.
24 | // This occurs shortly after the scene enters the background, or when its session is discarded.
25 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
26 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
27 | }
28 |
29 | func sceneDidBecomeActive(_ scene: UIScene) {
30 | // Called when the scene has moved from an inactive state to an active state.
31 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
32 | }
33 |
34 | func sceneWillResignActive(_ scene: UIScene) {
35 | // Called when the scene will move from an active state to an inactive state.
36 | // This may occur due to temporary interruptions (ex. an incoming phone call).
37 | }
38 |
39 | func sceneWillEnterForeground(_ scene: UIScene) {
40 | // Called as the scene transitions from the background to the foreground.
41 | // Use this method to undo the changes made on entering the background.
42 | }
43 |
44 | func sceneDidEnterBackground(_ scene: UIScene) {
45 | // Called as the scene transitions from the foreground to the background.
46 | // Use this method to save data, release shared resources, and store enough scene-specific state information
47 | // to restore the scene back to its current state.
48 | }
49 |
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/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/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/Image/1.png
--------------------------------------------------------------------------------
/Image/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjinhu/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/Image/2.png
--------------------------------------------------------------------------------
/Image/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjinhu/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/Image/3.png
--------------------------------------------------------------------------------
/Image/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjinhu/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/Image/4.png
--------------------------------------------------------------------------------
/Image/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjinhu/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/Image/5.png
--------------------------------------------------------------------------------
/Image/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjinhu/SwiftyForm/d2a76befe5c691bff907cc2b1eb442ebf8284ad9/Image/logo.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2023 jackiehu <814030966@qq.com>
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 |
--------------------------------------------------------------------------------
/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "object": {
3 | "pins": [
4 | {
5 | "package": "SnapKit",
6 | "repositoryURL": "https://github.com/SnapKit/SnapKit.git",
7 | "state": {
8 | "branch": null,
9 | "revision": "d458564516e5676af9c70b4f4b2a9178294f1bc6",
10 | "version": "5.0.1"
11 | }
12 | }
13 | ]
14 | },
15 | "version": 1
16 | }
17 |
--------------------------------------------------------------------------------
/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: "SwiftyForm",
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: "SwiftyForm",
15 | targets: ["SwiftyForm"])
16 | ],
17 | dependencies: [
18 | // Dependencies declare other packages that this package depends on.
19 | // .package(url: /* package url */, from: "1.0.0"),
20 | .package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.0")),
21 | ],
22 | targets: [
23 | // Targets are the basic building blocks of a package. A target can define a module or a test suite.
24 | // Targets can depend on other targets in this package, and on products in packages which this package depends on.
25 | .target(
26 | name: "SwiftyForm",
27 | dependencies: ["SnapKit"])
28 | ],
29 | swiftLanguageVersions: [
30 | .v5
31 | ]
32 | )
33 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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.numberOfLines = 0
44 | titleLabel.translatesAutoresizingMaskIntoConstraints = false
45 | contentView.addSubview(titleLabel)
46 | self.titleLabel = titleLabel
47 | titleLabel.snp.makeConstraints { (make) in
48 | make.top.bottom.equalToSuperview()
49 | make.left.equalToSuperview().offset(20)
50 | }
51 | }
52 |
53 | open override func updateWithRowFormer(_ rowFormer: RowFormer) {
54 |
55 | titleLabel.snp.remakeConstraints { (make) in
56 | make.top.bottom.equalToSuperview()
57 | if titleImageView.image == nil{
58 | make.left.equalToSuperview().offset(20)
59 | }else{
60 | make.left.equalTo(titleImageView.snp.right).offset(5)
61 | }
62 | }
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Sources/SwiftyForm/Formers/UserRowFormer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UserRowFormer.swift
3 | // SwiftyForm
4 | //
5 | // Created by iOS on 2020/7/1.
6 | // Copyright © 2020 iOS. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /// AvatarForm协议
12 | public protocol UserFormableRow: FormableRow {
13 |
14 | func formUserNameLabel() -> UILabel?
15 | func formUserInfoLabel() -> UILabel?
16 | func formAvatarView() -> UIImageView?
17 | }
18 |
19 | /// AvatarForm
20 | open class UserRowFormer : BaseRowFormer, Formable where T: UserFormableRow {
21 | ///头像
22 | public var avatarImage: UIImage?
23 | ///头像圆角
24 | public var avatarRadius: CGFloat = 40
25 | ///用户名
26 | public var userName: String?
27 | ///用户名 不可用时颜色
28 | public var userNameDisabledColor: UIColor? = .lightGray
29 | ///用户名 颜色
30 | public var userNameColor: UIColor?
31 | ///用户信息简介
32 | public var userInfo: String?
33 | ///用户信息简介 不可用时颜色
34 | public var userInfoDisabledColor: UIColor? = .lightGray
35 | ///用户信息简介 颜色
36 | public var userInfoColor: UIColor?
37 |
38 | /// AvatarForm初始化
39 | open override func initialized() {
40 | rowHeight = 150
41 | }
42 | /// AvatarForm初始化
43 | open override func cellInitialized(_ cell: T) {
44 |
45 | }
46 |
47 | open override func cellSelected(indexPath: IndexPath) {
48 | super.cellSelected(indexPath: indexPath)
49 | former?.deselect(animated: true)
50 | }
51 |
52 | /// AvatarForm数据更新
53 | open override func update() {
54 | super.update()
55 |
56 | let userNameLabel = cell.formUserNameLabel()
57 | let userInfoLabel = cell.formUserInfoLabel()
58 | let avatarView = cell.formAvatarView()
59 | userNameLabel?.text = userName
60 | userInfoLabel?.text = userInfo
61 | avatarView?.image = avatarImage
62 | avatarView?.layer.cornerRadius = avatarRadius
63 | if enabled {
64 | _ = userNameColor.map { userNameLabel?.textColor = $0 }
65 | _ = userInfoColor.map { userInfoLabel?.textColor = $0 }
66 | userNameColor = nil
67 | userInfoColor = nil
68 | } else {
69 | if userNameColor == nil { userNameColor = userNameLabel?.textColor ?? .black }
70 | userNameLabel?.textColor = userNameDisabledColor
71 |
72 | if userInfoColor == nil { userInfoColor = userInfoLabel?.textColor ?? .black }
73 | userInfoLabel?.textColor = userInfoDisabledColor
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/Swift_Form.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 |
4 | s.name = "Swift_Form"
5 | s.version = "1.1.0"
6 | s.summary = "A short description of SwiftyForm."
7 |
8 | s.description = <<-DESC
9 | form
10 | DESC
11 |
12 | s.homepage = "https://github.com/jackiehu/"
13 |
14 | s.license = { :type => 'MIT', :file => 'LICENSE' }
15 |
16 |
17 | s.author = { 'HU' => '814030966@qq.com' }
18 |
19 | s.source = { :git => 'https://github.com/jackiehu/SwiftyForm.git', :tag => s.version.to_s }
20 |
21 |
22 |
23 | s.ios.deployment_target = "11.0"
24 | s.swift_versions = ['5.0','5.1','5.2']
25 | s.requires_arc = true
26 |
27 | s.frameworks = "UIKit"
28 | s.dependency 'SnapKit'
29 | s.source_files = 'Sources/**/*'
30 |
31 | end
32 |
--------------------------------------------------------------------------------
/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 | spec_path = "#{target_project}.podspec"
12 |
13 | # git pull
14 | git_pull
15 |
16 | # 确认是 master 分支
17 | ensure_git_branch
18 | # 确认是 main 分支
19 | # ensure_git_branch(
20 | # branch: 'main'
21 | # )
22 |
23 | # 修改 spec 为即将发布的版本
24 | version_bump_podspec(path: spec_path, version_number: target_version)
25 |
26 | # 将本地代码加入本地仓库里
27 | git_add(path: '.')
28 |
29 | # 提交修改到本地仓库
30 | git_commit(path: '.', message: update_message)
31 |
32 | # 在push之前, 查看spec是否配置有问题,验证 spec 文件
33 | pod_lib_lint(verbose: true, allow_warnings: true)
34 | # 私有仓需要添加验证仓Sources
35 | # pod_lib_lint(verbose: true, allow_warnings: true, sources: 'https://github.com/CocoaPods/Specs.git,https://codeup.aliyun.com/6279dbf7487c500c27f5744e/group1/ModuleSpace.git')
36 |
37 |
38 | # 推送master分支的代码到名称为origin的远程仓库
39 | push_to_git_remote
40 |
41 | # 检查对于 tag 是否已经存在
42 | if git_tag_exists(tag: target_version)
43 | # 删除对应 tag
44 | remove_git_tag(tag: target_version)
45 | end
46 |
47 | # 添加 tag
48 | add_git_tag(tag: target_version)
49 |
50 | # 提交 tag
51 | push_git_tags
52 |
53 |
54 | # # pod trunk push 'spec_path'
55 | # pod_push(path: spec_path, allow_warnings: true,verbose: true)
56 | # 检查是否传了 repo 参数
57 | if target_repo
58 | # pod repo push 'target_repo' 'spec_path'
59 |
60 | pod_push(path: spec_path, repo: target_repo, allow_warnings: true, verbose: true)
61 |
62 | else
63 | # pod trunk push 'spec_path'
64 |
65 | pod_push(path: spec_path, allow_warnings: true, verbose: true)
66 |
67 | end
68 | end
--------------------------------------------------------------------------------
/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_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 |
18 | echo "
19 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 "
20 | echo "
21 | 请选择要发布的podspec序号:"
22 |
23 | echo "
24 | (0) 退出
25 | "
26 |
27 | #查找文件
28 | a=1
29 | list=`find . -type f -name "*.podspec"`
30 | for i in $list
31 | do
32 | echo "($a) $i
33 | "
34 | array[$a]=$i
35 | a=$(($a+1))
36 | done
37 | echo "
38 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 "
39 | read input
40 |
41 | case $input in
42 |
43 | [1-9])
44 | # 处理文件名
45 | name1=${array[$input]}
46 | # echo "111$name1"
47 | # 截取掉/左边的
48 | name2=${name1#*/}
49 | # echo "222$name2"
50 | # 截取掉。后边的
51 | podspec=${name2%.*}
52 | # echo "333$podspec"
53 |
54 | echo "
55 | 🚀 已经选择仓库名称为:$podspec"
56 |
57 | read -p "
58 | 🚀 请输入版本号: " user_tags
59 |
60 | echo "
61 | 🚀 版本号: V $user_tags "
62 |
63 |
64 | read -p "
65 | 🚀 请输入更新内容(注意不要用空格): " update_message
66 |
67 | echo "
68 | 🚀 更新内容: $update_message "
69 |
70 | ;;
71 | 0)
72 | exit
73 | esac
74 |
75 |
76 | echo "
77 | 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉"
78 |
79 | echo "
80 | 是否发布pod到私有仓库?:"
81 |
82 | echo "
83 | (0) 不是
84 | "
85 | #查找文件
86 | b=1
87 | listRepo=`ls ~/.cocoapods/repos`
88 | for i in $listRepo
89 | do
90 | echo "($b) $i
91 | "
92 | arrayRepo[$b]=$i
93 | b=$(($b+1))
94 | done
95 | echo "🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉
96 | "
97 | read input
98 |
99 | case $input in
100 |
101 | [1-99])
102 |
103 | repo=${arrayRepo[$input]}
104 | echo "
105 | 🚀 已经选择Repo名称为:$repo
106 | "
107 |
108 | echo "
109 | 🚀 即将发布 V $user_tags 版本的 $podspec 到 $repo, 更新: $update_message
110 | "
111 | fastlane release_pod t:$user_tags p:$podspec r:$repo m:$update_message
112 | ;;
113 |
114 | 0)
115 |
116 | echo "
117 | 🚀 即将发布 V $user_tags 版本的 $podspec, 更新: $update_message
118 | "
119 | fastlane release_pod t:$user_tags p:$podspec m:$update_message
120 | ;;
121 | esac
122 |
123 | echo "🚀 总用时: ${SECONDS}s"
124 | exit
125 |
126 |
127 |
--------------------------------------------------------------------------------
/pod_lib_create:
--------------------------------------------------------------------------------
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 | read -p "
18 | 🚀 请输入工程名称: " proj_name
19 |
20 | echo "
21 | 🚀 更新内容: $proj_name
22 | "
23 |
24 | pod lib create $proj_name --template-url="https://gitee.com/jackiehu1122/pod-template"
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/swift_package_init:
--------------------------------------------------------------------------------
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 | swift package init
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------