├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── IQKeyboardManagerSwift │ ├── IQKeyboardManagerSwift │ │ ├── Categories │ │ │ ├── IQNSArray+Sort.swift │ │ │ ├── IQUIScrollView+Additions.swift │ │ │ ├── IQUITextFieldView+Additions.swift │ │ │ ├── IQUIView+Hierarchy.swift │ │ │ └── IQUIViewController+Additions.swift │ │ ├── Constants │ │ │ ├── IQKeyboardManagerConstants.swift │ │ │ └── IQKeyboardManagerConstantsInternal.swift │ │ ├── IQKeyboardManager.swift │ │ ├── IQKeyboardReturnKeyHandler.swift │ │ ├── IQTextView │ │ │ └── IQTextView.swift │ │ ├── IQToolbar │ │ │ ├── IQBarButtonItem.swift │ │ │ ├── IQInvocation.swift │ │ │ ├── IQPreviousNextView.swift │ │ │ ├── IQTitleBarButtonItem.swift │ │ │ ├── IQToolbar.swift │ │ │ └── IQUIView+IQKeyboardToolbar.swift │ │ └── Resources │ │ │ └── IQKeyboardManager.bundle │ │ │ ├── IQButtonBarArrowDown@2x.png │ │ │ ├── IQButtonBarArrowDown@3x.png │ │ │ ├── IQButtonBarArrowLeft@2x.png │ │ │ ├── IQButtonBarArrowLeft@3x.png │ │ │ ├── IQButtonBarArrowRight@2x.png │ │ │ ├── IQButtonBarArrowRight@3x.png │ │ │ ├── IQButtonBarArrowUp@2x.png │ │ │ └── IQButtonBarArrowUp@3x.png │ ├── LICENSE.md │ └── README.md ├── RxCocoa │ └── RxCocoa │ │ ├── Common │ │ └── KeyPathBinder.swift │ │ └── iOS │ │ └── Proxies │ │ ├── RxCollectionViewDataSourcePrefetchingProxy.swift │ │ └── RxTableViewDataSourcePrefetchingProxy.swift ├── SnapKit │ ├── LICENSE │ └── Source │ │ ├── Constraint.swift │ │ ├── ConstraintAttributes.swift │ │ ├── ConstraintConfig.swift │ │ ├── ConstraintConstantTarget.swift │ │ ├── ConstraintDSL.swift │ │ ├── ConstraintDescription.swift │ │ ├── ConstraintInsetTarget.swift │ │ ├── ConstraintInsets.swift │ │ ├── ConstraintItem.swift │ │ ├── ConstraintLayoutGuide+Extensions.swift │ │ ├── ConstraintLayoutGuide.swift │ │ ├── ConstraintLayoutGuideDSL.swift │ │ ├── ConstraintLayoutSupport.swift │ │ ├── ConstraintLayoutSupportDSL.swift │ │ ├── ConstraintMaker.swift │ │ ├── ConstraintMakerEditable.swift │ │ ├── ConstraintMakerExtendable.swift │ │ ├── ConstraintMakerFinalizable.swift │ │ ├── ConstraintMakerPriortizable.swift │ │ ├── ConstraintMakerRelatable.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 └── Target Support Files │ ├── IQKeyboardManagerSwift │ ├── IQKeyboardManagerSwift-dummy.m │ ├── IQKeyboardManagerSwift-prefix.pch │ ├── IQKeyboardManagerSwift-umbrella.h │ ├── IQKeyboardManagerSwift.modulemap │ └── IQKeyboardManagerSwift.xcconfig │ ├── Pods-TemplateProject │ ├── Pods-TemplateProject-acknowledgements.markdown │ ├── Pods-TemplateProject-acknowledgements.plist │ ├── Pods-TemplateProject-dummy.m │ ├── Pods-TemplateProject-frameworks.sh │ ├── Pods-TemplateProject-umbrella.h │ ├── Pods-TemplateProject.debug.xcconfig │ ├── Pods-TemplateProject.modulemap │ └── Pods-TemplateProject.release.xcconfig │ ├── Pods-TemplateProjectDev │ ├── Pods-TemplateProjectDev-acknowledgements.markdown │ ├── Pods-TemplateProjectDev-acknowledgements.plist │ ├── Pods-TemplateProjectDev-dummy.m │ ├── Pods-TemplateProjectDev-frameworks.sh │ ├── Pods-TemplateProjectDev-umbrella.h │ ├── Pods-TemplateProjectDev.debug.xcconfig │ ├── Pods-TemplateProjectDev.modulemap │ └── Pods-TemplateProjectDev.release.xcconfig │ ├── Pods-TemplateProjectTests │ ├── Pods-TemplateProjectTests-acknowledgements.markdown │ ├── Pods-TemplateProjectTests-acknowledgements.plist │ ├── Pods-TemplateProjectTests-dummy.m │ ├── Pods-TemplateProjectTests-frameworks.sh │ ├── Pods-TemplateProjectTests-umbrella.h │ ├── Pods-TemplateProjectTests.debug.xcconfig │ ├── Pods-TemplateProjectTests.modulemap │ └── Pods-TemplateProjectTests.release.xcconfig │ └── SnapKit │ ├── SnapKit-dummy.m │ ├── SnapKit-prefix.pch │ ├── SnapKit-umbrella.h │ ├── SnapKit.modulemap │ └── SnapKit.xcconfig ├── README.md ├── TemplateProject.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── TemplateProject.xcscheme │ └── TemplateProjectDev.xcscheme ├── TemplateProject.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── TemplateProject ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Extensions │ ├── Error+Extension.swift │ ├── NSObject+Extension.swift │ ├── RxSwift+Extension.swift │ ├── String+Extension.swift │ ├── UIColor+Extension.swift │ ├── UIImageView+Kingfishser.swift │ ├── UISearchBar+Extension.swift │ ├── UIView+Extension.swift │ └── UIViewController+Alert.swift ├── Info.plist ├── TemplateProjectDevInfo.plist ├── Utils │ ├── Const.swift │ └── Network │ │ ├── APIEndpoint.swift │ │ └── APIEngine.swift └── ViewController.swift ├── TemplateProjectTests ├── Info.plist └── TemplateProjectTests.swift ├── fastlane ├── Appfile ├── Fastfile └── Matchfile └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ### macOS ### 6 | # General 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | 11 | ## Build generated 12 | build/ 13 | DerivedData/ 14 | 15 | ## Various settings 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | xcuserdata/ 25 | 26 | ## Other 27 | *.moved-aside 28 | *.xccheckout 29 | *.xcscmblueprint 30 | 31 | ## Obj-C/Swift specific 32 | *.hmap 33 | *.ipa 34 | *.dSYM.zip 35 | *.dSYM 36 | 37 | ## Playgrounds 38 | timeline.xctimeline 39 | playground.xcworkspace 40 | 41 | # Swift Package Manager 42 | # 43 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 44 | # Packages/ 45 | # Package.pins 46 | # Package.resolved 47 | .build/ 48 | 49 | # CocoaPods 50 | # 51 | # We recommend against adding the Pods directory to your .gitignore. However 52 | # you should judge for yourself, the pros and cons are mentioned at: 53 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 54 | # 55 | Pods/ 56 | 57 | # Carthage 58 | # 59 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 60 | # Carthage/Checkouts 61 | 62 | Carthage/Build 63 | 64 | # fastlane 65 | # 66 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 67 | # screenshots whenever they are needed. 68 | # For more information about the recommended setup visit: 69 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 70 | 71 | fastlane/report.xml 72 | fastlane/Preview.html 73 | fastlane/screenshots/**/*.png 74 | fastlane/test_output 75 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | gem "cocoapods" -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.0) 5 | activesupport (4.2.10) 6 | i18n (~> 0.7) 7 | minitest (~> 5.1) 8 | thread_safe (~> 0.3, >= 0.3.4) 9 | tzinfo (~> 1.1) 10 | addressable (2.5.2) 11 | public_suffix (>= 2.0.2, < 4.0) 12 | atomos (0.1.2) 13 | babosa (1.0.2) 14 | claide (1.0.2) 15 | cocoapods (1.5.3) 16 | activesupport (>= 4.0.2, < 5) 17 | claide (>= 1.0.2, < 2.0) 18 | cocoapods-core (= 1.5.3) 19 | cocoapods-deintegrate (>= 1.0.2, < 2.0) 20 | cocoapods-downloader (>= 1.2.0, < 2.0) 21 | cocoapods-plugins (>= 1.0.0, < 2.0) 22 | cocoapods-search (>= 1.0.0, < 2.0) 23 | cocoapods-stats (>= 1.0.0, < 2.0) 24 | cocoapods-trunk (>= 1.3.0, < 2.0) 25 | cocoapods-try (>= 1.1.0, < 2.0) 26 | colored2 (~> 3.1) 27 | escape (~> 0.0.4) 28 | fourflusher (~> 2.0.1) 29 | gh_inspector (~> 1.0) 30 | molinillo (~> 0.6.5) 31 | nap (~> 1.0) 32 | ruby-macho (~> 1.1) 33 | xcodeproj (>= 1.5.7, < 2.0) 34 | cocoapods-core (1.5.3) 35 | activesupport (>= 4.0.2, < 6) 36 | fuzzy_match (~> 2.0.4) 37 | nap (~> 1.0) 38 | cocoapods-deintegrate (1.0.2) 39 | cocoapods-downloader (1.2.1) 40 | cocoapods-plugins (1.0.0) 41 | nap 42 | cocoapods-search (1.0.0) 43 | cocoapods-stats (1.0.0) 44 | cocoapods-trunk (1.3.0) 45 | nap (>= 0.8, < 2.0) 46 | netrc (~> 0.11) 47 | cocoapods-try (1.1.0) 48 | colored (1.2) 49 | colored2 (3.1.2) 50 | commander-fastlane (4.4.6) 51 | highline (~> 1.7.2) 52 | concurrent-ruby (1.0.5) 53 | declarative (0.0.10) 54 | declarative-option (0.1.0) 55 | domain_name (0.5.20170404) 56 | unf (>= 0.0.5, < 1.0.0) 57 | dotenv (2.5.0) 58 | emoji_regex (0.1.1) 59 | escape (0.0.4) 60 | excon (0.62.0) 61 | faraday (0.12.1) 62 | multipart-post (>= 1.2, < 3) 63 | faraday-cookie_jar (0.0.6) 64 | faraday (>= 0.7.4) 65 | http-cookie (~> 1.0.0) 66 | faraday_middleware (0.11.0.1) 67 | faraday (>= 0.7.4, < 1.0) 68 | fastimage (2.1.3) 69 | fastlane (2.99.0) 70 | CFPropertyList (>= 2.3, < 4.0.0) 71 | addressable (>= 2.3, < 3.0.0) 72 | babosa (>= 1.0.2, < 2.0.0) 73 | bundler (>= 1.12.0, < 2.0.0) 74 | colored 75 | commander-fastlane (>= 4.4.6, < 5.0.0) 76 | dotenv (>= 2.1.1, < 3.0.0) 77 | emoji_regex (~> 0.1) 78 | excon (>= 0.45.0, < 1.0.0) 79 | faraday (~> 0.9) 80 | faraday-cookie_jar (~> 0.0.6) 81 | faraday_middleware (~> 0.9) 82 | fastimage (>= 2.1.0, < 3.0.0) 83 | gh_inspector (>= 1.1.2, < 2.0.0) 84 | google-api-client (>= 0.21.2, < 0.22.0) 85 | highline (>= 1.7.2, < 2.0.0) 86 | json (< 3.0.0) 87 | mini_magick (~> 4.5.1) 88 | multi_json 89 | multi_xml (~> 0.5) 90 | multipart-post (~> 2.0.0) 91 | plist (>= 3.1.0, < 4.0.0) 92 | public_suffix (~> 2.0.0) 93 | rubyzip (>= 1.2.1, < 2.0.0) 94 | security (= 0.1.3) 95 | simctl (~> 1.6.3) 96 | slack-notifier (>= 2.0.0, < 3.0.0) 97 | terminal-notifier (>= 1.6.2, < 2.0.0) 98 | terminal-table (>= 1.4.5, < 2.0.0) 99 | tty-screen (>= 0.6.3, < 1.0.0) 100 | tty-spinner (>= 0.8.0, < 1.0.0) 101 | word_wrap (~> 1.0.0) 102 | xcodeproj (>= 1.5.7, < 2.0.0) 103 | xcpretty (~> 0.2.8) 104 | xcpretty-travis-formatter (>= 0.0.3) 105 | fourflusher (2.0.1) 106 | fuzzy_match (2.0.4) 107 | gh_inspector (1.1.3) 108 | google-api-client (0.21.2) 109 | addressable (~> 2.5, >= 2.5.1) 110 | googleauth (>= 0.5, < 0.7.0) 111 | httpclient (>= 2.8.1, < 3.0) 112 | mime-types (~> 3.0) 113 | representable (~> 3.0) 114 | retriable (>= 2.0, < 4.0) 115 | googleauth (0.5.1) 116 | faraday (~> 0.9) 117 | jwt (~> 1.4) 118 | logging (~> 2.0) 119 | memoist (~> 0.12) 120 | multi_json (~> 1.11) 121 | os (~> 0.9) 122 | signet (~> 0.7) 123 | highline (1.7.10) 124 | http-cookie (1.0.3) 125 | domain_name (~> 0.5) 126 | httpclient (2.8.3) 127 | i18n (0.9.5) 128 | concurrent-ruby (~> 1.0) 129 | json (1.8.1) 130 | jwt (1.5.6) 131 | little-plugger (1.1.4) 132 | logging (2.2.2) 133 | little-plugger (~> 1.1) 134 | multi_json (~> 1.10) 135 | memoist (0.16.0) 136 | mime-types (3.1) 137 | mime-types-data (~> 3.2015) 138 | mime-types-data (3.2016.0521) 139 | mini_magick (4.5.1) 140 | minitest (5.4.3) 141 | molinillo (0.6.5) 142 | multi_json (1.13.1) 143 | multi_xml (0.6.0) 144 | multipart-post (2.0.0) 145 | nanaimo (0.2.6) 146 | nap (1.1.0) 147 | naturally (2.2.0) 148 | netrc (0.11.0) 149 | os (0.9.6) 150 | plist (3.4.0) 151 | public_suffix (2.0.5) 152 | representable (3.0.4) 153 | declarative (< 0.1.0) 154 | declarative-option (< 0.2.0) 155 | uber (< 0.2.0) 156 | retriable (3.1.2) 157 | rouge (2.0.7) 158 | ruby-macho (1.2.0) 159 | rubyzip (1.2.1) 160 | security (0.1.3) 161 | signet (0.7.3) 162 | addressable (~> 2.3) 163 | faraday (~> 0.9) 164 | jwt (~> 1.5) 165 | multi_json (~> 1.10) 166 | simctl (1.6.4) 167 | CFPropertyList 168 | naturally 169 | slack-notifier (2.3.2) 170 | terminal-notifier (1.8.0) 171 | terminal-table (1.7.3) 172 | unicode-display_width (~> 1.1.1) 173 | thread_safe (0.3.6) 174 | tty-cursor (0.5.0) 175 | tty-screen (0.6.4) 176 | tty-spinner (0.8.0) 177 | tty-cursor (>= 0.5.0) 178 | tzinfo (1.2.5) 179 | thread_safe (~> 0.1) 180 | uber (0.1.0) 181 | unf (0.1.4) 182 | unf_ext 183 | unf_ext (0.0.7.4) 184 | unicode-display_width (1.1.3) 185 | word_wrap (1.0.0) 186 | xcodeproj (1.5.9) 187 | CFPropertyList (>= 2.3.3, < 4.0) 188 | atomos (~> 0.1.2) 189 | claide (>= 1.0.2, < 2.0) 190 | colored2 (~> 3.1) 191 | nanaimo (~> 0.2.5) 192 | xcpretty (0.2.8) 193 | rouge (~> 2.0.7) 194 | xcpretty-travis-formatter (0.0.4) 195 | xcpretty (~> 0.2, >= 0.0.7) 196 | 197 | PLATFORMS 198 | ruby 199 | 200 | DEPENDENCIES 201 | cocoapods 202 | fastlane 203 | 204 | BUNDLED WITH 205 | 1.14.6 206 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Dwarves Foundation 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 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '11.0' 3 | use_frameworks! 4 | 5 | # ignore all warnings from all pods 6 | inhibit_all_warnings! 7 | 8 | def app_pods 9 | 10 | #Reactive programming 11 | pod 'RxSwift' 12 | pod 'RxCocoa' 13 | pod 'RxDataSources' 14 | 15 | #Networking 16 | pod 'RxAlamofire' 17 | pod 'Alamofire' 18 | 19 | #Image download - cache 20 | pod 'Kingfisher' 21 | 22 | #Autolayout 23 | pod 'SnapKit' 24 | 25 | #Activity indicator 26 | pod 'SVProgressHUD' 27 | 28 | #Ayto scroll view when keyboard appeared 29 | pod 'IQKeyboardManagerSwift' 30 | 31 | end 32 | 33 | target 'TemplateProject' do 34 | app_pods 35 | end 36 | target 'TemplateProjectDev' do 37 | app_pods 38 | end 39 | target 'TemplateProjectTests' do 40 | app_pods 41 | inherit! :search_paths 42 | end 43 | 44 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.8.2) 3 | - Differentiator (4.0.1) 4 | - IQKeyboardManagerSwift (6.3.0) 5 | - Kingfisher (5.4.0) 6 | - RxAlamofire (5.0.0): 7 | - RxAlamofire/Core (= 5.0.0) 8 | - RxAlamofire/Core (5.0.0): 9 | - Alamofire (~> 4.8) 10 | - RxSwift (~> 5.0) 11 | - RxCocoa (5.0.0): 12 | - RxRelay (~> 5) 13 | - RxSwift (~> 5) 14 | - RxDataSources (4.0.1): 15 | - Differentiator (~> 4.0) 16 | - RxCocoa (~> 5.0) 17 | - RxSwift (~> 5.0) 18 | - RxRelay (5.0.0): 19 | - RxSwift (~> 5) 20 | - RxSwift (5.0.0) 21 | - SnapKit (5.0.0) 22 | - SVProgressHUD (2.2.5) 23 | 24 | DEPENDENCIES: 25 | - Alamofire 26 | - IQKeyboardManagerSwift 27 | - Kingfisher 28 | - RxAlamofire 29 | - RxCocoa 30 | - RxDataSources 31 | - RxSwift 32 | - SnapKit 33 | - SVProgressHUD 34 | 35 | SPEC REPOS: 36 | https://github.com/cocoapods/specs.git: 37 | - Alamofire 38 | - Differentiator 39 | - IQKeyboardManagerSwift 40 | - Kingfisher 41 | - RxAlamofire 42 | - RxCocoa 43 | - RxDataSources 44 | - RxRelay 45 | - RxSwift 46 | - SnapKit 47 | - SVProgressHUD 48 | 49 | SPEC CHECKSUMS: 50 | Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 51 | Differentiator: 886080237d9f87f322641dedbc5be257061b0602 52 | IQKeyboardManagerSwift: a8228c257614af98743b4cd8584637025f36358f 53 | Kingfisher: 9c8f2cc6710334e06f32ba2b45e77707d5e2f0c9 54 | RxAlamofire: e7875a012aff55345672d0f70a2a9cd6aeb0f211 55 | RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8 56 | RxDataSources: efee07fa4de48477eca0a4611e6d11e2da9c1114 57 | RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18 58 | RxSwift: 8b0671caa829a763bbce7271095859121cbd895f 59 | SnapKit: fd22d10eb9aff484d79a8724eab922c1ddf89bcf 60 | SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 61 | 62 | PODFILE CHECKSUM: 900b8fca9f97cf559e23832dfe6bacd9a8ea1a2e 63 | 64 | COCOAPODS: 1.6.0.beta.2 65 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Categories/IQNSArray+Sort.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQNSArray+Sort.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | import UIKit 26 | 27 | /** 28 | UIView.subviews sorting category. 29 | */ 30 | internal extension Array { 31 | 32 | ///-------------- 33 | /// MARK: Sorting 34 | ///-------------- 35 | 36 | /** 37 | Returns the array by sorting the UIView's by their tag property. 38 | */ 39 | func sortedArrayByTag() -> [Element] { 40 | 41 | return sorted(by: { (obj1 : Element, obj2 : Element) -> Bool in 42 | 43 | let view1 = obj1 as! UIView 44 | let view2 = obj2 as! UIView 45 | 46 | return (view1.tag < view2.tag) 47 | }) 48 | } 49 | 50 | /** 51 | Returns the array by sorting the UIView's by their tag property. 52 | */ 53 | func sortedArrayByPosition() -> [Element] { 54 | 55 | return sorted(by: { (obj1 : Element, obj2 : Element) -> Bool in 56 | 57 | let view1 = obj1 as! UIView 58 | let view2 = obj2 as! UIView 59 | 60 | let x1 = view1.frame.minX 61 | let y1 = view1.frame.minY 62 | let x2 = view2.frame.minX 63 | let y2 = view2.frame.minY 64 | 65 | if y1 != y2 { 66 | return y1 < y2 67 | } else { 68 | return x1 < x2 69 | } 70 | }) 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Categories/IQUIScrollView+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQUIScrollView+Additions.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | import UIKit 26 | 27 | private var kIQShouldIgnoreScrollingAdjustment = "kIQShouldIgnoreScrollingAdjustment" 28 | private var kIQShouldRestoreScrollViewContentOffset = "kIQShouldRestoreScrollViewContentOffset" 29 | 30 | @objc public extension UIScrollView { 31 | 32 | /** 33 | If YES, then scrollview will ignore scrolling (simply not scroll it) for adjusting textfield position. Default is NO. 34 | */ 35 | @objc var shouldIgnoreScrollingAdjustment: Bool { 36 | get { 37 | 38 | if let aValue = objc_getAssociatedObject(self, &kIQShouldIgnoreScrollingAdjustment) as? Bool { 39 | return aValue 40 | } else { 41 | return false 42 | } 43 | } 44 | set(newValue) { 45 | objc_setAssociatedObject(self, &kIQShouldIgnoreScrollingAdjustment, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 46 | } 47 | } 48 | 49 | /** 50 | To set customized distance from keyboard for textField/textView. Can't be less than zero 51 | */ 52 | @objc var shouldRestoreScrollViewContentOffset: Bool { 53 | get { 54 | 55 | if let aValue = objc_getAssociatedObject(self, &kIQShouldRestoreScrollViewContentOffset) as? Bool { 56 | return aValue 57 | } else { 58 | return false 59 | } 60 | } 61 | set(newValue) { 62 | objc_setAssociatedObject(self, &kIQShouldRestoreScrollViewContentOffset, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 63 | } 64 | } 65 | } 66 | 67 | internal extension UITableView { 68 | 69 | func previousIndexPath(of indexPath:IndexPath) -> IndexPath? { 70 | var previousRow = indexPath.row - 1 71 | var previousSection = indexPath.section 72 | 73 | //Fixing indexPath 74 | if previousRow < 0 { 75 | previousSection -= 1 76 | 77 | if previousSection >= 0 { 78 | previousRow = self.numberOfRows(inSection: previousSection) - 1 79 | } 80 | } 81 | 82 | if previousRow >= 0 && previousSection >= 0 { 83 | return IndexPath(row: previousRow, section: previousSection) 84 | } else { 85 | return nil 86 | } 87 | } 88 | } 89 | 90 | internal extension UICollectionView { 91 | 92 | func previousIndexPath(of indexPath:IndexPath) -> IndexPath? { 93 | var previousRow = indexPath.row - 1 94 | var previousSection = indexPath.section 95 | 96 | //Fixing indexPath 97 | if previousRow < 0 { 98 | previousSection -= 1 99 | 100 | if previousSection >= 0 { 101 | previousRow = self.numberOfItems(inSection: previousSection) - 1 102 | } 103 | } 104 | 105 | if previousRow >= 0 && previousSection >= 0 { 106 | return IndexPath(item: previousRow, section: previousSection) 107 | } else { 108 | return nil 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Categories/IQUITextFieldView+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQUITextFieldView+Additions.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | import UIKit 26 | 27 | /** 28 | Uses default keyboard distance for textField. 29 | */ 30 | public let kIQUseDefaultKeyboardDistance = CGFloat.greatestFiniteMagnitude 31 | 32 | private var kIQKeyboardDistanceFromTextField = "kIQKeyboardDistanceFromTextField" 33 | //private var kIQKeyboardEnableMode = "kIQKeyboardEnableMode" 34 | private var kIQKeyboardShouldResignOnTouchOutsideMode = "kIQKeyboardShouldResignOnTouchOutsideMode" 35 | private var kIQIgnoreSwitchingByNextPrevious = "kIQIgnoreSwitchingByNextPrevious" 36 | 37 | /** 38 | UIView category for managing UITextField/UITextView 39 | */ 40 | @objc public extension UIView { 41 | 42 | /** 43 | To set customized distance from keyboard for textField/textView. Can't be less than zero 44 | */ 45 | @objc var keyboardDistanceFromTextField: CGFloat { 46 | get { 47 | 48 | if let aValue = objc_getAssociatedObject(self, &kIQKeyboardDistanceFromTextField) as? CGFloat { 49 | return aValue 50 | } else { 51 | return kIQUseDefaultKeyboardDistance 52 | } 53 | } 54 | set(newValue) { 55 | objc_setAssociatedObject(self, &kIQKeyboardDistanceFromTextField, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 56 | } 57 | } 58 | 59 | /** 60 | If shouldIgnoreSwitchingByNextPrevious is true then library will ignore this textField/textView while moving to other textField/textView using keyboard toolbar next previous buttons. Default is false 61 | */ 62 | @objc var ignoreSwitchingByNextPrevious: Bool { 63 | get { 64 | 65 | if let aValue = objc_getAssociatedObject(self, &kIQIgnoreSwitchingByNextPrevious) as? Bool { 66 | return aValue 67 | } else { 68 | return false 69 | } 70 | } 71 | set(newValue) { 72 | objc_setAssociatedObject(self, &kIQIgnoreSwitchingByNextPrevious, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 73 | } 74 | } 75 | 76 | // /** 77 | // Override Enable/disable managing distance between keyboard and textField behaviour for this particular textField. 78 | // */ 79 | // @objc public var enableMode: IQEnableMode { 80 | // get { 81 | // 82 | // if let savedMode = objc_getAssociatedObject(self, &kIQKeyboardEnableMode) as? IQEnableMode { 83 | // return savedMode 84 | // } else { 85 | // return .Default 86 | // } 87 | // } 88 | // set(newValue) { 89 | // objc_setAssociatedObject(self, &kIQKeyboardEnableMode, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 90 | // } 91 | // } 92 | 93 | /** 94 | Override resigns Keyboard on touching outside of UITextField/View behaviour for this particular textField. 95 | */ 96 | @objc var shouldResignOnTouchOutsideMode: IQEnableMode { 97 | get { 98 | 99 | if let savedMode = objc_getAssociatedObject(self, &kIQKeyboardShouldResignOnTouchOutsideMode) as? IQEnableMode { 100 | return savedMode 101 | } else { 102 | return .Default 103 | } 104 | } 105 | set(newValue) { 106 | objc_setAssociatedObject(self, &kIQKeyboardShouldResignOnTouchOutsideMode, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 107 | } 108 | } 109 | } 110 | 111 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Categories/IQUIViewController+Additions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQUIViewController+Additions.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 UIKit 25 | 26 | 27 | private var kIQLayoutGuideConstraint = "kIQLayoutGuideConstraint" 28 | 29 | 30 | @objc public extension UIViewController { 31 | 32 | /** 33 | To set customized distance from keyboard for textField/textView. Can't be less than zero 34 | 35 | @deprecated Due to change in core-logic of handling distance between textField and keyboard distance, this layout contraint tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview 36 | */ 37 | @available(*,deprecated, message: "Due to change in core-logic of handling distance between textField and keyboard distance, this layout contraint tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview.") 38 | @IBOutlet @objc var IQLayoutGuideConstraint: NSLayoutConstraint? { 39 | get { 40 | 41 | return objc_getAssociatedObject(self, &kIQLayoutGuideConstraint) as? NSLayoutConstraint 42 | } 43 | 44 | set(newValue) { 45 | objc_setAssociatedObject(self, &kIQLayoutGuideConstraint, newValue,objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Constants/IQKeyboardManagerConstants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQKeyboardManagerConstants.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | 25 | import Foundation 26 | 27 | ///----------------------------------- 28 | /// MARK: IQAutoToolbarManageBehaviour 29 | ///----------------------------------- 30 | 31 | /** 32 | `IQAutoToolbarBySubviews` 33 | Creates Toolbar according to subview's hirarchy of Textfield's in view. 34 | 35 | `IQAutoToolbarByTag` 36 | Creates Toolbar according to tag property of TextField's. 37 | 38 | `IQAutoToolbarByPosition` 39 | Creates Toolbar according to the y,x position of textField in it's superview coordinate. 40 | */ 41 | @objc public enum IQAutoToolbarManageBehaviour : Int { 42 | case bySubviews 43 | case byTag 44 | case byPosition 45 | } 46 | 47 | /** 48 | `IQPreviousNextDisplayModeDefault` 49 | Show NextPrevious when there are more than 1 textField otherwise hide. 50 | 51 | `IQPreviousNextDisplayModeAlwaysHide` 52 | Do not show NextPrevious buttons in any case. 53 | 54 | `IQPreviousNextDisplayModeAlwaysShow` 55 | Always show nextPrevious buttons, if there are more than 1 textField then both buttons will be visible but will be shown as disabled. 56 | */ 57 | @objc public enum IQPreviousNextDisplayMode : Int { 58 | case Default 59 | case alwaysHide 60 | case alwaysShow 61 | } 62 | 63 | /** 64 | `IQEnableModeDefault` 65 | Pick default settings. 66 | 67 | `IQEnableModeEnabled` 68 | setting is enabled. 69 | 70 | `IQEnableModeDisabled` 71 | setting is disabled. 72 | */ 73 | @objc public enum IQEnableMode : Int { 74 | case Default 75 | case enabled 76 | case disabled 77 | } 78 | 79 | /* 80 | 81 | /---------------------------------------------------------------------------------------------------\ 82 | \---------------------------------------------------------------------------------------------------/ 83 | | iOS Notification Mechanism | 84 | /---------------------------------------------------------------------------------------------------\ 85 | \---------------------------------------------------------------------------------------------------/ 86 | 87 | 88 | ------------------------------------------------------------ 89 | When UITextField become first responder 90 | ------------------------------------------------------------ 91 | - UITextFieldTextDidBeginEditingNotification (UITextField) 92 | - UIKeyboardWillShowNotification 93 | - UIKeyboardDidShowNotification 94 | 95 | ------------------------------------------------------------ 96 | When UITextView become first responder 97 | ------------------------------------------------------------ 98 | - UIKeyboardWillShowNotification 99 | - UITextViewTextDidBeginEditingNotification (UITextView) 100 | - UIKeyboardDidShowNotification 101 | 102 | ------------------------------------------------------------ 103 | When switching focus from UITextField to another UITextField 104 | ------------------------------------------------------------ 105 | - UITextFieldTextDidEndEditingNotification (UITextField1) 106 | - UITextFieldTextDidBeginEditingNotification (UITextField2) 107 | - UIKeyboardWillShowNotification 108 | - UIKeyboardDidShowNotification 109 | 110 | ------------------------------------------------------------ 111 | When switching focus from UITextView to another UITextView 112 | ------------------------------------------------------------ 113 | - UITextViewTextDidEndEditingNotification : (UITextView1) 114 | - UIKeyboardWillShowNotification 115 | - UITextViewTextDidBeginEditingNotification : (UITextView2) 116 | - UIKeyboardDidShowNotification 117 | 118 | ------------------------------------------------------------ 119 | When switching focus from UITextField to UITextView 120 | ------------------------------------------------------------ 121 | - UITextFieldTextDidEndEditingNotification (UITextField) 122 | - UIKeyboardWillShowNotification 123 | - UITextViewTextDidBeginEditingNotification (UITextView) 124 | - UIKeyboardDidShowNotification 125 | 126 | ------------------------------------------------------------ 127 | When switching focus from UITextView to UITextField 128 | ------------------------------------------------------------ 129 | - UITextViewTextDidEndEditingNotification (UITextView) 130 | - UITextFieldTextDidBeginEditingNotification (UITextField) 131 | - UIKeyboardWillShowNotification 132 | - UIKeyboardDidShowNotification 133 | 134 | ------------------------------------------------------------ 135 | When opening/closing UIKeyboard Predictive bar 136 | ------------------------------------------------------------ 137 | - UIKeyboardWillShowNotification 138 | - UIKeyboardDidShowNotification 139 | 140 | ------------------------------------------------------------ 141 | On orientation change 142 | ------------------------------------------------------------ 143 | - UIApplicationWillChangeStatusBarOrientationNotification 144 | - UIKeyboardWillHideNotification 145 | - UIKeyboardDidHideNotification 146 | - UIApplicationDidChangeStatusBarOrientationNotification 147 | - UIKeyboardWillShowNotification 148 | - UIKeyboardDidShowNotification 149 | - UIKeyboardWillShowNotification 150 | - UIKeyboardDidShowNotification 151 | 152 | */ 153 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Constants/IQKeyboardManagerConstantsInternal.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQKeyboardManagerConstantsInternal.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | 25 | import Foundation 26 | 27 | 28 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQToolbar/IQBarButtonItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQBarButtonItem.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | 25 | import UIKit 26 | import Foundation 27 | 28 | open class IQBarButtonItem: UIBarButtonItem { 29 | 30 | private static var _classInitialize: Void = classInitialize() 31 | 32 | @objc public override init() { 33 | _ = IQBarButtonItem._classInitialize 34 | super.init() 35 | } 36 | 37 | @objc public required init?(coder aDecoder: NSCoder) { 38 | _ = IQBarButtonItem._classInitialize 39 | super.init(coder: aDecoder) 40 | } 41 | 42 | 43 | private class func classInitialize() { 44 | 45 | let appearanceProxy = self.appearance() 46 | 47 | #if swift(>=4.2) 48 | let states : [UIControl.State] 49 | #else 50 | let states : [UIControlState] 51 | #endif 52 | 53 | states = [.normal,.highlighted,.disabled,.selected,.application,.reserved] 54 | 55 | for state in states { 56 | 57 | appearanceProxy.setBackgroundImage(nil, for: state, barMetrics: .default) 58 | appearanceProxy.setBackgroundImage(nil, for: state, style: .done, barMetrics: .default) 59 | appearanceProxy.setBackgroundImage(nil, for: state, style: .plain, barMetrics: .default) 60 | appearanceProxy.setBackButtonBackgroundImage(nil, for: state, barMetrics: .default) 61 | } 62 | 63 | appearanceProxy.setTitlePositionAdjustment(UIOffset(), for: .default) 64 | appearanceProxy.setBackgroundVerticalPositionAdjustment(0, for: .default) 65 | appearanceProxy.setBackButtonBackgroundVerticalPositionAdjustment(0, for: .default) 66 | } 67 | 68 | @objc override open var tintColor: UIColor? { 69 | didSet { 70 | 71 | #if swift(>=4.2) 72 | var textAttributes = [NSAttributedString.Key : Any]() 73 | let foregroundColorKey = NSAttributedString.Key.foregroundColor 74 | #elseif swift(>=4) 75 | var textAttributes = [NSAttributedStringKey : Any]() 76 | let foregroundColorKey = NSAttributedStringKey.foregroundColor 77 | #else 78 | var textAttributes = [String:Any]() 79 | let foregroundColorKey = NSForegroundColorAttributeName 80 | #endif 81 | 82 | textAttributes[foregroundColorKey] = tintColor 83 | 84 | #if swift(>=4) 85 | 86 | if let attributes = titleTextAttributes(for: .normal) { 87 | 88 | for (key, value) in attributes { 89 | #if swift(>=4.2) 90 | textAttributes[key] = value 91 | #else 92 | textAttributes[NSAttributedStringKey.init(key)] = value 93 | #endif 94 | } 95 | } 96 | 97 | #else 98 | 99 | if let attributes = titleTextAttributes(for: .normal) { 100 | textAttributes = attributes 101 | } 102 | #endif 103 | 104 | setTitleTextAttributes(textAttributes, for: .normal) 105 | } 106 | } 107 | 108 | /** 109 | Boolean to know if it's a system item or custom item, we are having a limitation that we cannot override a designated initializer, so we are manually setting this property once in initialization 110 | */ 111 | @objc internal var isSystemItem = false 112 | 113 | /** 114 | Additional target & action to do get callback action. Note that setting custom target & selector doesn't affect native functionality, this is just an additional target to get a callback. 115 | 116 | @param target Target object. 117 | @param action Target Selector. 118 | */ 119 | @objc open func setTarget(_ target: AnyObject?, action: Selector?) { 120 | if let target = target, let action = action { 121 | invocation = IQInvocation(target, action) 122 | } else { 123 | invocation = nil 124 | } 125 | } 126 | 127 | /** 128 | Customized Invocation to be called when button is pressed. invocation is internally created using setTarget:action: method. 129 | */ 130 | @objc open var invocation : IQInvocation? 131 | 132 | deinit { 133 | target = nil 134 | invocation = nil 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQToolbar/IQInvocation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQInvocation.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 | 25 | import UIKit 26 | 27 | @objc public class IQInvocation : NSObject { 28 | @objc public weak var target: AnyObject? 29 | @objc public var action: Selector 30 | 31 | @objc public init(_ target: AnyObject, _ action: Selector) { 32 | self.target = target 33 | self.action = action 34 | } 35 | 36 | @objc public func invoke(from: Any) { 37 | if let target = target { 38 | UIApplication.shared.sendAction(action, to: target, from: from, for: UIEvent()) 39 | } 40 | } 41 | 42 | deinit { 43 | target = nil 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQToolbar/IQPreviousNextView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IQPreviousNextView.swift 3 | // https://github.com/hackiftekhar/IQKeyboardManager 4 | // Copyright (c) 2013-16 Iftekhar Qurashi. 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 UIKit 25 | 26 | @objc public class IQPreviousNextView: UIView { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowDown@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowDown@2x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowDown@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowDown@3x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowLeft@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowLeft@2x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowLeft@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowLeft@3x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowRight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowRight@2x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowRight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowRight@3x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowUp@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowUp@2x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowUp@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dwarvesf/template-ios-app/34c928c799a2e816b9c4dd1250e43fe9fbffac1f/Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/Resources/IQKeyboardManager.bundle/IQButtonBarArrowUp@3x.png -------------------------------------------------------------------------------- /Pods/IQKeyboardManagerSwift/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-2017 Iftekhar Qurashi 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 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/Common/KeyPathBinder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KeyPathBinder.swift 3 | // RxCocoa 4 | // 5 | // Created by Ryo Aoyama on 2/7/18. 6 | // Copyright © 2018 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | import RxSwift 10 | 11 | extension Reactive where Base: AnyObject { 12 | 13 | /// Bindable sink for arbitrary property using the given key path. 14 | /// Binding runs on the MainScheduler. 15 | /// 16 | /// - parameter keyPath: Key path to write to the property. 17 | public subscript(keyPath: ReferenceWritableKeyPath) -> Binder { 18 | return Binder(self.base) { base, value in 19 | base[keyPath: keyPath] = value 20 | } 21 | } 22 | 23 | /// Bindable sink for arbitrary property using the given key path. 24 | /// Binding runs on the specified scheduler. 25 | /// 26 | /// - parameter keyPath: Key path to write to the property. 27 | /// - parameter scheduler: Scheduler to run bindings on. 28 | public subscript(keyPath: ReferenceWritableKeyPath, on scheduler: ImmediateSchedulerType) -> Binder { 29 | return Binder(self.base, scheduler: scheduler) { base, value in 30 | base[keyPath: keyPath] = value 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourcePrefetchingProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RxCollectionViewDataSourcePrefetchingProxy.swift 3 | // RxCocoa 4 | // 5 | // Created by Rowan Livingstone on 2/15/18. 6 | // Copyright © 2018 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if os(iOS) || os(tvOS) 10 | 11 | import UIKit 12 | import RxSwift 13 | 14 | @available(iOS 10.0, tvOS 10.0, *) 15 | extension UICollectionView: HasPrefetchDataSource { 16 | public typealias PrefetchDataSource = UICollectionViewDataSourcePrefetching 17 | } 18 | 19 | @available(iOS 10.0, tvOS 10.0, *) 20 | fileprivate let collectionViewPrefetchDataSourceNotSet = CollectionViewPrefetchDataSourceNotSet() 21 | 22 | @available(iOS 10.0, tvOS 10.0, *) 23 | fileprivate final class CollectionViewPrefetchDataSourceNotSet 24 | : NSObject 25 | , UICollectionViewDataSourcePrefetching { 26 | 27 | func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) {} 28 | 29 | } 30 | 31 | @available(iOS 10.0, tvOS 10.0, *) 32 | open class RxCollectionViewDataSourcePrefetchingProxy 33 | : DelegateProxy 34 | , DelegateProxyType 35 | , UICollectionViewDataSourcePrefetching { 36 | 37 | /// Typed parent object. 38 | public weak private(set) var collectionView: UICollectionView? 39 | 40 | /// - parameter collectionView: Parent object for delegate proxy. 41 | public init(collectionView: ParentObject) { 42 | self.collectionView = collectionView 43 | super.init(parentObject: collectionView, delegateProxy: RxCollectionViewDataSourcePrefetchingProxy.self) 44 | } 45 | 46 | // Register known implementations 47 | public static func registerKnownImplementations() { 48 | self.register { RxCollectionViewDataSourcePrefetchingProxy(collectionView: $0) } 49 | } 50 | 51 | fileprivate var _prefetchItemsPublishSubject: PublishSubject<[IndexPath]>? 52 | 53 | /// Optimized version used for observing prefetch items callbacks. 54 | internal var prefetchItemsPublishSubject: PublishSubject<[IndexPath]> { 55 | if let subject = _prefetchItemsPublishSubject { 56 | return subject 57 | } 58 | 59 | let subject = PublishSubject<[IndexPath]>() 60 | _prefetchItemsPublishSubject = subject 61 | 62 | return subject 63 | } 64 | 65 | private weak var _requiredMethodsPrefetchDataSource: UICollectionViewDataSourcePrefetching? = collectionViewPrefetchDataSourceNotSet 66 | 67 | // MARK: delegate 68 | 69 | /// Required delegate method implementation. 70 | public func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) { 71 | if let subject = _prefetchItemsPublishSubject { 72 | subject.on(.next(indexPaths)) 73 | } 74 | 75 | (_requiredMethodsPrefetchDataSource ?? collectionViewPrefetchDataSourceNotSet).collectionView(collectionView, prefetchItemsAt: indexPaths) 76 | } 77 | 78 | /// For more information take a look at `DelegateProxyType`. 79 | open override func setForwardToDelegate(_ forwardToDelegate: UICollectionViewDataSourcePrefetching?, retainDelegate: Bool) { 80 | _requiredMethodsPrefetchDataSource = forwardToDelegate ?? collectionViewPrefetchDataSourceNotSet 81 | super.setForwardToDelegate(forwardToDelegate, retainDelegate: retainDelegate) 82 | } 83 | 84 | deinit { 85 | if let subject = _prefetchItemsPublishSubject { 86 | subject.on(.completed) 87 | } 88 | } 89 | 90 | } 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourcePrefetchingProxy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RxTableViewDataSourcePrefetchingProxy.swift 3 | // RxCocoa 4 | // 5 | // Created by Rowan Livingstone on 2/15/18. 6 | // Copyright © 2018 Krunoslav Zaher. All rights reserved. 7 | // 8 | 9 | #if os(iOS) || os(tvOS) 10 | 11 | import UIKit 12 | import RxSwift 13 | 14 | @available(iOS 10.0, tvOS 10.0, *) 15 | extension UITableView: HasPrefetchDataSource { 16 | public typealias PrefetchDataSource = UITableViewDataSourcePrefetching 17 | } 18 | 19 | @available(iOS 10.0, tvOS 10.0, *) 20 | fileprivate let tableViewPrefetchDataSourceNotSet = TableViewPrefetchDataSourceNotSet() 21 | 22 | @available(iOS 10.0, tvOS 10.0, *) 23 | fileprivate final class TableViewPrefetchDataSourceNotSet 24 | : NSObject 25 | , UITableViewDataSourcePrefetching { 26 | 27 | func tableView(_ tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) {} 28 | 29 | } 30 | 31 | @available(iOS 10.0, tvOS 10.0, *) 32 | open class RxTableViewDataSourcePrefetchingProxy 33 | : DelegateProxy 34 | , DelegateProxyType 35 | , UITableViewDataSourcePrefetching { 36 | 37 | /// Typed parent object. 38 | public weak private(set) var tableView: UITableView? 39 | 40 | /// - parameter tableView: Parent object for delegate proxy. 41 | public init(tableView: ParentObject) { 42 | self.tableView = tableView 43 | super.init(parentObject: tableView, delegateProxy: RxTableViewDataSourcePrefetchingProxy.self) 44 | } 45 | 46 | // Register known implementations 47 | public static func registerKnownImplementations() { 48 | self.register { RxTableViewDataSourcePrefetchingProxy(tableView: $0) } 49 | } 50 | 51 | fileprivate var _prefetchRowsPublishSubject: PublishSubject<[IndexPath]>? 52 | 53 | /// Optimized version used for observing prefetch rows callbacks. 54 | internal var prefetchRowsPublishSubject: PublishSubject<[IndexPath]> { 55 | if let subject = _prefetchRowsPublishSubject { 56 | return subject 57 | } 58 | 59 | let subject = PublishSubject<[IndexPath]>() 60 | _prefetchRowsPublishSubject = subject 61 | 62 | return subject 63 | } 64 | 65 | private weak var _requiredMethodsPrefetchDataSource: UITableViewDataSourcePrefetching? = tableViewPrefetchDataSourceNotSet 66 | 67 | // MARK: delegate 68 | 69 | /// Required delegate method implementation. 70 | public func tableView(_ tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) { 71 | if let subject = _prefetchRowsPublishSubject { 72 | subject.on(.next(indexPaths)) 73 | } 74 | 75 | (_requiredMethodsPrefetchDataSource ?? tableViewPrefetchDataSourceNotSet).tableView(tableView, prefetchRowsAt: indexPaths) 76 | } 77 | 78 | /// For more information take a look at `DelegateProxyType`. 79 | open override func setForwardToDelegate(_ forwardToDelegate: UITableViewDataSourcePrefetching?, retainDelegate: Bool) { 80 | _requiredMethodsPrefetchDataSource = forwardToDelegate ?? tableViewPrefetchDataSourceNotSet 81 | super.setForwardToDelegate(forwardToDelegate, retainDelegate: retainDelegate) 82 | } 83 | 84 | deinit { 85 | if let subject = _prefetchRowsPublishSubject { 86 | subject.on(.completed) 87 | } 88 | } 89 | 90 | } 91 | 92 | #endif 93 | 94 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintConstantTarget.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 ConstraintConstantTarget { 32 | } 33 | 34 | extension CGPoint: ConstraintConstantTarget { 35 | } 36 | 37 | extension CGSize: ConstraintConstantTarget { 38 | } 39 | 40 | extension ConstraintInsets: ConstraintConstantTarget { 41 | } 42 | 43 | extension ConstraintConstantTarget { 44 | 45 | internal func constraintConstantTargetValueFor(layoutAttribute: LayoutAttribute) -> CGFloat { 46 | if let value = self as? CGFloat { 47 | return value 48 | } 49 | 50 | if let value = self as? Float { 51 | return CGFloat(value) 52 | } 53 | 54 | if let value = self as? Double { 55 | return CGFloat(value) 56 | } 57 | 58 | if let value = self as? Int { 59 | return CGFloat(value) 60 | } 61 | 62 | if let value = self as? UInt { 63 | return CGFloat(value) 64 | } 65 | 66 | if let value = self as? CGSize { 67 | if layoutAttribute == .width { 68 | return value.width 69 | } else if layoutAttribute == .height { 70 | return value.height 71 | } else { 72 | return 0.0 73 | } 74 | } 75 | 76 | if let value = self as? CGPoint { 77 | #if os(iOS) || os(tvOS) 78 | switch layoutAttribute { 79 | case .left, .right, .leading, .trailing, .centerX, .leftMargin, .rightMargin, .leadingMargin, .trailingMargin, .centerXWithinMargins: 80 | return value.x 81 | case .top, .bottom, .centerY, .topMargin, .bottomMargin, .centerYWithinMargins, .lastBaseline, .firstBaseline: 82 | return value.y 83 | case .width, .height, .notAnAttribute: 84 | return 0.0 85 | #if swift(>=5.0) 86 | @unknown default: 87 | return 0.0 88 | #endif 89 | } 90 | #else 91 | switch layoutAttribute { 92 | case .left, .right, .leading, .trailing, .centerX: 93 | return value.x 94 | case .top, .bottom, .centerY, .lastBaseline, .firstBaseline: 95 | return value.y 96 | case .width, .height, .notAnAttribute: 97 | return 0.0 98 | #if swift(>=5.0) 99 | @unknown default: 100 | return 0.0 101 | #endif 102 | } 103 | #endif 104 | } 105 | 106 | if let value = self as? ConstraintInsets { 107 | #if os(iOS) || os(tvOS) 108 | switch layoutAttribute { 109 | case .left, .leftMargin: 110 | return value.left 111 | case .top, .topMargin, .firstBaseline: 112 | return value.top 113 | case .right, .rightMargin: 114 | return -value.right 115 | case .bottom, .bottomMargin, .lastBaseline: 116 | return -value.bottom 117 | case .leading, .leadingMargin: 118 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right 119 | case .trailing, .trailingMargin: 120 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left 121 | case .centerX, .centerXWithinMargins: 122 | return (value.left - value.right) / 2 123 | case .centerY, .centerYWithinMargins: 124 | return (value.top - value.bottom) / 2 125 | case .width: 126 | return -(value.left + value.right) 127 | case .height: 128 | return -(value.top + value.bottom) 129 | case .notAnAttribute: 130 | return 0.0 131 | #if swift(>=5.0) 132 | @unknown default: 133 | return 0.0 134 | #endif 135 | } 136 | #else 137 | switch layoutAttribute { 138 | case .left: 139 | return value.left 140 | case .top, .firstBaseline: 141 | return value.top 142 | case .right: 143 | return -value.right 144 | case .bottom, .lastBaseline: 145 | return -value.bottom 146 | case .leading: 147 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? value.left : value.right 148 | case .trailing: 149 | return (ConstraintConfig.interfaceLayoutDirection == .leftToRight) ? -value.right : -value.left 150 | case .centerX: 151 | return (value.left - value.right) / 2 152 | case .centerY: 153 | return (value.top - value.bottom) / 2 154 | case .width: 155 | return -(value.left + value.right) 156 | case .height: 157 | return -(value.top + value.bottom) 158 | case .notAnAttribute: 159 | return 0.0 160 | #if swift(>=5.0) 161 | @unknown default: 162 | return 0.0 163 | #endif 164 | } 165 | #endif 166 | } 167 | 168 | return 0.0 169 | } 170 | 171 | } 172 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintDescription.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 ConstraintDescription { 32 | 33 | internal let item: LayoutConstraintItem 34 | internal var attributes: ConstraintAttributes 35 | internal var relation: ConstraintRelation? = nil 36 | internal var sourceLocation: (String, UInt)? = nil 37 | internal var label: String? = nil 38 | internal var related: ConstraintItem? = nil 39 | internal var multiplier: ConstraintMultiplierTarget = 1.0 40 | internal var constant: ConstraintConstantTarget = 0.0 41 | internal var priority: ConstraintPriorityTarget = 1000.0 42 | internal lazy var constraint: Constraint? = { 43 | guard let relation = self.relation, 44 | let related = self.related, 45 | let sourceLocation = self.sourceLocation else { 46 | return nil 47 | } 48 | let from = ConstraintItem(target: self.item, attributes: self.attributes) 49 | 50 | return Constraint( 51 | from: from, 52 | to: related, 53 | relation: relation, 54 | sourceLocation: sourceLocation, 55 | label: self.label, 56 | multiplier: self.multiplier, 57 | constant: self.constant, 58 | priority: self.priority 59 | ) 60 | }() 61 | 62 | // MARK: Initialization 63 | 64 | internal init(item: LayoutConstraintItem, attributes: ConstraintAttributes) { 65 | self.item = item 66 | self.attributes = attributes 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintInsetTarget.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 ConstraintInsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintInsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintInsetTarget { 38 | } 39 | 40 | extension Float: ConstraintInsetTarget { 41 | } 42 | 43 | extension Double: ConstraintInsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintInsetTarget { 47 | } 48 | 49 | extension ConstraintInsets: ConstraintInsetTarget { 50 | } 51 | 52 | extension ConstraintInsetTarget { 53 | 54 | internal var constraintInsetTargetValue: ConstraintInsets { 55 | if let amount = self as? ConstraintInsets { 56 | return amount 57 | } else if let amount = self as? Float { 58 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 59 | } else if let amount = self as? Double { 60 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 61 | } else if let amount = self as? CGFloat { 62 | return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount) 63 | } else if let amount = self as? Int { 64 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 65 | } else if let amount = self as? UInt { 66 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 67 | } else { 68 | return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0) 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 9.0, OSX 10.11, *) 32 | public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { 33 | 34 | @discardableResult 35 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 36 | return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure) 37 | } 38 | 39 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 40 | ConstraintMaker.makeConstraints(item: self.guide, closure: closure) 41 | } 42 | 43 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 44 | ConstraintMaker.remakeConstraints(item: self.guide, closure: closure) 45 | } 46 | 47 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 48 | ConstraintMaker.updateConstraints(item: self.guide, closure: closure) 49 | } 50 | 51 | public func removeConstraints() { 52 | ConstraintMaker.removeConstraints(item: self.guide) 53 | } 54 | 55 | public var target: AnyObject? { 56 | return self.guide 57 | } 58 | 59 | internal let guide: ConstraintLayoutGuide 60 | 61 | internal init(guide: ConstraintLayoutGuide) { 62 | self.guide = guide 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintMakerEditable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerEditable: ConstraintMakerPriortizable { 32 | 33 | @discardableResult 34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 35 | self.description.multiplier = amount 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) 42 | } 43 | 44 | @discardableResult 45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { 46 | self.description.constant = amount.constraintOffsetTargetValue 47 | return self 48 | } 49 | 50 | @discardableResult 51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { 52 | self.description.constant = amount.constraintInsetTargetValue 53 | return self 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintMakerExtendable.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 ConstraintMakerExtendable: ConstraintMakerRelatable { 32 | 33 | public var left: ConstraintMakerExtendable { 34 | self.description.attributes += .left 35 | return self 36 | } 37 | 38 | public var top: ConstraintMakerExtendable { 39 | self.description.attributes += .top 40 | return self 41 | } 42 | 43 | public var bottom: ConstraintMakerExtendable { 44 | self.description.attributes += .bottom 45 | return self 46 | } 47 | 48 | public var right: ConstraintMakerExtendable { 49 | self.description.attributes += .right 50 | return self 51 | } 52 | 53 | public var leading: ConstraintMakerExtendable { 54 | self.description.attributes += .leading 55 | return self 56 | } 57 | 58 | public var trailing: ConstraintMakerExtendable { 59 | self.description.attributes += .trailing 60 | return self 61 | } 62 | 63 | public var width: ConstraintMakerExtendable { 64 | self.description.attributes += .width 65 | return self 66 | } 67 | 68 | public var height: ConstraintMakerExtendable { 69 | self.description.attributes += .height 70 | return self 71 | } 72 | 73 | public var centerX: ConstraintMakerExtendable { 74 | self.description.attributes += .centerX 75 | return self 76 | } 77 | 78 | public var centerY: ConstraintMakerExtendable { 79 | self.description.attributes += .centerY 80 | return self 81 | } 82 | 83 | @available(*, deprecated, message:"Use lastBaseline instead") 84 | public var baseline: ConstraintMakerExtendable { 85 | self.description.attributes += .lastBaseline 86 | return self 87 | } 88 | 89 | public var lastBaseline: ConstraintMakerExtendable { 90 | self.description.attributes += .lastBaseline 91 | return self 92 | } 93 | 94 | @available(iOS 8.0, OSX 10.11, *) 95 | public var firstBaseline: ConstraintMakerExtendable { 96 | self.description.attributes += .firstBaseline 97 | return self 98 | } 99 | 100 | @available(iOS 8.0, *) 101 | public var leftMargin: ConstraintMakerExtendable { 102 | self.description.attributes += .leftMargin 103 | return self 104 | } 105 | 106 | @available(iOS 8.0, *) 107 | public var rightMargin: ConstraintMakerExtendable { 108 | self.description.attributes += .rightMargin 109 | return self 110 | } 111 | 112 | @available(iOS 8.0, *) 113 | public var topMargin: ConstraintMakerExtendable { 114 | self.description.attributes += .topMargin 115 | return self 116 | } 117 | 118 | @available(iOS 8.0, *) 119 | public var bottomMargin: ConstraintMakerExtendable { 120 | self.description.attributes += .bottomMargin 121 | return self 122 | } 123 | 124 | @available(iOS 8.0, *) 125 | public var leadingMargin: ConstraintMakerExtendable { 126 | self.description.attributes += .leadingMargin 127 | return self 128 | } 129 | 130 | @available(iOS 8.0, *) 131 | public var trailingMargin: ConstraintMakerExtendable { 132 | self.description.attributes += .trailingMargin 133 | return self 134 | } 135 | 136 | @available(iOS 8.0, *) 137 | public var centerXWithinMargins: ConstraintMakerExtendable { 138 | self.description.attributes += .centerXWithinMargins 139 | return self 140 | } 141 | 142 | @available(iOS 8.0, *) 143 | public var centerYWithinMargins: ConstraintMakerExtendable { 144 | self.description.attributes += .centerYWithinMargins 145 | return self 146 | } 147 | 148 | public var edges: ConstraintMakerExtendable { 149 | self.description.attributes += .edges 150 | return self 151 | } 152 | public var size: ConstraintMakerExtendable { 153 | self.description.attributes += .size 154 | return self 155 | } 156 | 157 | @available(iOS 8.0, *) 158 | public var margins: ConstraintMakerExtendable { 159 | self.description.attributes += .margins 160 | return self 161 | } 162 | 163 | @available(iOS 8.0, *) 164 | public var centerWithinMargins: ConstraintMakerExtendable { 165 | self.description.attributes += .centerWithinMargins 166 | return self 167 | } 168 | 169 | } 170 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintMakerPriortizable.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 ConstraintMakerPriortizable: ConstraintMakerFinalizable { 32 | 33 | @discardableResult 34 | public func priority(_ amount: ConstraintPriority) -> ConstraintMakerFinalizable { 35 | self.description.priority = amount.value 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable { 41 | self.description.priority = amount 42 | return self 43 | } 44 | 45 | @available(*, deprecated, message:"Use priority(.required) instead.") 46 | @discardableResult 47 | public func priorityRequired() -> ConstraintMakerFinalizable { 48 | return self.priority(.required) 49 | } 50 | 51 | @available(*, deprecated, message:"Use priority(.high) instead.") 52 | @discardableResult 53 | public func priorityHigh() -> ConstraintMakerFinalizable { 54 | return self.priority(.high) 55 | } 56 | 57 | @available(*, deprecated, message:"Use priority(.medium) instead.") 58 | @discardableResult 59 | public func priorityMedium() -> ConstraintMakerFinalizable { 60 | return self.priority(.medium) 61 | } 62 | 63 | @available(*, deprecated, message:"Use priority(.low) instead.") 64 | @discardableResult 65 | public func priorityLow() -> ConstraintMakerFinalizable { 66 | return self.priority(.low) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintMakerRelatable.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 ConstraintMakerRelatable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | internal func relatedTo(_ other: ConstraintRelatableTarget, relation: ConstraintRelation, file: String, line: UInt) -> ConstraintMakerEditable { 40 | let related: ConstraintItem 41 | let constant: ConstraintConstantTarget 42 | 43 | if let other = other as? ConstraintItem { 44 | guard other.attributes == ConstraintAttributes.none || 45 | other.attributes.layoutAttributes.count <= 1 || 46 | other.attributes.layoutAttributes == self.description.attributes.layoutAttributes || 47 | other.attributes == .edges && self.description.attributes == .margins || 48 | other.attributes == .margins && self.description.attributes == .edges else { 49 | fatalError("Cannot constraint to multiple non identical attributes. (\(file), \(line))"); 50 | } 51 | 52 | related = other 53 | constant = 0.0 54 | } else if let other = other as? ConstraintView { 55 | related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) 56 | constant = 0.0 57 | } else if let other = other as? ConstraintConstantTarget { 58 | related = ConstraintItem(target: nil, attributes: ConstraintAttributes.none) 59 | constant = other 60 | } else if #available(iOS 9.0, OSX 10.11, *), let other = other as? ConstraintLayoutGuide { 61 | related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) 62 | constant = 0.0 63 | } else { 64 | fatalError("Invalid constraint. (\(file), \(line))") 65 | } 66 | 67 | let editable = ConstraintMakerEditable(self.description) 68 | editable.description.sourceLocation = (file, line) 69 | editable.description.relation = relation 70 | editable.description.related = related 71 | editable.description.constant = constant 72 | return editable 73 | } 74 | 75 | @discardableResult 76 | public func equalTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 77 | return self.relatedTo(other, relation: .equal, file: file, line: line) 78 | } 79 | 80 | @discardableResult 81 | public func equalToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 82 | guard let other = self.description.item.superview else { 83 | fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.") 84 | } 85 | return self.relatedTo(other, relation: .equal, file: file, line: line) 86 | } 87 | 88 | @discardableResult 89 | public func lessThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 90 | return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) 91 | } 92 | 93 | @discardableResult 94 | public func lessThanOrEqualToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { 95 | guard let other = self.description.item.superview else { 96 | fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") 97 | } 98 | return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) 99 | } 100 | 101 | @discardableResult 102 | public func greaterThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 103 | return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) 104 | } 105 | 106 | @discardableResult 107 | public func greaterThanOrEqualToSuperview(_ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { 108 | guard let other = self.description.item.superview else { 109 | fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") 110 | } 111 | return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintPriority.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public struct ConstraintPriority : ExpressibleByFloatLiteral, Equatable, Strideable { 31 | public typealias FloatLiteralType = Float 32 | 33 | public let value: Float 34 | 35 | public init(floatLiteral value: Float) { 36 | self.value = value 37 | } 38 | 39 | public init(_ value: Float) { 40 | self.value = value 41 | } 42 | 43 | public static var required: ConstraintPriority { 44 | return 1000.0 45 | } 46 | 47 | public static var high: ConstraintPriority { 48 | return 750.0 49 | } 50 | 51 | public static var medium: ConstraintPriority { 52 | #if os(OSX) 53 | return 501.0 54 | #else 55 | return 500.0 56 | #endif 57 | 58 | } 59 | 60 | public static var low: ConstraintPriority { 61 | return 250.0 62 | } 63 | 64 | public static func ==(lhs: ConstraintPriority, rhs: ConstraintPriority) -> Bool { 65 | return lhs.value == rhs.value 66 | } 67 | 68 | // MARK: Strideable 69 | 70 | public func advanced(by n: FloatLiteralType) -> ConstraintPriority { 71 | return ConstraintPriority(floatLiteral: value + n) 72 | } 73 | 74 | public func distance(to other: ConstraintPriority) -> FloatLiteralType { 75 | return other.value - value 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | extension ConstraintItem: ConstraintRelatableTarget { 59 | } 60 | 61 | extension ConstraintView: ConstraintRelatableTarget { 62 | } 63 | 64 | @available(iOS 9.0, OSX 10.11, *) 65 | extension ConstraintLayoutGuide: ConstraintRelatableTarget { 66 | } 67 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintView+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 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public extension ConstraintView { 32 | 33 | @available(*, deprecated, message:"Use newer snp.* syntax.") 34 | var snp_left: ConstraintItem { return self.snp.left } 35 | 36 | @available(*, deprecated, message:"Use newer snp.* syntax.") 37 | var snp_top: ConstraintItem { return self.snp.top } 38 | 39 | @available(*, deprecated, message:"Use newer snp.* syntax.") 40 | var snp_right: ConstraintItem { return self.snp.right } 41 | 42 | @available(*, deprecated, message:"Use newer snp.* syntax.") 43 | var snp_bottom: ConstraintItem { return self.snp.bottom } 44 | 45 | @available(*, deprecated, message:"Use newer snp.* syntax.") 46 | var snp_leading: ConstraintItem { return self.snp.leading } 47 | 48 | @available(*, deprecated, message:"Use newer snp.* syntax.") 49 | var snp_trailing: ConstraintItem { return self.snp.trailing } 50 | 51 | @available(*, deprecated, message:"Use newer snp.* syntax.") 52 | var snp_width: ConstraintItem { return self.snp.width } 53 | 54 | @available(*, deprecated, message:"Use newer snp.* syntax.") 55 | var snp_height: ConstraintItem { return self.snp.height } 56 | 57 | @available(*, deprecated, message:"Use newer snp.* syntax.") 58 | var snp_centerX: ConstraintItem { return self.snp.centerX } 59 | 60 | @available(*, deprecated, message:"Use newer snp.* syntax.") 61 | var snp_centerY: ConstraintItem { return self.snp.centerY } 62 | 63 | @available(*, deprecated, message:"Use newer snp.* syntax.") 64 | var snp_baseline: ConstraintItem { return self.snp.baseline } 65 | 66 | @available(*, deprecated, message:"Use newer snp.* syntax.") 67 | @available(iOS 8.0, OSX 10.11, *) 68 | var snp_lastBaseline: ConstraintItem { return self.snp.lastBaseline } 69 | 70 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 71 | @available(iOS 8.0, OSX 10.11, *) 72 | var snp_firstBaseline: ConstraintItem { return self.snp.firstBaseline } 73 | 74 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 75 | @available(iOS 8.0, *) 76 | var snp_leftMargin: ConstraintItem { return self.snp.leftMargin } 77 | 78 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 79 | @available(iOS 8.0, *) 80 | var snp_topMargin: ConstraintItem { return self.snp.topMargin } 81 | 82 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 83 | @available(iOS 8.0, *) 84 | var snp_rightMargin: ConstraintItem { return self.snp.rightMargin } 85 | 86 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 87 | @available(iOS 8.0, *) 88 | var snp_bottomMargin: ConstraintItem { return self.snp.bottomMargin } 89 | 90 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 91 | @available(iOS 8.0, *) 92 | var snp_leadingMargin: ConstraintItem { return self.snp.leadingMargin } 93 | 94 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 95 | @available(iOS 8.0, *) 96 | var snp_trailingMargin: ConstraintItem { return self.snp.trailingMargin } 97 | 98 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 99 | @available(iOS 8.0, *) 100 | var snp_centerXWithinMargins: ConstraintItem { return self.snp.centerXWithinMargins } 101 | 102 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 103 | @available(iOS 8.0, *) 104 | var snp_centerYWithinMargins: ConstraintItem { return self.snp.centerYWithinMargins } 105 | 106 | @available(*, deprecated, message:"Use newer snp.* syntax.") 107 | var snp_edges: ConstraintItem { return self.snp.edges } 108 | 109 | @available(*, deprecated, message:"Use newer snp.* syntax.") 110 | var snp_size: ConstraintItem { return self.snp.size } 111 | 112 | @available(*, deprecated, message:"Use newer snp.* syntax.") 113 | var snp_center: ConstraintItem { return self.snp.center } 114 | 115 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 116 | @available(iOS 8.0, *) 117 | var snp_margins: ConstraintItem { return self.snp.margins } 118 | 119 | @available(iOS, deprecated, message:"Use newer snp.* syntax.") 120 | @available(iOS 8.0, *) 121 | var snp_centerWithinMargins: ConstraintItem { return self.snp.centerWithinMargins } 122 | 123 | @available(*, deprecated, message:"Use newer snp.* syntax.") 124 | func snp_prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 125 | return self.snp.prepareConstraints(closure) 126 | } 127 | 128 | @available(*, deprecated, message:"Use newer snp.* syntax.") 129 | func snp_makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 130 | self.snp.makeConstraints(closure) 131 | } 132 | 133 | @available(*, deprecated, message:"Use newer snp.* syntax.") 134 | func snp_remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 135 | self.snp.remakeConstraints(closure) 136 | } 137 | 138 | @available(*, deprecated, message:"Use newer snp.* syntax.") 139 | func snp_updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 140 | self.snp.updateConstraints(closure) 141 | } 142 | 143 | @available(*, deprecated, message:"Use newer snp.* syntax.") 144 | func snp_removeConstraints() { 145 | self.snp.removeConstraints() 146 | } 147 | 148 | var snp: ConstraintViewDSL { 149 | return ConstraintViewDSL(view: self) 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/ConstraintViewDSL.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 struct ConstraintViewDSL: ConstraintAttributesDSL { 32 | 33 | @discardableResult 34 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 35 | return ConstraintMaker.prepareConstraints(item: self.view, closure: closure) 36 | } 37 | 38 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 39 | ConstraintMaker.makeConstraints(item: self.view, closure: closure) 40 | } 41 | 42 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 43 | ConstraintMaker.remakeConstraints(item: self.view, closure: closure) 44 | } 45 | 46 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 47 | ConstraintMaker.updateConstraints(item: self.view, closure: closure) 48 | } 49 | 50 | public func removeConstraints() { 51 | ConstraintMaker.removeConstraints(item: self.view) 52 | } 53 | 54 | public var contentHuggingHorizontalPriority: Float { 55 | get { 56 | return self.view.contentHuggingPriority(for: .horizontal).rawValue 57 | } 58 | set { 59 | self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal) 60 | } 61 | } 62 | 63 | public var contentHuggingVerticalPriority: Float { 64 | get { 65 | return self.view.contentHuggingPriority(for: .vertical).rawValue 66 | } 67 | set { 68 | self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .vertical) 69 | } 70 | } 71 | 72 | public var contentCompressionResistanceHorizontalPriority: Float { 73 | get { 74 | return self.view.contentCompressionResistancePriority(for: .horizontal).rawValue 75 | } 76 | set { 77 | self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .horizontal) 78 | } 79 | } 80 | 81 | public var contentCompressionResistanceVerticalPriority: Float { 82 | get { 83 | return self.view.contentCompressionResistancePriority(for: .vertical).rawValue 84 | } 85 | set { 86 | self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .vertical) 87 | } 88 | } 89 | 90 | public var target: AnyObject? { 91 | return self.view 92 | } 93 | 94 | internal let view: ConstraintView 95 | 96 | internal init(view: ConstraintView) { 97 | self.view = view 98 | 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | let areLayoutAnchorsEqual: Bool 48 | if #available(iOS 10.0, OSXApplicationExtension 10.12, *) { 49 | areLayoutAnchorsEqual = lhs.firstAnchor === rhs.firstAnchor && 50 | lhs.secondAnchor === rhs.secondAnchor 51 | } else { 52 | areLayoutAnchorsEqual = lhs.firstItem === rhs.firstItem && 53 | lhs.secondItem === rhs.secondItem && 54 | lhs.firstAttribute == rhs.firstAttribute && 55 | lhs.secondAttribute == rhs.secondAttribute 56 | } 57 | return areLayoutAnchorsEqual && 58 | lhs.relation == rhs.relation && 59 | lhs.priority == rhs.priority && 60 | lhs.multiplier == rhs.multiplier 61 | } 62 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/LayoutConstraintItem.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 LayoutConstraintItem: class { 32 | } 33 | 34 | @available(iOS 9.0, OSX 10.11, *) 35 | extension ConstraintLayoutGuide : LayoutConstraintItem { 36 | } 37 | 38 | extension ConstraintView : LayoutConstraintItem { 39 | } 40 | 41 | 42 | extension LayoutConstraintItem { 43 | 44 | internal func prepare() { 45 | if let view = self as? ConstraintView { 46 | view.translatesAutoresizingMaskIntoConstraints = false 47 | } 48 | } 49 | 50 | internal var superview: ConstraintView? { 51 | if let view = self as? ConstraintView { 52 | return view.superview 53 | } 54 | 55 | if #available(iOS 9.0, OSX 10.11, *), let guide = self as? ConstraintLayoutGuide { 56 | return guide.owningView 57 | } 58 | 59 | return nil 60 | } 61 | internal var constraints: [Constraint] { 62 | return self.constraintsSet.allObjects as! [Constraint] 63 | } 64 | 65 | internal func add(constraints: [Constraint]) { 66 | let constraintsSet = self.constraintsSet 67 | for constraint in constraints { 68 | constraintsSet.add(constraint) 69 | } 70 | } 71 | 72 | internal func remove(constraints: [Constraint]) { 73 | let constraintsSet = self.constraintsSet 74 | for constraint in constraints { 75 | constraintsSet.remove(constraint) 76 | } 77 | } 78 | 79 | private var constraintsSet: NSMutableSet { 80 | let constraintsSet: NSMutableSet 81 | 82 | if let existing = objc_getAssociatedObject(self, &constraintsKey) as? NSMutableSet { 83 | constraintsSet = existing 84 | } else { 85 | constraintsSet = NSMutableSet() 86 | objc_setAssociatedObject(self, &constraintsKey, constraintsSet, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 87 | } 88 | return constraintsSet 89 | 90 | } 91 | 92 | } 93 | private var constraintsKey: UInt8 = 0 94 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/SnapKit/Source/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_IQKeyboardManagerSwift : NSObject 3 | @end 4 | @implementation PodsDummy_IQKeyboardManagerSwift 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift-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 IQKeyboardManagerSwiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char IQKeyboardManagerSwiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift.modulemap: -------------------------------------------------------------------------------- 1 | framework module IQKeyboardManagerSwift { 2 | umbrella header "IQKeyboardManagerSwift-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/IQKeyboardManagerSwift/IQKeyboardManagerSwift.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Foundation" -framework "QuartzCore" -framework "UIKit" 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/IQKeyboardManagerSwift 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProject/Pods-TemplateProject-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TemplateProject : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TemplateProject 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProject/Pods-TemplateProject-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_TemplateProjectVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_TemplateProjectVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProject/Pods-TemplateProject.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 7 | OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "Differentiator" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "Kingfisher" -framework "QuartzCore" -framework "RxAlamofire" -framework "RxCocoa" -framework "RxDataSources" -framework "RxRelay" -framework "RxSwift" -framework "SVProgressHUD" -framework "SnapKit" -framework "UIKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProject/Pods-TemplateProject.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_TemplateProject { 2 | umbrella header "Pods-TemplateProject-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProject/Pods-TemplateProject.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 7 | OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "Differentiator" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "Kingfisher" -framework "QuartzCore" -framework "RxAlamofire" -framework "RxCocoa" -framework "RxDataSources" -framework "RxRelay" -framework "RxSwift" -framework "SVProgressHUD" -framework "SnapKit" -framework "UIKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectDev/Pods-TemplateProjectDev-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TemplateProjectDev : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TemplateProjectDev 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectDev/Pods-TemplateProjectDev-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_TemplateProjectDevVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_TemplateProjectDevVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectDev/Pods-TemplateProjectDev.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 7 | OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "Differentiator" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "Kingfisher" -framework "QuartzCore" -framework "RxAlamofire" -framework "RxCocoa" -framework "RxDataSources" -framework "RxRelay" -framework "RxSwift" -framework "SVProgressHUD" -framework "SnapKit" -framework "UIKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectDev/Pods-TemplateProjectDev.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_TemplateProjectDev { 2 | umbrella header "Pods-TemplateProjectDev-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectDev/Pods-TemplateProjectDev.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 7 | OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "Differentiator" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "Kingfisher" -framework "QuartzCore" -framework "RxAlamofire" -framework "RxCocoa" -framework "RxDataSources" -framework "RxRelay" -framework "RxSwift" -framework "SVProgressHUD" -framework "SnapKit" -framework "UIKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectTests/Pods-TemplateProjectTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TemplateProjectTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TemplateProjectTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectTests/Pods-TemplateProjectTests-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_TemplateProjectTestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_TemplateProjectTestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectTests/Pods-TemplateProjectTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 7 | OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "Differentiator" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "Kingfisher" -framework "QuartzCore" -framework "RxAlamofire" -framework "RxCocoa" -framework "RxDataSources" -framework "RxRelay" -framework "RxSwift" -framework "SVProgressHUD" -framework "SnapKit" -framework "UIKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectTests/Pods-TemplateProjectTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_TemplateProjectTests { 2 | umbrella header "Pods-TemplateProjectTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TemplateProjectTests/Pods-TemplateProjectTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator/Differentiator.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire/RxAlamofire.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources/RxDataSources.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Differentiator" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxAlamofire" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxDataSources" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" 7 | OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "Differentiator" -framework "Foundation" -framework "IQKeyboardManagerSwift" -framework "Kingfisher" -framework "QuartzCore" -framework "RxAlamofire" -framework "RxCocoa" -framework "RxDataSources" -framework "RxRelay" -framework "RxSwift" -framework "SVProgressHUD" -framework "SnapKit" -framework "UIKit" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SnapKit/SnapKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Template project iOS 2 | Mobile template is written with Swift 5.0. This template project include bunch of 3rd frameworks and class extensions for you easy to create new project without waste time to add common Utilities. 3 | ## Architecture 4 | Choose what ever architechture you want 5 | ## Fastlane 6 | This project already setup with fastlane, navigate to project folder, open fast file and modify setting for CI. 7 | 8 | ## Libraries 9 | - RxAlamofire 10 | - RxSwift 11 | - RxCocoa 12 | Bring power of ReactiveX to Swift 13 | 14 | - Kingfisher: Set and cache image simply with URL 15 | - IQKeyboardManagerSwift: Automatic handle keyboard on ScrollView. 16 | - SnapKit: Autolayout easy than ever. 17 | 18 | ## How to run 19 | - Install cocoapods if you MAC didn't `brew install cocoapods` 20 | - Todo: Rename project by cd to project folder and run `sh ./setup.sh` enter your app name, bunderId then press ⏎ 21 | - Open `*.xcworkspace` 22 | - Cmd + R to run 23 | -------------------------------------------------------------------------------- /TemplateProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TemplateProject.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TemplateProject.xcodeproj/xcshareddata/xcschemes/TemplateProject.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /TemplateProject.xcodeproj/xcshareddata/xcschemes/TemplateProjectDev.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /TemplateProject.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TemplateProject.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TemplateProject/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 24 | } 25 | 26 | func applicationDidEnterBackground(_ application: UIApplication) { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | func applicationWillEnterForeground(_ application: UIApplication) { 32 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 33 | } 34 | 35 | func applicationDidBecomeActive(_ application: UIApplication) { 36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 | } 38 | 39 | func applicationWillTerminate(_ application: UIApplication) { 40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 | } 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /TemplateProject/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /TemplateProject/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /TemplateProject/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 | -------------------------------------------------------------------------------- /TemplateProject/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 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/Error+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error+Extension.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | enum NetworkError:Error { 11 | case Error(message:String) 12 | } 13 | extension Error { 14 | func description() -> String { 15 | if let error = self as? NetworkError { 16 | switch error { 17 | case .Error(message: let message): 18 | return message 19 | } 20 | }else { 21 | return self.localizedDescription 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/NSObject+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Extension.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension NSObject { 13 | class var nameOfClass: String { 14 | return NSStringFromClass(self).components(separatedBy: ".").last! as String 15 | } 16 | 17 | //用于获取 cell 的 reuse identifier 18 | class var identifier: String { 19 | return String(format: "%@Identifier", self.nameOfClass) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/RxSwift+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RxSwift+Extension.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Foundation 11 | import RxSwift 12 | import RxCocoa 13 | 14 | infix operator <-> 15 | 16 | @discardableResult func <->(property: ControlProperty, behaviorReplay: BehaviorRelay) -> Disposable { 17 | let behaviorReplayToProperty = behaviorReplay.asObservable().distinctUntilChanged() 18 | .bind(to: property) 19 | 20 | let propertyToBehaviorReplay = property 21 | .subscribe( 22 | onNext: { behaviorReplay.accept($0)}, 23 | onCompleted: { behaviorReplayToProperty.dispose() } 24 | ) 25 | return Disposables.create(behaviorReplayToProperty, propertyToBehaviorReplay) 26 | } 27 | 28 | @discardableResult func <->(property: ControlProperty, publishSubject: PublishSubject) -> Disposable { 29 | let publishSubjectToProperty = publishSubject.asObservable() 30 | .bind(to: property) 31 | 32 | let propertyToPublishSubject = property 33 | .subscribe( 34 | onNext: { publishSubject.onNext($0)}, 35 | onCompleted: { publishSubjectToProperty.dispose() } 36 | ) 37 | return Disposables.create(publishSubjectToProperty, propertyToPublishSubject) 38 | } 39 | 40 | @discardableResult func <->(property: ControlProperty, behaviorSubject: BehaviorSubject) -> Disposable { 41 | let behaviorSubjectToProperty = behaviorSubject.asObservable() 42 | .bind(to: property) 43 | 44 | let propertyToBehaviorSubject = property 45 | .subscribe( 46 | onNext: { behaviorSubject.onNext($0)}, 47 | onCompleted: { behaviorSubjectToProperty.dispose() } 48 | ) 49 | return Disposables.create(behaviorSubjectToProperty, propertyToBehaviorSubject) 50 | } 51 | 52 | @discardableResult func <->(property: ControlProperty, replaySubject: ReplaySubject) -> Disposable { 53 | let replaySubjectToProperty = replaySubject.asObservable() 54 | .bind(to: property) 55 | 56 | let propertyToReplaySubject = property 57 | .subscribe( 58 | onNext: { replaySubject.onNext($0)}, 59 | onCompleted: { replaySubjectToProperty.dispose() } 60 | ) 61 | return Disposables.create(replaySubjectToProperty, propertyToReplaySubject) 62 | } 63 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/UIColor+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Extension.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | extension UIColor { 11 | convenience init(red: Double, green: Double, blue: Double) { 12 | self.init(red: CGFloat(red)/255, green: CGFloat(green)/255, blue: CGFloat(blue)/255, alpha: 1.0) 13 | } 14 | class func colorWithHex( hex:UInt ) -> UIColor { 15 | 16 | var redChannel, greenChannel, blueChannel:CGFloat 17 | 18 | redChannel = CGFloat((hex >> 16) & 0xff) / 0xff 19 | greenChannel = CGFloat((hex >> 8) & 0xff) / 0xff 20 | blueChannel = CGFloat((hex >> 0) & 0xff) / 0xff 21 | 22 | return UIColor(red: redChannel, green: greenChannel, blue: blueChannel, alpha: 1.0) 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/UIImageView+Kingfishser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+Kingfishser.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | import Kingfisher 12 | 13 | public extension UIImageView { 14 | 15 | func setImageWithURLString(URLString: String, placeholderImage placeholder: UIImage? = nil) { 16 | guard let URL = URL(string: URLString) else { 17 | print("URL wrong") 18 | return 19 | } 20 | 21 | self.kf.setImage(with: URL, placeholder: placeholder) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/UISearchBar+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UISearchBar+Extension.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UISearchBar { 13 | 14 | var searchTextField: UITextField { 15 | get { 16 | var textfield = UITextField() 17 | for view in self.subviews { 18 | for subView in view.subviews { 19 | if subView.isKind(of: UITextField.self) { 20 | textfield = subView as! UITextField 21 | return textfield 22 | } 23 | } 24 | } 25 | return textfield 26 | } 27 | } 28 | 29 | var cancelButton: UIButton { 30 | get { 31 | var button = UIButton() 32 | for view in self.subviews { 33 | for subView in view.subviews { 34 | if subView is UIButton { 35 | button = subView as! UIButton 36 | return button 37 | } 38 | } 39 | } 40 | return button 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/UIView+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Extension.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIView { 13 | func border(color: UIColor = UIColor.clear, radius: CGFloat = 0, width: CGFloat = 0) { 14 | self.layer.borderWidth = width 15 | self.layer.borderColor = color.cgColor 16 | self.layer.cornerRadius = radius 17 | self.layer.masksToBounds = true 18 | } 19 | var sizeWidth: CGFloat { 20 | get { return self.frame.size.width } 21 | set { 22 | var frame = self.frame 23 | frame.size.width = newValue 24 | self.frame = frame 25 | } 26 | } 27 | 28 | var sizeHeight: CGFloat { 29 | get { return self.frame.size.height } 30 | set { 31 | var frame = self.frame 32 | frame.size.height = newValue 33 | self.frame = frame 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /TemplateProject/Extensions/UIViewController+Alert.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Alert.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | extension UIViewController { 12 | func showAlert(title:String?, 13 | message: String,_ 14 | actions:UIAlertAction...) { 15 | 16 | let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) 17 | for action in actions { 18 | alert.addAction(action) 19 | } 20 | self.present(alert, animated: true, completion: nil) 21 | } 22 | func showAlertAction(title:String?, 23 | message: String?,_ 24 | actions:UIAlertAction...) { 25 | 26 | let alert = UIAlertController(title: title, message: message, preferredStyle: .actionSheet) 27 | for action in actions { 28 | alert.addAction(action) 29 | } 30 | self.present(alert, animated: true, completion: nil) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /TemplateProject/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /TemplateProject/TemplateProjectDevInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /TemplateProject/Utils/Const.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Const.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | -------------------------------------------------------------------------------- /TemplateProject/Utils/Network/APIEndpoint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // APIEndpoint.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class APIEndpoint { 12 | #if DEVELOPMENT 13 | public static let baseURL: String = "https://dev.com" 14 | #else //Production 15 | public static let baseURL: String = "https://production.com" 16 | #endif 17 | } 18 | -------------------------------------------------------------------------------- /TemplateProject/Utils/Network/APIEngine.swift: -------------------------------------------------------------------------------- 1 | // 2 | // APIEngine.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Alamofire 11 | import RxAlamofire 12 | import RxSwift 13 | 14 | class APIEngine { 15 | static func queryData (method: HTTPMethod, url:URLConvertible, parameters: [String:Any]?, header: [String: String]?) -> Observable { 16 | return RxAlamofire.requestData(method, url, parameters: parameters, encoding: JSONEncoding.default, headers: header).mapObject(type: T.self) 17 | } 18 | static func queryArrayData (method: HTTPMethod, url:URLConvertible, parameters: [String:Any]?, header: [String: String]?) -> Observable<[T]> { 19 | return RxAlamofire.requestData(method, url, parameters: parameters, encoding: JSONEncoding.default, headers: header).mapArray(type: T.self) 20 | } 21 | } 22 | extension ObservableType { 23 | 24 | public func mapObject(type: T.Type) -> Observable { 25 | return flatMap { data -> Observable in 26 | 27 | let invalidJSON = NetworkError.Error(message: "Invalid Response") 28 | 29 | guard let (httpResponse, jsonData) = data as? (HTTPURLResponse, Data) else { 30 | throw invalidJSON 31 | } 32 | 33 | guard (200..<300).contains(httpResponse.statusCode) 34 | else { 35 | if let jsonDict = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: Any], 36 | let message = jsonDict["error"] as? String { 37 | throw NetworkError.Error(message: message) 38 | } 39 | throw invalidJSON 40 | } 41 | 42 | #if DEVELOPMENT 43 | print("\(String(describing: httpResponse.allHeaderFields.debugDescription))------------------------") 44 | print(String(data: jsonData, encoding:.utf8)?.replacingOccurrences(of: "\"", with: "", options: .literal, range: nil) as Any ) 45 | #endif 46 | 47 | let decoder = JSONDecoder() 48 | decoder.keyDecodingStrategy = .convertFromSnakeCase 49 | decoder.dateDecodingStrategy = .iso8601 50 | 51 | do { 52 | let object = try decoder.decode(T.self, from: jsonData) 53 | return Observable.just(object) 54 | } catch { 55 | throw invalidJSON 56 | } 57 | } 58 | } 59 | 60 | public func mapArray(type: T.Type) -> Observable<[T]> { 61 | return flatMap { data -> Observable<[T]> in 62 | 63 | let invalidJSON = NetworkError.Error(message: "Invalid Response") 64 | 65 | guard let (httpResponse, jsonData) = data as? (HTTPURLResponse, Data) else { 66 | throw invalidJSON 67 | } 68 | 69 | guard (200..<300).contains(httpResponse.statusCode) 70 | else { 71 | if let jsonDict = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: Any], 72 | let message = jsonDict["error"] as? String { 73 | throw NetworkError.Error(message: message) 74 | } 75 | throw invalidJSON 76 | } 77 | 78 | #if DEVELOPMENT 79 | print("\(String(describing: httpResponse.allHeaderFields.debugDescription))------------------------") 80 | print(String(data: jsonData, encoding:.utf8)?.replacingOccurrences(of: "\"", with: "", options: .literal, range: nil) as Any ) 81 | #endif 82 | 83 | let decoder = JSONDecoder() 84 | decoder.keyDecodingStrategy = .convertFromSnakeCase 85 | decoder.dateDecodingStrategy = .iso8601 86 | 87 | //=> handle backend may wrape array in key data 88 | 89 | if let jsonDict = try? JSONSerialization.jsonObject(with: jsonData, options: []) as? [String: Any], 90 | let jsonArr = jsonDict["data"] as? [[String: Any]], 91 | let data = try? JSONSerialization.data(withJSONObject: jsonArr, options: []), 92 | let object = try? decoder.decode([T].self, from: data) { 93 | return Observable.just(object) 94 | } else if let object = try? decoder.decode([T].self, from: jsonData) { 95 | return Observable.just(object) 96 | } else { 97 | throw invalidJSON 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /TemplateProject/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TemplateProject 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | 14 | 15 | //Remember set carashlytic token build secret and emails in fastfile 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | } 21 | 22 | override func didReceiveMemoryWarning() { 23 | super.didReceiveMemoryWarning() 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TemplateProjectTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TemplateProjectTests/TemplateProjectTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TemplateProjectTests.swift 3 | // TemplateProjectTests 4 | // 5 | // Created by TrungPhan on 7/4/18. 6 | // Copyright © 2018 Dwarvesv. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import TemplateProject 11 | 12 | class TemplateProjectTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "com.dwarvesv.TemplateProject.Dev" # The bundle identifier of your app 2 | apple_id "trungpv@dwarvesv.com" # Your Apple email address 3 | 4 | team_id "W777S7V8TN" # Developer Portal Team ID 5 | 6 | # For more information about the Appfile, see: 7 | # https://docs.fastlane.tools/advanced/#appfile 8 | -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | # This file contains the fastlane.tools configuration 2 | # You can find the documentation at https://docs.fastlane.tools 3 | # 4 | # For a list of all available actions, check out 5 | # 6 | # https://docs.fastlane.tools/actions 7 | # 8 | # For a list of all available plugins, check out 9 | # 10 | # https://docs.fastlane.tools/plugins/available-plugins 11 | # 12 | 13 | # Uncomment the line if you want fastlane to automatically update itself 14 | # update_fastlane 15 | 16 | default_platform(:ios) 17 | #SET APP NAME AND LIST EMAIL TO RECEIPT BUILD, ALSO ADD TEST DEVICE UUID AT ITUNE CONNECT DEVICE ID AND REBUILD 18 | APP_NAME = "TemplateProject" 19 | EMAILS = ['hieupq@dwarvesv.com', 'quang@dwarvesv.com', 'han@dwarvesv.com', 'trungpv@dwarvesv.com', 'tungnt@dwarvesv.com'] 20 | Crashlytics_api_token = '' 21 | Crashlytics_build_secret = '' 22 | platform :ios do 23 | before_all do 24 | # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." 25 | 26 | cocoapods 27 | end 28 | desc "Runs all the tests" 29 | lane :test do 30 | scan 31 | end 32 | 33 | desc "Release to fabric when merge to develop branch" 34 | lane :fabric do |values| 35 | match(type: "development") 36 | gym(scheme: APP_NAME, export_method: "development") 37 | 38 | emails = values[:test_email] ? values[:test_email] : EMAILS 39 | groups = values[:test_email] ? nil : nil 40 | # crashlytics(api_token: Crashlytics_api_token, 41 | # build_secret: Crashlytics_build_secret, 42 | # emails: emails, 43 | # groups: groups, 44 | # notes: 'Distributed with fastlane', # Check out the changelog_from_git_commits action 45 | # notifications: true) # Should this distribution notify your testers via email? 46 | end 47 | 48 | desc "Submit a new Beta Build to Apple TestFlight" 49 | desc "This will also make sure the profile is up to date" 50 | lane :beta do 51 | match(type: "appstore") # more information: https://codesigning.guide 52 | 53 | gym(scheme: APP_NAME) # Build your app - more options available 54 | pilot 55 | # sh "your_script.sh" 56 | # You can also use other beta testing services here (run `fastlane actions`) 57 | end 58 | 59 | desc "Deploy a new version to the App Store" 60 | lane :release do 61 | match(type: "appstore") 62 | # snapshot 63 | 64 | gym(scheme: APP_NAME) # Build your app - more options available 65 | deliver(force: true) 66 | 67 | # frameit 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /fastlane/Matchfile: -------------------------------------------------------------------------------- 1 | git_url "git@git.dwarvesf.com:mobile/ios-certificates.git" 2 | 3 | type "development" # The default type, can be: appstore, adhoc, enterprise or development 4 | 5 | username "trungpv@dwarvesv.com" # Your Apple Developer Portal username 6 | 7 | # For all available options run `fastlane match --help` 8 | # Remove the # in the beginning of the line to enable the other options 9 | 10 | 11 | app_identifier ["com.dwarvesv.TemplateProject","com.dwarvesv.TemplateProject.Dev"] # The bundle identifier of your app 12 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | 2 | function read_param () { 3 | TEMP_INPUT="" 4 | while [ "$TEMP_INPUT" == "" ] 5 | do 6 | read -p "Enter $1: " TEMP_INPUT 7 | done 8 | eval "$2='$TEMP_INPUT'" 9 | } 10 | 11 | function replace_content_file () { 12 | local FILE_NAME=$1 13 | local OLD=$2 14 | local NEW=$3 15 | sed "s/${OLD}/${NEW}/g" $FILE_NAME > $FILE_NAME.bak 16 | mv -f $FILE_NAME.bak $FILE_NAME 17 | rm -f $FILE_NAME.bak 18 | } 19 | 20 | BASE_PROJECT_NAME="TemplateProject" 21 | BASE_BUNDLE_PROJECT_ID="com.dwarvesv.TemplateProject" 22 | NEW_PROJECT_NAME="TemplateProject" 23 | BUNDLE_PROJECT_ID="com.dwarvesv.TemplateProject" 24 | 25 | echo "iOS template project setup script" 26 | echo "=================================" 27 | echo "--> Input initialize values" 28 | 29 | read_param "project name ($BASE_PROJECT_NAME)" NEW_PROJECT_NAME 30 | echo $NEW_PROJECT_NAME 31 | 32 | read_param "bundle id ($BASE_BUNDLE_PROJECT_ID)" BUNDLE_PROJECT_ID 33 | echo $BUNDLE_PROJECT_ID 34 | 35 | ## Init project params 36 | TEST_STR="Tests" 37 | DEV_STR="Dev" 38 | XCODEPROJ_FILE="./$BASE_PROJECT_NAME.xcodeproj" 39 | NEW_XCODEPROJ_FILE="./$NEW_PROJECT_NAME.xcodeproj" 40 | PBPROJECT_FILE="$XCODEPROJ_FILE/project.pbxproj" 41 | SCHEMA_FILE="$XCODEPROJ_FILE/xcshareddata/xcschemes/$BASE_PROJECT_NAME.xcscheme" 42 | DEV_SCHEMA_FILE="$XCODEPROJ_FILE/xcshareddata/xcschemes/$BASE_PROJECT_NAME$DEV_STR.xcscheme" 43 | WORKSPACE_DATA_FILE="$XCODEPROJ_FILE/project.xcworkspace/contents.xcworkspacedata" 44 | NEW_SCHEMA_FILE="$XCODEPROJ_FILE/xcshareddata/xcschemes/$NEW_PROJECT_NAME.xcscheme" 45 | NEW_DEV_SCHEMA_FILE="$XCODEPROJ_FILE/xcshareddata/xcschemes/$NEW_PROJECT_NAME$DEV_STR.xcscheme" 46 | 47 | echo "--> Modify $XCODEPROJ_FILE content" 48 | 49 | ### Replace bundle id 50 | replace_content_file $PBPROJECT_FILE $BASE_BUNDLE_PROJECT_ID $BUNDLE_PROJECT_ID 51 | 52 | ### Replace project name 53 | replace_content_file $PBPROJECT_FILE $BASE_PROJECT_NAME $NEW_PROJECT_NAME 54 | 55 | ### Replace workspace data 56 | replace_content_file $WORKSPACE_DATA_FILE $BASE_PROJECT_NAME $NEW_PROJECT_NAME 57 | 58 | ### Replace schema file 59 | replace_content_file $SCHEMA_FILE $BASE_PROJECT_NAME $NEW_PROJECT_NAME 60 | 61 | ### Replace dev schema file 62 | replace_content_file $DEV_SCHEMA_FILE $BASE_PROJECT_NAME $NEW_PROJECT_NAME 63 | 64 | ### Rename schema files 65 | mv -f $SCHEMA_FILE $NEW_SCHEMA_FILE 66 | mv -f $DEV_SCHEMA_FILE $NEW_DEV_SCHEMA_FILE 67 | 68 | echo "--> Modify ./$BASE_PROJECT_NAME$TEST_STR content" 69 | 70 | ### Replace test folder 71 | OLD_TEST_FOLDER="./$BASE_PROJECT_NAME$TEST_STR" 72 | OLD_TEST_FILE="./$BASE_PROJECT_NAME$TEST_STR/$BASE_PROJECT_NAME$TEST_STR.swift" 73 | NEW_TEST_FOLDER="./$NEW_PROJECT_NAME$TEST_STR" 74 | NEW_TEST_FILE_NAME="$NEW_PROJECT_NAME$TEST_STR.swift" 75 | DEV_STR="DevInfo" 76 | DEV_PLIST="./$BASE_PROJECT_NAME/$BASE_PROJECT_NAME$DEV_STR.plist" 77 | NEW_DEV_PLIST="./$BASE_PROJECT_NAME/$NEW_PROJECT_NAME$DEV_STR.plist" 78 | 79 | ### Replace unit test content 80 | replace_content_file $OLD_TEST_FILE $BASE_PROJECT_NAME $NEW_PROJECT_NAME 81 | 82 | mv $OLD_TEST_FILE "$OLD_TEST_FOLDER/$NEW_TEST_FILE_NAME" 83 | mv $OLD_TEST_FOLDER $NEW_TEST_FOLDER 84 | mv $XCODEPROJ_FILE $NEW_XCODEPROJ_FILE 85 | mv $DEV_PLIST $NEW_DEV_PLIST 86 | mv "./$BASE_PROJECT_NAME" "./$NEW_PROJECT_NAME" 87 | 88 | echo "--> Modify Podfile and generate xcworkspace" 89 | 90 | ### Replace podfile content 91 | PODFILE="Podfile" 92 | rm -rf ./Pods 93 | rm -rf "$BASE_PROJECT_NAME.xcworkspace" 94 | replace_content_file $PODFILE $BASE_PROJECT_NAME $NEW_PROJECT_NAME 95 | 96 | pod install 97 | 98 | open ./$NEW_PROJECT_NAME.xcworkspace 99 | 100 | echo "--> Git init" 101 | 102 | rm -rf .git/ 103 | git init 104 | git add . 105 | git commit -m "Init Project" 106 | --------------------------------------------------------------------------------