├── .github
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ ├── publish-to-trunk-workflow.yml
│ └── pull-request-workflow.yml
├── .gitignore
├── .ruby-version
├── .xcode-version
├── Example
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Local Podspecs
│ │ └── ScrollingStackViewController.podspec.json
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Target Support Files
│ │ ├── Pods-ScrollingStackViewController_Example
│ │ ├── Info.plist
│ │ ├── Pods-ScrollingStackViewController_Example-Info.plist
│ │ ├── Pods-ScrollingStackViewController_Example-acknowledgements.markdown
│ │ ├── Pods-ScrollingStackViewController_Example-acknowledgements.plist
│ │ ├── Pods-ScrollingStackViewController_Example-dummy.m
│ │ ├── Pods-ScrollingStackViewController_Example-frameworks.sh
│ │ ├── Pods-ScrollingStackViewController_Example-resources.sh
│ │ ├── Pods-ScrollingStackViewController_Example-umbrella.h
│ │ ├── Pods-ScrollingStackViewController_Example.debug.xcconfig
│ │ ├── Pods-ScrollingStackViewController_Example.modulemap
│ │ └── Pods-ScrollingStackViewController_Example.release.xcconfig
│ │ ├── Pods-ScrollingStackViewController_Tests
│ │ ├── Info.plist
│ │ ├── Pods-ScrollingStackViewController_Tests-Info.plist
│ │ ├── Pods-ScrollingStackViewController_Tests-acknowledgements.markdown
│ │ ├── Pods-ScrollingStackViewController_Tests-acknowledgements.plist
│ │ ├── Pods-ScrollingStackViewController_Tests-dummy.m
│ │ ├── Pods-ScrollingStackViewController_Tests-frameworks.sh
│ │ ├── Pods-ScrollingStackViewController_Tests-resources.sh
│ │ ├── Pods-ScrollingStackViewController_Tests-umbrella.h
│ │ ├── Pods-ScrollingStackViewController_Tests.debug.xcconfig
│ │ ├── Pods-ScrollingStackViewController_Tests.modulemap
│ │ └── Pods-ScrollingStackViewController_Tests.release.xcconfig
│ │ └── ScrollingStackViewController
│ │ ├── Info.plist
│ │ ├── ScrollingStackViewController-Info.plist
│ │ ├── ScrollingStackViewController-dummy.m
│ │ ├── ScrollingStackViewController-prefix.pch
│ │ ├── ScrollingStackViewController-umbrella.h
│ │ ├── ScrollingStackViewController.modulemap
│ │ └── ScrollingStackViewController.xcconfig
├── ScrollingStackViewController.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── ScrollingStackViewController-Example.xcscheme
├── ScrollingStackViewController.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── ScrollingStackViewController
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── SegmentController.swift
│ └── ViewController.swift
└── Tests
│ ├── Info.plist
│ ├── ScrollingStackViewInsertionLocationTests.swift
│ ├── ScrollingStackViewTests.swift
│ ├── UnitTests.xctestplan
│ └── Utilities
│ └── Factory.swift
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── Package.swift
├── README.md
├── ScrollingStackViewController.podspec
├── ScrollingStackViewController
├── Assets
│ └── .gitkeep
└── Classes
│ ├── .gitkeep
│ └── ScrollingStackViewController.swift
├── _Pods.xcodeproj
├── fastlane
├── Fastfile
└── README.md
└── img
├── banner.png
└── demo.gif
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Description
4 |
5 |
6 | ## Motivation and Context
7 |
8 |
9 |
10 | ## How Has This Been Tested?
11 |
12 |
13 |
14 |
15 | ## Screenshots (if appropriate):
16 |
17 | ## Types of changes
18 |
19 | - [ ] Bug fix (non-breaking change which fixes an issue)
20 | - [ ] New feature (non-breaking change which adds functionality)
21 | - [ ] Breaking change (fix or feature that would cause existing functionality to change)
22 |
23 | ## Checklist:
24 |
25 |
26 | - [ ] My code follows the code style of this project.
27 | - [ ] My change requires a change to the documentation.
28 | - [ ] I have updated the documentation accordingly.
29 |
--------------------------------------------------------------------------------
/.github/workflows/publish-to-trunk-workflow.yml:
--------------------------------------------------------------------------------
1 | name: Publish to Trunk
2 | on:
3 | push:
4 | tags:
5 | - '*'
6 | jobs:
7 | build:
8 | runs-on: macOS-latest
9 | steps:
10 | - uses: actions/checkout@v1
11 | - name: Install Cocoapods
12 | run: gem install cocoapods
13 | - name: Deploy to Cocoapods
14 | run: |
15 | set -eo pipefail
16 | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
17 | pod lib lint --allow-warnings
18 | pod trunk push --allow-warnings
19 | env:
20 | COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
21 |
--------------------------------------------------------------------------------
/.github/workflows/pull-request-workflow.yml:
--------------------------------------------------------------------------------
1 | name: Pull Request Workflow
2 | on: [pull_request]
3 | jobs:
4 | run-tests:
5 | runs-on: macOS-latest
6 | timeout-minutes: 15
7 | steps:
8 | - name: Cancel previous jobs
9 | uses: styfle/cancel-workflow-action@0.6.0
10 | with:
11 | access_token: ${{ github.token }}
12 | - name: Git checkout
13 | uses: actions/checkout@v2.3.4
14 | with:
15 | fetch-depth: 0
16 | ref: ${{ github.ref }}
17 | - name: Setup Xcode
18 | uses: maxim-lobanov/setup-xcode@v1
19 | with:
20 | xcode-version: latest-stable
21 | - name: Setup ruby and bundler dependencies
22 | uses: ruby/setup-ruby@v1.81.0
23 | with:
24 | bundler-cache: true
25 | - name: Run pod install
26 | run: |
27 | set -eo pipefail
28 | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
29 | bundle exec pod install --project-directory=Example
30 | - name: Run tests
31 | run: bundle exec fastlane unit_tests device:'iPhone 11'
32 | - name: Validate lib
33 | run: |
34 | set -eo pipefail
35 | export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
36 | bundle exec pod lib lint --allow-warnings
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata/
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
25 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
26 | # Carthage/Checkouts
27 |
28 | Carthage/Build
29 |
30 | # We recommend against adding the Pods directory to your .gitignore. However
31 | # you should judge for yourself, the pros and cons are mentioned at:
32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
33 | #
34 | # Note: if you ignore the Pods directory, make sure to uncomment
35 | # `pod install` in .travis.yml
36 | #
37 | Pods/
38 | default.profraw
39 | fastlane/test_output/
40 | fastlane/report.xml
41 | derived_data/
42 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 3.0.2
2 |
--------------------------------------------------------------------------------
/.xcode-version:
--------------------------------------------------------------------------------
1 | ~> 11
2 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://cdn.cocoapods.org/'
2 |
3 | platform :ios, '9.0'
4 | use_frameworks!
5 | inhibit_all_warnings!
6 |
7 | target 'ScrollingStackViewController_Example' do
8 | pod 'ScrollingStackViewController', :path => '../'
9 |
10 | target 'ScrollingStackViewController_Tests' do
11 | inherit! :search_paths
12 |
13 |
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ScrollingStackViewController (6.0.0)
3 |
4 | DEPENDENCIES:
5 | - ScrollingStackViewController (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | ScrollingStackViewController:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | ScrollingStackViewController: b2c7184197705db2681c6071c6c5aecdde73569b
13 |
14 | PODFILE CHECKSUM: 1b324814f8ab24f2809e6cdca5fafe1114859d00
15 |
16 | COCOAPODS: 1.10.2
17 |
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/ScrollingStackViewController.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ScrollingStackViewController",
3 | "version": "6.0.0",
4 | "summary": "A view controller that uses root views of child view controllers as views in a UIStackView.",
5 | "description": "This view controller is more suitable than an UITableViewController when creating a list of segments that are dynamically behaving, but are well defined and bound in number. The delegation pattern that the data source of an UITableViewController is best suited for situation when there is an unbounded number of cells, but in many cases is an overkill and becomes a burden. Also, UITableViewCells are not controllers, but sometimes it makes sense to properly partition the responsibility of the segments, not just over the view layer. Using ScrollingStackViewController you can have a bunch of view controllers, each of them encapsulating their own responsibilities.",
6 | "homepage": "https://github.com/justeat/ScrollingStackViewController",
7 | "license": {
8 | "type": "Apache 2.0",
9 | "file": "LICENSE"
10 | },
11 | "authors": "Just Eat Takeaway iOS Team",
12 | "source": {
13 | "git": "https://github.com/justeat/ScrollingStackViewController.git",
14 | "tag": "6.0.0"
15 | },
16 | "platforms": {
17 | "ios": "12.0"
18 | },
19 | "swift_versions": "5.0",
20 | "source_files": "ScrollingStackViewController/Classes/**/*",
21 | "swift_version": "5.0"
22 | }
23 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ScrollingStackViewController (6.0.0)
3 |
4 | DEPENDENCIES:
5 | - ScrollingStackViewController (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | ScrollingStackViewController:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | ScrollingStackViewController: b2c7184197705db2681c6071c6c5aecdde73569b
13 |
14 | PODFILE CHECKSUM: 1b324814f8ab24f2809e6cdca5fafe1114859d00
15 |
16 | COCOAPODS: 1.10.2
17 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## ScrollingStackViewController
5 |
6 | Apache License
7 | Version 2.0, January 2004
8 | http://www.apache.org/licenses/
9 |
10 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11 |
12 | 1. Definitions.
13 |
14 | "License" shall mean the terms and conditions for use, reproduction,
15 | and distribution as defined by Sections 1 through 9 of this document.
16 |
17 | "Licensor" shall mean the copyright owner or entity authorized by
18 | the copyright owner that is granting the License.
19 |
20 | "Legal Entity" shall mean the union of the acting entity and all
21 | other entities that control, are controlled by, or are under common
22 | control with that entity. For the purposes of this definition,
23 | "control" means (i) the power, direct or indirect, to cause the
24 | direction or management of such entity, whether by contract or
25 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
26 | outstanding shares, or (iii) beneficial ownership of such entity.
27 |
28 | "You" (or "Your") shall mean an individual or Legal Entity
29 | exercising permissions granted by this License.
30 |
31 | "Source" form shall mean the preferred form for making modifications,
32 | including but not limited to software source code, documentation
33 | source, and configuration files.
34 |
35 | "Object" form shall mean any form resulting from mechanical
36 | transformation or translation of a Source form, including but
37 | not limited to compiled object code, generated documentation,
38 | and conversions to other media types.
39 |
40 | "Work" shall mean the work of authorship, whether in Source or
41 | Object form, made available under the License, as indicated by a
42 | copyright notice that is included in or attached to the work
43 | (an example is provided in the Appendix below).
44 |
45 | "Derivative Works" shall mean any work, whether in Source or Object
46 | form, that is based on (or derived from) the Work and for which the
47 | editorial revisions, annotations, elaborations, or other modifications
48 | represent, as a whole, an original work of authorship. For the purposes
49 | of this License, Derivative Works shall not include works that remain
50 | separable from, or merely link (or bind by name) to the interfaces of,
51 | the Work and Derivative Works thereof.
52 |
53 | "Contribution" shall mean any work of authorship, including
54 | the original version of the Work and any modifications or additions
55 | to that Work or Derivative Works thereof, that is intentionally
56 | submitted to Licensor for inclusion in the Work by the copyright owner
57 | or by an individual or Legal Entity authorized to submit on behalf of
58 | the copyright owner. For the purposes of this definition, "submitted"
59 | means any form of electronic, verbal, or written communication sent
60 | to the Licensor or its representatives, including but not limited to
61 | communication on electronic mailing lists, source code control systems,
62 | and issue tracking systems that are managed by, or on behalf of, the
63 | Licensor for the purpose of discussing and improving the Work, but
64 | excluding communication that is conspicuously marked or otherwise
65 | designated in writing by the copyright owner as "Not a Contribution."
66 |
67 | "Contributor" shall mean Licensor and any individual or Legal Entity
68 | on behalf of whom a Contribution has been received by Licensor and
69 | subsequently incorporated within the Work.
70 |
71 | 2. Grant of Copyright License. Subject to the terms and conditions of
72 | this License, each Contributor hereby grants to You a perpetual,
73 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74 | copyright license to reproduce, prepare Derivative Works of,
75 | publicly display, publicly perform, sublicense, and distribute the
76 | Work and such Derivative Works in Source or Object form.
77 |
78 | 3. Grant of Patent License. Subject to the terms and conditions of
79 | this License, each Contributor hereby grants to You a perpetual,
80 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81 | (except as stated in this section) patent license to make, have made,
82 | use, offer to sell, sell, import, and otherwise transfer the Work,
83 | where such license applies only to those patent claims licensable
84 | by such Contributor that are necessarily infringed by their
85 | Contribution(s) alone or by combination of their Contribution(s)
86 | with the Work to which such Contribution(s) was submitted. If You
87 | institute patent litigation against any entity (including a
88 | cross-claim or counterclaim in a lawsuit) alleging that the Work
89 | or a Contribution incorporated within the Work constitutes direct
90 | or contributory patent infringement, then any patent licenses
91 | granted to You under this License for that Work shall terminate
92 | as of the date such litigation is filed.
93 |
94 | 4. Redistribution. You may reproduce and distribute copies of the
95 | Work or Derivative Works thereof in any medium, with or without
96 | modifications, and in Source or Object form, provided that You
97 | meet the following conditions:
98 |
99 | (a) You must give any other recipients of the Work or
100 | Derivative Works a copy of this License; and
101 |
102 | (b) You must cause any modified files to carry prominent notices
103 | stating that You changed the files; and
104 |
105 | (c) You must retain, in the Source form of any Derivative Works
106 | that You distribute, all copyright, patent, trademark, and
107 | attribution notices from the Source form of the Work,
108 | excluding those notices that do not pertain to any part of
109 | the Derivative Works; and
110 |
111 | (d) If the Work includes a "NOTICE" text file as part of its
112 | distribution, then any Derivative Works that You distribute must
113 | include a readable copy of the attribution notices contained
114 | within such NOTICE file, excluding those notices that do not
115 | pertain to any part of the Derivative Works, in at least one
116 | of the following places: within a NOTICE text file distributed
117 | as part of the Derivative Works; within the Source form or
118 | documentation, if provided along with the Derivative Works; or,
119 | within a display generated by the Derivative Works, if and
120 | wherever such third-party notices normally appear. The contents
121 | of the NOTICE file are for informational purposes only and
122 | do not modify the License. You may add Your own attribution
123 | notices within Derivative Works that You distribute, alongside
124 | or as an addendum to the NOTICE text from the Work, provided
125 | that such additional attribution notices cannot be construed
126 | as modifying the License.
127 |
128 | You may add Your own copyright statement to Your modifications and
129 | may provide additional or different license terms and conditions
130 | for use, reproduction, or distribution of Your modifications, or
131 | for any such Derivative Works as a whole, provided Your use,
132 | reproduction, and distribution of the Work otherwise complies with
133 | the conditions stated in this License.
134 |
135 | 5. Submission of Contributions. Unless You explicitly state otherwise,
136 | any Contribution intentionally submitted for inclusion in the Work
137 | by You to the Licensor shall be under the terms and conditions of
138 | this License, without any additional terms or conditions.
139 | Notwithstanding the above, nothing herein shall supersede or modify
140 | the terms of any separate license agreement you may have executed
141 | with Licensor regarding such Contributions.
142 |
143 | 6. Trademarks. This License does not grant permission to use the trade
144 | names, trademarks, service marks, or product names of the Licensor,
145 | except as required for reasonable and customary use in describing the
146 | origin of the Work and reproducing the content of the NOTICE file.
147 |
148 | 7. Disclaimer of Warranty. Unless required by applicable law or
149 | agreed to in writing, Licensor provides the Work (and each
150 | Contributor provides its Contributions) on an "AS IS" BASIS,
151 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152 | implied, including, without limitation, any warranties or conditions
153 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154 | PARTICULAR PURPOSE. You are solely responsible for determining the
155 | appropriateness of using or redistributing the Work and assume any
156 | risks associated with Your exercise of permissions under this License.
157 |
158 | 8. Limitation of Liability. In no event and under no legal theory,
159 | whether in tort (including negligence), contract, or otherwise,
160 | unless required by applicable law (such as deliberate and grossly
161 | negligent acts) or agreed to in writing, shall any Contributor be
162 | liable to You for damages, including any direct, indirect, special,
163 | incidental, or consequential damages of any character arising as a
164 | result of this License or out of the use or inability to use the
165 | Work (including but not limited to damages for loss of goodwill,
166 | work stoppage, computer failure or malfunction, or any and all
167 | other commercial damages or losses), even if such Contributor
168 | has been advised of the possibility of such damages.
169 |
170 | 9. Accepting Warranty or Additional Liability. While redistributing
171 | the Work or Derivative Works thereof, You may choose to offer,
172 | and charge a fee for, acceptance of support, warranty, indemnity,
173 | or other liability obligations and/or rights consistent with this
174 | License. However, in accepting such obligations, You may act only
175 | on Your own behalf and on Your sole responsibility, not on behalf
176 | of any other Contributor, and only if You agree to indemnify,
177 | defend, and hold each Contributor harmless for any liability
178 | incurred by, or claims asserted against, such Contributor by reason
179 | of your accepting any such warranty or additional liability.
180 |
181 | END OF TERMS AND CONDITIONS
182 |
183 | APPENDIX: How to apply the Apache License to your work.
184 |
185 | To apply the Apache License to your work, attach the following
186 | boilerplate notice, with the fields enclosed by brackets "{}"
187 | replaced with your own identifying information. (Don't include
188 | the brackets!) The text should be enclosed in the appropriate
189 | comment syntax for the file format. We also recommend that a
190 | file or class name and description of purpose be included on the
191 | same "printed page" as the copyright notice for easier
192 | identification within third-party archives.
193 |
194 | Copyright 2019 Just Eat Holding Ltd
195 |
196 | Licensed under the Apache License, Version 2.0 (the "License");
197 | you may not use this file except in compliance with the License.
198 | You may obtain a copy of the License at
199 |
200 | http://www.apache.org/licenses/LICENSE-2.0
201 |
202 | Unless required by applicable law or agreed to in writing, software
203 | distributed under the License is distributed on an "AS IS" BASIS,
204 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205 | See the License for the specific language governing permissions and
206 | limitations under the License.
207 |
208 | Generated by CocoaPods - https://cocoapods.org
209 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Apache License
18 | Version 2.0, January 2004
19 | http://www.apache.org/licenses/
20 |
21 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
22 |
23 | 1. Definitions.
24 |
25 | "License" shall mean the terms and conditions for use, reproduction,
26 | and distribution as defined by Sections 1 through 9 of this document.
27 |
28 | "Licensor" shall mean the copyright owner or entity authorized by
29 | the copyright owner that is granting the License.
30 |
31 | "Legal Entity" shall mean the union of the acting entity and all
32 | other entities that control, are controlled by, or are under common
33 | control with that entity. For the purposes of this definition,
34 | "control" means (i) the power, direct or indirect, to cause the
35 | direction or management of such entity, whether by contract or
36 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
37 | outstanding shares, or (iii) beneficial ownership of such entity.
38 |
39 | "You" (or "Your") shall mean an individual or Legal Entity
40 | exercising permissions granted by this License.
41 |
42 | "Source" form shall mean the preferred form for making modifications,
43 | including but not limited to software source code, documentation
44 | source, and configuration files.
45 |
46 | "Object" form shall mean any form resulting from mechanical
47 | transformation or translation of a Source form, including but
48 | not limited to compiled object code, generated documentation,
49 | and conversions to other media types.
50 |
51 | "Work" shall mean the work of authorship, whether in Source or
52 | Object form, made available under the License, as indicated by a
53 | copyright notice that is included in or attached to the work
54 | (an example is provided in the Appendix below).
55 |
56 | "Derivative Works" shall mean any work, whether in Source or Object
57 | form, that is based on (or derived from) the Work and for which the
58 | editorial revisions, annotations, elaborations, or other modifications
59 | represent, as a whole, an original work of authorship. For the purposes
60 | of this License, Derivative Works shall not include works that remain
61 | separable from, or merely link (or bind by name) to the interfaces of,
62 | the Work and Derivative Works thereof.
63 |
64 | "Contribution" shall mean any work of authorship, including
65 | the original version of the Work and any modifications or additions
66 | to that Work or Derivative Works thereof, that is intentionally
67 | submitted to Licensor for inclusion in the Work by the copyright owner
68 | or by an individual or Legal Entity authorized to submit on behalf of
69 | the copyright owner. For the purposes of this definition, "submitted"
70 | means any form of electronic, verbal, or written communication sent
71 | to the Licensor or its representatives, including but not limited to
72 | communication on electronic mailing lists, source code control systems,
73 | and issue tracking systems that are managed by, or on behalf of, the
74 | Licensor for the purpose of discussing and improving the Work, but
75 | excluding communication that is conspicuously marked or otherwise
76 | designated in writing by the copyright owner as "Not a Contribution."
77 |
78 | "Contributor" shall mean Licensor and any individual or Legal Entity
79 | on behalf of whom a Contribution has been received by Licensor and
80 | subsequently incorporated within the Work.
81 |
82 | 2. Grant of Copyright License. Subject to the terms and conditions of
83 | this License, each Contributor hereby grants to You a perpetual,
84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85 | copyright license to reproduce, prepare Derivative Works of,
86 | publicly display, publicly perform, sublicense, and distribute the
87 | Work and such Derivative Works in Source or Object form.
88 |
89 | 3. Grant of Patent License. Subject to the terms and conditions of
90 | this License, each Contributor hereby grants to You a perpetual,
91 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
92 | (except as stated in this section) patent license to make, have made,
93 | use, offer to sell, sell, import, and otherwise transfer the Work,
94 | where such license applies only to those patent claims licensable
95 | by such Contributor that are necessarily infringed by their
96 | Contribution(s) alone or by combination of their Contribution(s)
97 | with the Work to which such Contribution(s) was submitted. If You
98 | institute patent litigation against any entity (including a
99 | cross-claim or counterclaim in a lawsuit) alleging that the Work
100 | or a Contribution incorporated within the Work constitutes direct
101 | or contributory patent infringement, then any patent licenses
102 | granted to You under this License for that Work shall terminate
103 | as of the date such litigation is filed.
104 |
105 | 4. Redistribution. You may reproduce and distribute copies of the
106 | Work or Derivative Works thereof in any medium, with or without
107 | modifications, and in Source or Object form, provided that You
108 | meet the following conditions:
109 |
110 | (a) You must give any other recipients of the Work or
111 | Derivative Works a copy of this License; and
112 |
113 | (b) You must cause any modified files to carry prominent notices
114 | stating that You changed the files; and
115 |
116 | (c) You must retain, in the Source form of any Derivative Works
117 | that You distribute, all copyright, patent, trademark, and
118 | attribution notices from the Source form of the Work,
119 | excluding those notices that do not pertain to any part of
120 | the Derivative Works; and
121 |
122 | (d) If the Work includes a "NOTICE" text file as part of its
123 | distribution, then any Derivative Works that You distribute must
124 | include a readable copy of the attribution notices contained
125 | within such NOTICE file, excluding those notices that do not
126 | pertain to any part of the Derivative Works, in at least one
127 | of the following places: within a NOTICE text file distributed
128 | as part of the Derivative Works; within the Source form or
129 | documentation, if provided along with the Derivative Works; or,
130 | within a display generated by the Derivative Works, if and
131 | wherever such third-party notices normally appear. The contents
132 | of the NOTICE file are for informational purposes only and
133 | do not modify the License. You may add Your own attribution
134 | notices within Derivative Works that You distribute, alongside
135 | or as an addendum to the NOTICE text from the Work, provided
136 | that such additional attribution notices cannot be construed
137 | as modifying the License.
138 |
139 | You may add Your own copyright statement to Your modifications and
140 | may provide additional or different license terms and conditions
141 | for use, reproduction, or distribution of Your modifications, or
142 | for any such Derivative Works as a whole, provided Your use,
143 | reproduction, and distribution of the Work otherwise complies with
144 | the conditions stated in this License.
145 |
146 | 5. Submission of Contributions. Unless You explicitly state otherwise,
147 | any Contribution intentionally submitted for inclusion in the Work
148 | by You to the Licensor shall be under the terms and conditions of
149 | this License, without any additional terms or conditions.
150 | Notwithstanding the above, nothing herein shall supersede or modify
151 | the terms of any separate license agreement you may have executed
152 | with Licensor regarding such Contributions.
153 |
154 | 6. Trademarks. This License does not grant permission to use the trade
155 | names, trademarks, service marks, or product names of the Licensor,
156 | except as required for reasonable and customary use in describing the
157 | origin of the Work and reproducing the content of the NOTICE file.
158 |
159 | 7. Disclaimer of Warranty. Unless required by applicable law or
160 | agreed to in writing, Licensor provides the Work (and each
161 | Contributor provides its Contributions) on an "AS IS" BASIS,
162 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
163 | implied, including, without limitation, any warranties or conditions
164 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
165 | PARTICULAR PURPOSE. You are solely responsible for determining the
166 | appropriateness of using or redistributing the Work and assume any
167 | risks associated with Your exercise of permissions under this License.
168 |
169 | 8. Limitation of Liability. In no event and under no legal theory,
170 | whether in tort (including negligence), contract, or otherwise,
171 | unless required by applicable law (such as deliberate and grossly
172 | negligent acts) or agreed to in writing, shall any Contributor be
173 | liable to You for damages, including any direct, indirect, special,
174 | incidental, or consequential damages of any character arising as a
175 | result of this License or out of the use or inability to use the
176 | Work (including but not limited to damages for loss of goodwill,
177 | work stoppage, computer failure or malfunction, or any and all
178 | other commercial damages or losses), even if such Contributor
179 | has been advised of the possibility of such damages.
180 |
181 | 9. Accepting Warranty or Additional Liability. While redistributing
182 | the Work or Derivative Works thereof, You may choose to offer,
183 | and charge a fee for, acceptance of support, warranty, indemnity,
184 | or other liability obligations and/or rights consistent with this
185 | License. However, in accepting such obligations, You may act only
186 | on Your own behalf and on Your sole responsibility, not on behalf
187 | of any other Contributor, and only if You agree to indemnify,
188 | defend, and hold each Contributor harmless for any liability
189 | incurred by, or claims asserted against, such Contributor by reason
190 | of your accepting any such warranty or additional liability.
191 |
192 | END OF TERMS AND CONDITIONS
193 |
194 | APPENDIX: How to apply the Apache License to your work.
195 |
196 | To apply the Apache License to your work, attach the following
197 | boilerplate notice, with the fields enclosed by brackets "{}"
198 | replaced with your own identifying information. (Don't include
199 | the brackets!) The text should be enclosed in the appropriate
200 | comment syntax for the file format. We also recommend that a
201 | file or class name and description of purpose be included on the
202 | same "printed page" as the copyright notice for easier
203 | identification within third-party archives.
204 |
205 | Copyright 2019 Just Eat Holding Ltd
206 |
207 | Licensed under the Apache License, Version 2.0 (the "License");
208 | you may not use this file except in compliance with the License.
209 | You may obtain a copy of the License at
210 |
211 | http://www.apache.org/licenses/LICENSE-2.0
212 |
213 | Unless required by applicable law or agreed to in writing, software
214 | distributed under the License is distributed on an "AS IS" BASIS,
215 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
216 | See the License for the specific language governing permissions and
217 | limitations under the License.
218 |
219 | License
220 | Apache 2.0
221 | Title
222 | ScrollingStackViewController
223 | Type
224 | PSGroupSpecifier
225 |
226 |
227 | FooterText
228 | Generated by CocoaPods - https://cocoapods.org
229 | Title
230 |
231 | Type
232 | PSGroupSpecifier
233 |
234 |
235 | StringsTable
236 | Acknowledgements
237 | Title
238 | Acknowledgements
239 |
240 |
241 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ScrollingStackViewController_Example : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ScrollingStackViewController_Example
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | function on_error {
7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
8 | }
9 | trap 'on_error $LINENO' ERR
10 |
11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
13 | # frameworks to, so exit 0 (signalling the script phase was successful).
14 | exit 0
15 | fi
16 |
17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
19 |
20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
22 | BCSYMBOLMAP_DIR="BCSymbolMaps"
23 |
24 |
25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
28 |
29 | # Copies and strips a vendored framework
30 | install_framework()
31 | {
32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
33 | local source="${BUILT_PRODUCTS_DIR}/$1"
34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
36 | elif [ -r "$1" ]; then
37 | local source="$1"
38 | fi
39 |
40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
41 |
42 | if [ -L "${source}" ]; then
43 | echo "Symlinked..."
44 | source="$(readlink "${source}")"
45 | fi
46 |
47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied
49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do
50 | echo "Installing $f"
51 | install_bcsymbolmap "$f" "$destination"
52 | rm "$f"
53 | done
54 | rmdir "${source}/${BCSYMBOLMAP_DIR}"
55 | fi
56 |
57 | # Use filter instead of exclude so missing patterns don't throw errors.
58 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
60 |
61 | local basename
62 | basename="$(basename -s .framework "$1")"
63 | binary="${destination}/${basename}.framework/${basename}"
64 |
65 | if ! [ -r "$binary" ]; then
66 | binary="${destination}/${basename}"
67 | elif [ -L "${binary}" ]; then
68 | echo "Destination binary is symlinked..."
69 | dirname="$(dirname "${binary}")"
70 | binary="${dirname}/$(readlink "${binary}")"
71 | fi
72 |
73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
75 | strip_invalid_archs "$binary"
76 | fi
77 |
78 | # Resign the code if required by the build settings to avoid unstable apps
79 | code_sign_if_enabled "${destination}/$(basename "$1")"
80 |
81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
83 | local swift_runtime_libs
84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
85 | for lib in $swift_runtime_libs; do
86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
88 | code_sign_if_enabled "${destination}/${lib}"
89 | done
90 | fi
91 | }
92 | # Copies and strips a vendored dSYM
93 | install_dsym() {
94 | local source="$1"
95 | warn_missing_arch=${2:-true}
96 | if [ -r "$source" ]; then
97 | # Copy the dSYM into the targets temp dir.
98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
100 |
101 | local basename
102 | basename="$(basename -s .dSYM "$source")"
103 | binary_name="$(ls "$source/Contents/Resources/DWARF")"
104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
105 |
106 | # Strip invalid architectures from the dSYM.
107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
108 | strip_invalid_archs "$binary" "$warn_missing_arch"
109 | fi
110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then
111 | # Move the stripped file into its final destination.
112 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
113 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
114 | else
115 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
116 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
117 | fi
118 | fi
119 | }
120 |
121 | # Used as a return value for each invocation of `strip_invalid_archs` function.
122 | STRIP_BINARY_RETVAL=0
123 |
124 | # Strip invalid architectures
125 | strip_invalid_archs() {
126 | binary="$1"
127 | warn_missing_arch=${2:-true}
128 | # Get architectures for current target binary
129 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
130 | # Intersect them with the architectures we are building for
131 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
132 | # If there are no archs supported by this binary then warn the user
133 | if [[ -z "$intersected_archs" ]]; then
134 | if [[ "$warn_missing_arch" == "true" ]]; then
135 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
136 | fi
137 | STRIP_BINARY_RETVAL=1
138 | return
139 | fi
140 | stripped=""
141 | for arch in $binary_archs; do
142 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then
143 | # Strip non-valid architectures in-place
144 | lipo -remove "$arch" -output "$binary" "$binary"
145 | stripped="$stripped $arch"
146 | fi
147 | done
148 | if [[ "$stripped" ]]; then
149 | echo "Stripped $binary of architectures:$stripped"
150 | fi
151 | STRIP_BINARY_RETVAL=0
152 | }
153 |
154 | # Copies the bcsymbolmap files of a vendored framework
155 | install_bcsymbolmap() {
156 | local bcsymbolmap_path="$1"
157 | local destination="${BUILT_PRODUCTS_DIR}"
158 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
159 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
160 | }
161 |
162 | # Signs a framework with the provided identity
163 | code_sign_if_enabled() {
164 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
165 | # Use the current code_sign_identity
166 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
167 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
168 |
169 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
170 | code_sign_cmd="$code_sign_cmd &"
171 | fi
172 | echo "$code_sign_cmd"
173 | eval "$code_sign_cmd"
174 | fi
175 | }
176 |
177 | if [[ "$CONFIGURATION" == "Debug" ]]; then
178 | install_framework "${BUILT_PRODUCTS_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework"
179 | fi
180 | if [[ "$CONFIGURATION" == "Release" ]]; then
181 | install_framework "${BUILT_PRODUCTS_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework"
182 | fi
183 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
184 | wait
185 | fi
186 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
8 | # resources to, so exit 0 (signalling the script phase was successful).
9 | exit 0
10 | fi
11 |
12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
13 |
14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
15 | > "$RESOURCES_TO_COPY"
16 |
17 | XCASSET_FILES=()
18 |
19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
22 |
23 | case "${TARGETED_DEVICE_FAMILY:-}" in
24 | 1,2)
25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
26 | ;;
27 | 1)
28 | TARGET_DEVICE_ARGS="--target-device iphone"
29 | ;;
30 | 2)
31 | TARGET_DEVICE_ARGS="--target-device ipad"
32 | ;;
33 | 3)
34 | TARGET_DEVICE_ARGS="--target-device tv"
35 | ;;
36 | 4)
37 | TARGET_DEVICE_ARGS="--target-device watch"
38 | ;;
39 | *)
40 | TARGET_DEVICE_ARGS="--target-device mac"
41 | ;;
42 | esac
43 |
44 | install_resource()
45 | {
46 | if [[ "$1" = /* ]] ; then
47 | RESOURCE_PATH="$1"
48 | else
49 | RESOURCE_PATH="${PODS_ROOT}/$1"
50 | fi
51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
52 | cat << EOM
53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
54 | EOM
55 | exit 1
56 | fi
57 | case $RESOURCE_PATH in
58 | *.storyboard)
59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
61 | ;;
62 | *.xib)
63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
65 | ;;
66 | *.framework)
67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
71 | ;;
72 | *.xcdatamodel)
73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
75 | ;;
76 | *.xcdatamodeld)
77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
79 | ;;
80 | *.xcmappingmodel)
81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
83 | ;;
84 | *.xcassets)
85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
87 | ;;
88 | *)
89 | echo "$RESOURCE_PATH" || true
90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
91 | ;;
92 | esac
93 | }
94 |
95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
100 | fi
101 | rm -f "$RESOURCES_TO_COPY"
102 |
103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
104 | then
105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
107 | while read line; do
108 | if [[ $line != "${PODS_ROOT}*" ]]; then
109 | XCASSET_FILES+=("$line")
110 | fi
111 | done <<<"$OTHER_XCASSETS"
112 |
113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
115 | else
116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
117 | fi
118 | fi
119 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ScrollingStackViewController_ExampleVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ScrollingStackViewController_ExampleVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework/Headers"
6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
7 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController"
8 | OTHER_LDFLAGS = $(inherited) -framework "ScrollingStackViewController"
9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
10 | PODS_BUILD_DIR = ${BUILD_DIR}
11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
13 | PODS_ROOT = ${SRCROOT}/Pods
14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
16 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ScrollingStackViewController_Example {
2 | umbrella header "Pods-ScrollingStackViewController_Example-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework/Headers"
6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
7 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController"
8 | OTHER_LDFLAGS = $(inherited) -framework "ScrollingStackViewController"
9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
10 | PODS_BUILD_DIR = ${BUILD_DIR}
11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
13 | PODS_ROOT = ${SRCROOT}/Pods
14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
16 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 | Generated by CocoaPods - https://cocoapods.org
4 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Generated by CocoaPods - https://cocoapods.org
18 | Title
19 |
20 | Type
21 | PSGroupSpecifier
22 |
23 |
24 | StringsTable
25 | Acknowledgements
26 | Title
27 | Acknowledgements
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ScrollingStackViewController_Tests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ScrollingStackViewController_Tests
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-frameworks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
8 | # frameworks to, so exit 0 (signalling the script phase was successful).
9 | exit 0
10 | fi
11 |
12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
14 |
15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
17 |
18 | # Used as a return value for each invocation of `strip_invalid_archs` function.
19 | STRIP_BINARY_RETVAL=0
20 |
21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
24 |
25 | # Copies and strips a vendored framework
26 | install_framework()
27 | {
28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
29 | local source="${BUILT_PRODUCTS_DIR}/$1"
30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
32 | elif [ -r "$1" ]; then
33 | local source="$1"
34 | fi
35 |
36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
37 |
38 | if [ -L "${source}" ]; then
39 | echo "Symlinked..."
40 | source="$(readlink "${source}")"
41 | fi
42 |
43 | # Use filter instead of exclude so missing patterns don't throw errors.
44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
46 |
47 | local basename
48 | basename="$(basename -s .framework "$1")"
49 | binary="${destination}/${basename}.framework/${basename}"
50 | if ! [ -r "$binary" ]; then
51 | binary="${destination}/${basename}"
52 | fi
53 |
54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
56 | strip_invalid_archs "$binary"
57 | fi
58 |
59 | # Resign the code if required by the build settings to avoid unstable apps
60 | code_sign_if_enabled "${destination}/$(basename "$1")"
61 |
62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
64 | local swift_runtime_libs
65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
66 | for lib in $swift_runtime_libs; do
67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
69 | code_sign_if_enabled "${destination}/${lib}"
70 | done
71 | fi
72 | }
73 |
74 | # Copies and strips a vendored dSYM
75 | install_dsym() {
76 | local source="$1"
77 | if [ -r "$source" ]; then
78 | # Copy the dSYM into a the targets temp dir.
79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
81 |
82 | local basename
83 | basename="$(basename -s .framework.dSYM "$source")"
84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
85 |
86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device
87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then
88 | strip_invalid_archs "$binary"
89 | fi
90 |
91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
92 | # Move the stripped file into its final destination.
93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
95 | else
96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
98 | fi
99 | fi
100 | }
101 |
102 | # Signs a framework with the provided identity
103 | code_sign_if_enabled() {
104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
105 | # Use the current code_sign_identitiy
106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
108 |
109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
110 | code_sign_cmd="$code_sign_cmd &"
111 | fi
112 | echo "$code_sign_cmd"
113 | eval "$code_sign_cmd"
114 | fi
115 | }
116 |
117 | # Strip invalid architectures
118 | strip_invalid_archs() {
119 | binary="$1"
120 | # Get architectures for current target binary
121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
122 | # Intersect them with the architectures we are building for
123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
124 | # If there are no archs supported by this binary then warn the user
125 | if [[ -z "$intersected_archs" ]]; then
126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
127 | STRIP_BINARY_RETVAL=0
128 | return
129 | fi
130 | stripped=""
131 | for arch in $binary_archs; do
132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then
133 | # Strip non-valid architectures in-place
134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1
135 | stripped="$stripped $arch"
136 | fi
137 | done
138 | if [[ "$stripped" ]]; then
139 | echo "Stripped $binary of architectures:$stripped"
140 | fi
141 | STRIP_BINARY_RETVAL=1
142 | }
143 |
144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
145 | wait
146 | fi
147 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -u
4 | set -o pipefail
5 |
6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
8 | # resources to, so exit 0 (signalling the script phase was successful).
9 | exit 0
10 | fi
11 |
12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
13 |
14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
15 | > "$RESOURCES_TO_COPY"
16 |
17 | XCASSET_FILES=()
18 |
19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution
20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
22 |
23 | case "${TARGETED_DEVICE_FAMILY:-}" in
24 | 1,2)
25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
26 | ;;
27 | 1)
28 | TARGET_DEVICE_ARGS="--target-device iphone"
29 | ;;
30 | 2)
31 | TARGET_DEVICE_ARGS="--target-device ipad"
32 | ;;
33 | 3)
34 | TARGET_DEVICE_ARGS="--target-device tv"
35 | ;;
36 | 4)
37 | TARGET_DEVICE_ARGS="--target-device watch"
38 | ;;
39 | *)
40 | TARGET_DEVICE_ARGS="--target-device mac"
41 | ;;
42 | esac
43 |
44 | install_resource()
45 | {
46 | if [[ "$1" = /* ]] ; then
47 | RESOURCE_PATH="$1"
48 | else
49 | RESOURCE_PATH="${PODS_ROOT}/$1"
50 | fi
51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then
52 | cat << EOM
53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
54 | EOM
55 | exit 1
56 | fi
57 | case $RESOURCE_PATH in
58 | *.storyboard)
59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
61 | ;;
62 | *.xib)
63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
65 | ;;
66 | *.framework)
67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
71 | ;;
72 | *.xcdatamodel)
73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
75 | ;;
76 | *.xcdatamodeld)
77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
79 | ;;
80 | *.xcmappingmodel)
81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
83 | ;;
84 | *.xcassets)
85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
87 | ;;
88 | *)
89 | echo "$RESOURCE_PATH" || true
90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
91 | ;;
92 | esac
93 | }
94 |
95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
100 | fi
101 | rm -f "$RESOURCES_TO_COPY"
102 |
103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
104 | then
105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets).
106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
107 | while read line; do
108 | if [[ $line != "${PODS_ROOT}*" ]]; then
109 | XCASSET_FILES+=("$line")
110 | fi
111 | done <<<"$OTHER_XCASSETS"
112 |
113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
115 | else
116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
117 | fi
118 | fi
119 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests-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_ScrollingStackViewController_TestsVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ScrollingStackViewController_TestsVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "ScrollingStackViewController"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ScrollingStackViewController_Tests {
2 | umbrella header "Pods-ScrollingStackViewController_Tests-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "ScrollingStackViewController"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
9 | PODS_ROOT = ${SRCROOT}/Pods
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 4.0.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/ScrollingStackViewController-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 6.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/ScrollingStackViewController-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ScrollingStackViewController : NSObject
3 | @end
4 | @implementation PodsDummy_ScrollingStackViewController
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/ScrollingStackViewController-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/ScrollingStackViewController-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 ScrollingStackViewControllerVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char ScrollingStackViewControllerVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/ScrollingStackViewController.modulemap:
--------------------------------------------------------------------------------
1 | framework module ScrollingStackViewController {
2 | umbrella header "ScrollingStackViewController-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ScrollingStackViewController/ScrollingStackViewController.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ScrollingStackViewController
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}/../..
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 023DFA3120DBDF83008DC1CA /* ScrollingStackViewInsertionLocationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023DFA3020DBDF83008DC1CA /* ScrollingStackViewInsertionLocationTests.swift */; };
11 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
12 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; };
13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
16 | 607FACEC1AFB9204008FA782 /* ScrollingStackViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* ScrollingStackViewTests.swift */; };
17 | 6DC866512057D24C0077AF5F /* Factory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DC8664F2057D2490077AF5F /* Factory.swift */; };
18 | B33DE7C21E44DD3B00236E66 /* SegmentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B33DE7C11E44DD3B00236E66 /* SegmentController.swift */; };
19 | B96A4F0D9BAB29F33246EA2A /* Pods_ScrollingStackViewController_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB51B0F5EC78B9893A452F88 /* Pods_ScrollingStackViewController_Tests.framework */; };
20 | C9448518C96B0320E8B4B123 /* Pods_ScrollingStackViewController_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4B11A859E822C0341AB2E1 /* Pods_ScrollingStackViewController_Example.framework */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXContainerItemProxy section */
24 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = {
25 | isa = PBXContainerItemProxy;
26 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */;
27 | proxyType = 1;
28 | remoteGlobalIDString = 607FACCF1AFB9204008FA782;
29 | remoteInfo = ScrollingStackViewController;
30 | };
31 | /* End PBXContainerItemProxy section */
32 |
33 | /* Begin PBXFileReference section */
34 | 023DFA3020DBDF83008DC1CA /* ScrollingStackViewInsertionLocationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollingStackViewInsertionLocationTests.swift; sourceTree = ""; };
35 | 0A6F52BF4FD6BD4288D7BEDC /* Pods-ScrollingStackViewController_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScrollingStackViewController_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests.debug.xcconfig"; sourceTree = ""; };
36 | 10BD00EC59A4125200D65CD2 /* ScrollingStackViewController.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ScrollingStackViewController.podspec; path = ../ScrollingStackViewController.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
37 | 4F7E258126CD2E41001F66F7 /* UnitTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = UnitTests.xctestplan; sourceTree = ""; };
38 | 51BFE9A1965033C7C4E5007F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; };
39 | 58D345B7E363CF54DDB19741 /* Pods-ScrollingStackViewController_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScrollingStackViewController_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example.debug.xcconfig"; sourceTree = ""; };
40 | 607FACD01AFB9204008FA782 /* ScrollingStackViewController_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScrollingStackViewController_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
43 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
44 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
45 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
46 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
47 | 607FACE51AFB9204008FA782 /* ScrollingStackViewController_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ScrollingStackViewController_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | 607FACEB1AFB9204008FA782 /* ScrollingStackViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollingStackViewTests.swift; sourceTree = ""; };
50 | 627F56F09E411F967BC74499 /* Pods-ScrollingStackViewController_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScrollingStackViewController_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ScrollingStackViewController_Tests/Pods-ScrollingStackViewController_Tests.release.xcconfig"; sourceTree = ""; };
51 | 6DC8664F2057D2490077AF5F /* Factory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Factory.swift; sourceTree = ""; };
52 | B33DE7C11E44DD3B00236E66 /* SegmentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SegmentController.swift; sourceTree = ""; };
53 | C714F8250775697F85B5D77C /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; };
54 | CD4B11A859E822C0341AB2E1 /* Pods_ScrollingStackViewController_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ScrollingStackViewController_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
55 | D0FAB569C57A7F2887BEA9DC /* Pods-ScrollingStackViewController_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScrollingStackViewController_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example.release.xcconfig"; sourceTree = ""; };
56 | EB51B0F5EC78B9893A452F88 /* Pods_ScrollingStackViewController_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ScrollingStackViewController_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
57 | /* End PBXFileReference section */
58 |
59 | /* Begin PBXFrameworksBuildPhase section */
60 | 607FACCD1AFB9204008FA782 /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | C9448518C96B0320E8B4B123 /* Pods_ScrollingStackViewController_Example.framework in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | 607FACE21AFB9204008FA782 /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | B96A4F0D9BAB29F33246EA2A /* Pods_ScrollingStackViewController_Tests.framework in Frameworks */,
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | 1AC6EBCAC8F11F915C994F4A /* Pods */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 58D345B7E363CF54DDB19741 /* Pods-ScrollingStackViewController_Example.debug.xcconfig */,
83 | D0FAB569C57A7F2887BEA9DC /* Pods-ScrollingStackViewController_Example.release.xcconfig */,
84 | 0A6F52BF4FD6BD4288D7BEDC /* Pods-ScrollingStackViewController_Tests.debug.xcconfig */,
85 | 627F56F09E411F967BC74499 /* Pods-ScrollingStackViewController_Tests.release.xcconfig */,
86 | );
87 | name = Pods;
88 | sourceTree = "";
89 | };
90 | 5621986A0DEC60E1A6529339 /* Frameworks */ = {
91 | isa = PBXGroup;
92 | children = (
93 | CD4B11A859E822C0341AB2E1 /* Pods_ScrollingStackViewController_Example.framework */,
94 | EB51B0F5EC78B9893A452F88 /* Pods_ScrollingStackViewController_Tests.framework */,
95 | );
96 | name = Frameworks;
97 | sourceTree = "";
98 | };
99 | 607FACC71AFB9204008FA782 = {
100 | isa = PBXGroup;
101 | children = (
102 | 607FACF51AFB993E008FA782 /* Podspec Metadata */,
103 | 607FACD21AFB9204008FA782 /* Example for ScrollingStackViewController */,
104 | 607FACE81AFB9204008FA782 /* Tests */,
105 | 607FACD11AFB9204008FA782 /* Products */,
106 | 1AC6EBCAC8F11F915C994F4A /* Pods */,
107 | 5621986A0DEC60E1A6529339 /* Frameworks */,
108 | );
109 | sourceTree = "";
110 | };
111 | 607FACD11AFB9204008FA782 /* Products */ = {
112 | isa = PBXGroup;
113 | children = (
114 | 607FACD01AFB9204008FA782 /* ScrollingStackViewController_Example.app */,
115 | 607FACE51AFB9204008FA782 /* ScrollingStackViewController_Tests.xctest */,
116 | );
117 | name = Products;
118 | sourceTree = "";
119 | };
120 | 607FACD21AFB9204008FA782 /* Example for ScrollingStackViewController */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */,
124 | 607FACD71AFB9204008FA782 /* ViewController.swift */,
125 | B33DE7C11E44DD3B00236E66 /* SegmentController.swift */,
126 | 607FACD91AFB9204008FA782 /* Main.storyboard */,
127 | 607FACDC1AFB9204008FA782 /* Images.xcassets */,
128 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */,
129 | 607FACD31AFB9204008FA782 /* Supporting Files */,
130 | );
131 | name = "Example for ScrollingStackViewController";
132 | path = ScrollingStackViewController;
133 | sourceTree = "";
134 | };
135 | 607FACD31AFB9204008FA782 /* Supporting Files */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 607FACD41AFB9204008FA782 /* Info.plist */,
139 | );
140 | name = "Supporting Files";
141 | sourceTree = "";
142 | };
143 | 607FACE81AFB9204008FA782 /* Tests */ = {
144 | isa = PBXGroup;
145 | children = (
146 | 4F7E258126CD2E41001F66F7 /* UnitTests.xctestplan */,
147 | 6DB697842056C04D000BB495 /* Utilities */,
148 | 607FACEB1AFB9204008FA782 /* ScrollingStackViewTests.swift */,
149 | 023DFA3020DBDF83008DC1CA /* ScrollingStackViewInsertionLocationTests.swift */,
150 | 607FACE91AFB9204008FA782 /* Supporting Files */,
151 | );
152 | path = Tests;
153 | sourceTree = "";
154 | };
155 | 607FACE91AFB9204008FA782 /* Supporting Files */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 607FACEA1AFB9204008FA782 /* Info.plist */,
159 | );
160 | name = "Supporting Files";
161 | sourceTree = "";
162 | };
163 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
164 | isa = PBXGroup;
165 | children = (
166 | 10BD00EC59A4125200D65CD2 /* ScrollingStackViewController.podspec */,
167 | 51BFE9A1965033C7C4E5007F /* README.md */,
168 | C714F8250775697F85B5D77C /* LICENSE */,
169 | );
170 | name = "Podspec Metadata";
171 | sourceTree = "";
172 | };
173 | 6DB697842056C04D000BB495 /* Utilities */ = {
174 | isa = PBXGroup;
175 | children = (
176 | 6DC8664F2057D2490077AF5F /* Factory.swift */,
177 | );
178 | path = Utilities;
179 | sourceTree = "";
180 | };
181 | /* End PBXGroup section */
182 |
183 | /* Begin PBXNativeTarget section */
184 | 607FACCF1AFB9204008FA782 /* ScrollingStackViewController_Example */ = {
185 | isa = PBXNativeTarget;
186 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScrollingStackViewController_Example" */;
187 | buildPhases = (
188 | E9FEB511874CD546908AC01F /* [CP] Check Pods Manifest.lock */,
189 | 607FACCC1AFB9204008FA782 /* Sources */,
190 | 607FACCD1AFB9204008FA782 /* Frameworks */,
191 | 607FACCE1AFB9204008FA782 /* Resources */,
192 | BA89436BBB507AFC82925AAC /* [CP] Embed Pods Frameworks */,
193 | );
194 | buildRules = (
195 | );
196 | dependencies = (
197 | );
198 | name = ScrollingStackViewController_Example;
199 | productName = ScrollingStackViewController;
200 | productReference = 607FACD01AFB9204008FA782 /* ScrollingStackViewController_Example.app */;
201 | productType = "com.apple.product-type.application";
202 | };
203 | 607FACE41AFB9204008FA782 /* ScrollingStackViewController_Tests */ = {
204 | isa = PBXNativeTarget;
205 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScrollingStackViewController_Tests" */;
206 | buildPhases = (
207 | E6A30E881F2B6D446DF0FE0D /* [CP] Check Pods Manifest.lock */,
208 | 607FACE11AFB9204008FA782 /* Sources */,
209 | 607FACE21AFB9204008FA782 /* Frameworks */,
210 | 607FACE31AFB9204008FA782 /* Resources */,
211 | );
212 | buildRules = (
213 | );
214 | dependencies = (
215 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */,
216 | );
217 | name = ScrollingStackViewController_Tests;
218 | productName = Tests;
219 | productReference = 607FACE51AFB9204008FA782 /* ScrollingStackViewController_Tests.xctest */;
220 | productType = "com.apple.product-type.bundle.unit-test";
221 | };
222 | /* End PBXNativeTarget section */
223 |
224 | /* Begin PBXProject section */
225 | 607FACC81AFB9204008FA782 /* Project object */ = {
226 | isa = PBXProject;
227 | attributes = {
228 | LastSwiftUpdateCheck = 0720;
229 | LastUpgradeCheck = 1320;
230 | ORGANIZATIONNAME = CocoaPods;
231 | TargetAttributes = {
232 | 607FACCF1AFB9204008FA782 = {
233 | CreatedOnToolsVersion = 6.3.1;
234 | LastSwiftMigration = 1000;
235 | };
236 | 607FACE41AFB9204008FA782 = {
237 | CreatedOnToolsVersion = 6.3.1;
238 | LastSwiftMigration = 1000;
239 | TestTargetID = 607FACCF1AFB9204008FA782;
240 | };
241 | };
242 | };
243 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ScrollingStackViewController" */;
244 | compatibilityVersion = "Xcode 3.2";
245 | developmentRegion = en;
246 | hasScannedForEncodings = 0;
247 | knownRegions = (
248 | en,
249 | Base,
250 | );
251 | mainGroup = 607FACC71AFB9204008FA782;
252 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */;
253 | projectDirPath = "";
254 | projectRoot = "";
255 | targets = (
256 | 607FACCF1AFB9204008FA782 /* ScrollingStackViewController_Example */,
257 | 607FACE41AFB9204008FA782 /* ScrollingStackViewController_Tests */,
258 | );
259 | };
260 | /* End PBXProject section */
261 |
262 | /* Begin PBXResourcesBuildPhase section */
263 | 607FACCE1AFB9204008FA782 /* Resources */ = {
264 | isa = PBXResourcesBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */,
268 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */,
269 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */,
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | };
273 | 607FACE31AFB9204008FA782 /* Resources */ = {
274 | isa = PBXResourcesBuildPhase;
275 | buildActionMask = 2147483647;
276 | files = (
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXResourcesBuildPhase section */
281 |
282 | /* Begin PBXShellScriptBuildPhase section */
283 | BA89436BBB507AFC82925AAC /* [CP] Embed Pods Frameworks */ = {
284 | isa = PBXShellScriptBuildPhase;
285 | buildActionMask = 2147483647;
286 | files = (
287 | );
288 | inputPaths = (
289 | "${PODS_ROOT}/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-frameworks.sh",
290 | "${BUILT_PRODUCTS_DIR}/ScrollingStackViewController/ScrollingStackViewController.framework",
291 | );
292 | name = "[CP] Embed Pods Frameworks";
293 | outputPaths = (
294 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ScrollingStackViewController.framework",
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | shellPath = /bin/sh;
298 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ScrollingStackViewController_Example/Pods-ScrollingStackViewController_Example-frameworks.sh\"\n";
299 | showEnvVarsInLog = 0;
300 | };
301 | E6A30E881F2B6D446DF0FE0D /* [CP] Check Pods Manifest.lock */ = {
302 | isa = PBXShellScriptBuildPhase;
303 | buildActionMask = 2147483647;
304 | files = (
305 | );
306 | inputPaths = (
307 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
308 | "${PODS_ROOT}/Manifest.lock",
309 | );
310 | name = "[CP] Check Pods Manifest.lock";
311 | outputPaths = (
312 | "$(DERIVED_FILE_DIR)/Pods-ScrollingStackViewController_Tests-checkManifestLockResult.txt",
313 | );
314 | runOnlyForDeploymentPostprocessing = 0;
315 | shellPath = /bin/sh;
316 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
317 | showEnvVarsInLog = 0;
318 | };
319 | E9FEB511874CD546908AC01F /* [CP] Check Pods Manifest.lock */ = {
320 | isa = PBXShellScriptBuildPhase;
321 | buildActionMask = 2147483647;
322 | files = (
323 | );
324 | inputPaths = (
325 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
326 | "${PODS_ROOT}/Manifest.lock",
327 | );
328 | name = "[CP] Check Pods Manifest.lock";
329 | outputPaths = (
330 | "$(DERIVED_FILE_DIR)/Pods-ScrollingStackViewController_Example-checkManifestLockResult.txt",
331 | );
332 | runOnlyForDeploymentPostprocessing = 0;
333 | shellPath = /bin/sh;
334 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
335 | showEnvVarsInLog = 0;
336 | };
337 | /* End PBXShellScriptBuildPhase section */
338 |
339 | /* Begin PBXSourcesBuildPhase section */
340 | 607FACCC1AFB9204008FA782 /* Sources */ = {
341 | isa = PBXSourcesBuildPhase;
342 | buildActionMask = 2147483647;
343 | files = (
344 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */,
345 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
346 | B33DE7C21E44DD3B00236E66 /* SegmentController.swift in Sources */,
347 | );
348 | runOnlyForDeploymentPostprocessing = 0;
349 | };
350 | 607FACE11AFB9204008FA782 /* Sources */ = {
351 | isa = PBXSourcesBuildPhase;
352 | buildActionMask = 2147483647;
353 | files = (
354 | 607FACEC1AFB9204008FA782 /* ScrollingStackViewTests.swift in Sources */,
355 | 023DFA3120DBDF83008DC1CA /* ScrollingStackViewInsertionLocationTests.swift in Sources */,
356 | 6DC866512057D24C0077AF5F /* Factory.swift in Sources */,
357 | );
358 | runOnlyForDeploymentPostprocessing = 0;
359 | };
360 | /* End PBXSourcesBuildPhase section */
361 |
362 | /* Begin PBXTargetDependency section */
363 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = {
364 | isa = PBXTargetDependency;
365 | target = 607FACCF1AFB9204008FA782 /* ScrollingStackViewController_Example */;
366 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */;
367 | };
368 | /* End PBXTargetDependency section */
369 |
370 | /* Begin PBXVariantGroup section */
371 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = {
372 | isa = PBXVariantGroup;
373 | children = (
374 | 607FACDA1AFB9204008FA782 /* Base */,
375 | );
376 | name = Main.storyboard;
377 | sourceTree = "";
378 | };
379 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = {
380 | isa = PBXVariantGroup;
381 | children = (
382 | 607FACDF1AFB9204008FA782 /* Base */,
383 | );
384 | name = LaunchScreen.xib;
385 | sourceTree = "";
386 | };
387 | /* End PBXVariantGroup section */
388 |
389 | /* Begin XCBuildConfiguration section */
390 | 607FACED1AFB9204008FA782 /* Debug */ = {
391 | isa = XCBuildConfiguration;
392 | buildSettings = {
393 | ALWAYS_SEARCH_USER_PATHS = NO;
394 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
395 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
396 | CLANG_CXX_LIBRARY = "libc++";
397 | CLANG_ENABLE_MODULES = YES;
398 | CLANG_ENABLE_OBJC_ARC = YES;
399 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
400 | CLANG_WARN_BOOL_CONVERSION = YES;
401 | CLANG_WARN_COMMA = YES;
402 | CLANG_WARN_CONSTANT_CONVERSION = YES;
403 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
405 | CLANG_WARN_EMPTY_BODY = YES;
406 | CLANG_WARN_ENUM_CONVERSION = YES;
407 | CLANG_WARN_INFINITE_RECURSION = YES;
408 | CLANG_WARN_INT_CONVERSION = YES;
409 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
411 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
412 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
413 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
414 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
415 | CLANG_WARN_STRICT_PROTOTYPES = YES;
416 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
417 | CLANG_WARN_UNREACHABLE_CODE = YES;
418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
420 | COPY_PHASE_STRIP = NO;
421 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
422 | ENABLE_STRICT_OBJC_MSGSEND = YES;
423 | ENABLE_TESTABILITY = YES;
424 | GCC_C_LANGUAGE_STANDARD = gnu99;
425 | GCC_DYNAMIC_NO_PIC = NO;
426 | GCC_NO_COMMON_BLOCKS = YES;
427 | GCC_OPTIMIZATION_LEVEL = 0;
428 | GCC_PREPROCESSOR_DEFINITIONS = (
429 | "DEBUG=1",
430 | "$(inherited)",
431 | );
432 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
433 | GCC_TREAT_WARNINGS_AS_ERRORS = YES;
434 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
435 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
436 | GCC_WARN_UNDECLARED_SELECTOR = YES;
437 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
438 | GCC_WARN_UNUSED_FUNCTION = YES;
439 | GCC_WARN_UNUSED_VARIABLE = YES;
440 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
441 | MTL_ENABLE_DEBUG_INFO = YES;
442 | ONLY_ACTIVE_ARCH = YES;
443 | SDKROOT = iphoneos;
444 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
445 | SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
446 | SWIFT_VERSION = 5.0;
447 | };
448 | name = Debug;
449 | };
450 | 607FACEE1AFB9204008FA782 /* Release */ = {
451 | isa = XCBuildConfiguration;
452 | buildSettings = {
453 | ALWAYS_SEARCH_USER_PATHS = NO;
454 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
455 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
456 | CLANG_CXX_LIBRARY = "libc++";
457 | CLANG_ENABLE_MODULES = YES;
458 | CLANG_ENABLE_OBJC_ARC = YES;
459 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
460 | CLANG_WARN_BOOL_CONVERSION = YES;
461 | CLANG_WARN_COMMA = YES;
462 | CLANG_WARN_CONSTANT_CONVERSION = YES;
463 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
464 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
465 | CLANG_WARN_EMPTY_BODY = YES;
466 | CLANG_WARN_ENUM_CONVERSION = YES;
467 | CLANG_WARN_INFINITE_RECURSION = YES;
468 | CLANG_WARN_INT_CONVERSION = YES;
469 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
470 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
471 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
472 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
473 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
474 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
475 | CLANG_WARN_STRICT_PROTOTYPES = YES;
476 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
477 | CLANG_WARN_UNREACHABLE_CODE = YES;
478 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
479 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
480 | COPY_PHASE_STRIP = NO;
481 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
482 | ENABLE_NS_ASSERTIONS = NO;
483 | ENABLE_STRICT_OBJC_MSGSEND = YES;
484 | GCC_C_LANGUAGE_STANDARD = gnu99;
485 | GCC_NO_COMMON_BLOCKS = YES;
486 | GCC_TREAT_WARNINGS_AS_ERRORS = YES;
487 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
488 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
489 | GCC_WARN_UNDECLARED_SELECTOR = YES;
490 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
491 | GCC_WARN_UNUSED_FUNCTION = YES;
492 | GCC_WARN_UNUSED_VARIABLE = YES;
493 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
494 | MTL_ENABLE_DEBUG_INFO = NO;
495 | SDKROOT = iphoneos;
496 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
497 | SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
498 | SWIFT_VERSION = 5.0;
499 | VALIDATE_PRODUCT = YES;
500 | };
501 | name = Release;
502 | };
503 | 607FACF01AFB9204008FA782 /* Debug */ = {
504 | isa = XCBuildConfiguration;
505 | baseConfigurationReference = 58D345B7E363CF54DDB19741 /* Pods-ScrollingStackViewController_Example.debug.xcconfig */;
506 | buildSettings = {
507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
508 | DEVELOPMENT_TEAM = "";
509 | INFOPLIST_FILE = ScrollingStackViewController/Info.plist;
510 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
512 | MODULE_NAME = ExampleApp;
513 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
514 | PRODUCT_NAME = "$(TARGET_NAME)";
515 | };
516 | name = Debug;
517 | };
518 | 607FACF11AFB9204008FA782 /* Release */ = {
519 | isa = XCBuildConfiguration;
520 | baseConfigurationReference = D0FAB569C57A7F2887BEA9DC /* Pods-ScrollingStackViewController_Example.release.xcconfig */;
521 | buildSettings = {
522 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
523 | DEVELOPMENT_TEAM = "";
524 | INFOPLIST_FILE = ScrollingStackViewController/Info.plist;
525 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
527 | MODULE_NAME = ExampleApp;
528 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
529 | PRODUCT_NAME = "$(TARGET_NAME)";
530 | };
531 | name = Release;
532 | };
533 | 607FACF31AFB9204008FA782 /* Debug */ = {
534 | isa = XCBuildConfiguration;
535 | baseConfigurationReference = 0A6F52BF4FD6BD4288D7BEDC /* Pods-ScrollingStackViewController_Tests.debug.xcconfig */;
536 | buildSettings = {
537 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
538 | FRAMEWORK_SEARCH_PATHS = (
539 | "$(SDKROOT)/Developer/Library/Frameworks",
540 | "$(inherited)",
541 | );
542 | GCC_PREPROCESSOR_DEFINITIONS = (
543 | "DEBUG=1",
544 | "$(inherited)",
545 | );
546 | INFOPLIST_FILE = Tests/Info.plist;
547 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
548 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
549 | PRODUCT_NAME = "$(TARGET_NAME)";
550 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrollingStackViewController_Example.app/ScrollingStackViewController_Example";
551 | };
552 | name = Debug;
553 | };
554 | 607FACF41AFB9204008FA782 /* Release */ = {
555 | isa = XCBuildConfiguration;
556 | baseConfigurationReference = 627F56F09E411F967BC74499 /* Pods-ScrollingStackViewController_Tests.release.xcconfig */;
557 | buildSettings = {
558 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
559 | FRAMEWORK_SEARCH_PATHS = (
560 | "$(SDKROOT)/Developer/Library/Frameworks",
561 | "$(inherited)",
562 | );
563 | INFOPLIST_FILE = Tests/Info.plist;
564 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
565 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
566 | PRODUCT_NAME = "$(TARGET_NAME)";
567 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrollingStackViewController_Example.app/ScrollingStackViewController_Example";
568 | };
569 | name = Release;
570 | };
571 | /* End XCBuildConfiguration section */
572 |
573 | /* Begin XCConfigurationList section */
574 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ScrollingStackViewController" */ = {
575 | isa = XCConfigurationList;
576 | buildConfigurations = (
577 | 607FACED1AFB9204008FA782 /* Debug */,
578 | 607FACEE1AFB9204008FA782 /* Release */,
579 | );
580 | defaultConfigurationIsVisible = 0;
581 | defaultConfigurationName = Release;
582 | };
583 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScrollingStackViewController_Example" */ = {
584 | isa = XCConfigurationList;
585 | buildConfigurations = (
586 | 607FACF01AFB9204008FA782 /* Debug */,
587 | 607FACF11AFB9204008FA782 /* Release */,
588 | );
589 | defaultConfigurationIsVisible = 0;
590 | defaultConfigurationName = Release;
591 | };
592 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ScrollingStackViewController_Tests" */ = {
593 | isa = XCConfigurationList;
594 | buildConfigurations = (
595 | 607FACF31AFB9204008FA782 /* Debug */,
596 | 607FACF41AFB9204008FA782 /* Release */,
597 | );
598 | defaultConfigurationIsVisible = 0;
599 | defaultConfigurationName = Release;
600 | };
601 | /* End XCConfigurationList section */
602 | };
603 | rootObject = 607FACC81AFB9204008FA782 /* Project object */;
604 | }
605 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController.xcodeproj/xcshareddata/xcschemes/ScrollingStackViewController-Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
55 |
58 |
59 |
60 |
61 |
63 |
69 |
70 |
71 |
72 |
73 |
83 |
85 |
91 |
92 |
93 |
94 |
100 |
102 |
108 |
109 |
110 |
111 |
113 |
114 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // ScrollingStackViewController
4 | //
5 | // Created by Maciej Trybilo on 01/24/2017.
6 | // Copyright © 2017 Just Eat Holding Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
60 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/Images.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" : "ios-marketing",
45 | "size" : "1024x1024",
46 | "scale" : "1x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/SegmentController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SegmentController.swift
3 | // ScrollingStackViewController
4 | //
5 | // Created by Maciej Trybilo on 03/02/2017.
6 | // Copyright © 2017 Just Eat Holding Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ScrollingStackViewController
11 |
12 | class SegmentController: UIViewController {
13 |
14 | @IBOutlet weak var countLabel: UILabel!
15 | @IBOutlet weak var hideMeButton: UIButton!
16 |
17 | var count: Int? {
18 | didSet {
19 | configure()
20 | }
21 | }
22 |
23 | override func viewDidLoad() {
24 | super.viewDidLoad()
25 |
26 | configure()
27 | }
28 |
29 | @IBAction func hideShowButtonTapped(_ sender: Any) {
30 |
31 | let shouldHide = !countLabel.isHidden
32 |
33 | ScrollingStackViewController.defaultAnimate({
34 |
35 | self.countLabel.isHidden = shouldHide
36 | self.hideMeButton.setTitle(shouldHide ? "Show label" : "Hide label", for: .normal)
37 |
38 | }, completion: nil)
39 | }
40 |
41 | private func configure() {
42 |
43 | guard isViewLoaded else { return }
44 |
45 | if let count = count {
46 | countLabel.text = "View Controller \(count)"
47 | } else {
48 | countLabel.text = nil
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Example/ScrollingStackViewController/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ScrollingStackViewController
4 | //
5 | // Created by Maciej Trybilo on 01/24/2017.
6 | // Copyright © 2017 Just Eat Holding Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ScrollingStackViewController
11 |
12 | class ViewController: ScrollingStackViewController {
13 |
14 | @IBOutlet weak var hideShowButton: UIBarButtonItem!
15 |
16 | var segments = [SegmentController]()
17 | var isExampleViewControllerHidden = false
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 |
22 | let storyboard = UIStoryboard(name: "Main", bundle: nil)
23 |
24 | for x in 1...5 {
25 |
26 | let viewController = storyboard.instantiateViewController(withIdentifier: "SegmentController") as! SegmentController
27 | viewController.count = x
28 | viewController.view.backgroundColor = UIColor.color(forRow: x)
29 | segments += [viewController]
30 |
31 | add(viewController: viewController)
32 | }
33 |
34 | let insets = UIEdgeInsets(top: 20, left: 40, bottom: 20, right: 40)
35 |
36 | for x in 6...10 {
37 |
38 | let viewController = storyboard.instantiateViewController(withIdentifier: "SegmentController") as! SegmentController
39 | viewController.count = x
40 | viewController.view.backgroundColor = UIColor.color(forRow: x)
41 | segments += [viewController]
42 |
43 | add(viewController: viewController, edgeInsets: insets)
44 | }
45 |
46 |
47 | // separators
48 | spacingColor = UIColor.lightGray
49 | stackView.spacing = 0.5
50 |
51 | borderWidth = 0
52 | }
53 |
54 | @IBAction func hideShowTapped(_ sender: UIButton) {
55 | isExampleViewControllerHidden.toggle()
56 | set(self.segments[4], hidden: isExampleViewControllerHidden, animated: true) { _ in
57 | self.hideShowButton.title = self.isExampleViewControllerHidden ? "Show 5" : "Hide 5"
58 | }
59 | }
60 |
61 | @IBAction func scrollTo8Tapped(_ sender: Any) {
62 | scrollTo(viewController: segments[7])
63 | }
64 | }
65 |
66 |
67 | extension UIColor {
68 |
69 | static let possibleColors: [UIColor] = [
70 | UIColor(red: 246/255, green: 119/255, blue: 118/255, alpha: 1.0),
71 | UIColor(red: 250/255, green: 184/255, blue: 146/255, alpha: 1.0),
72 | UIColor(red: 255/255, green: 249/255, blue: 174/255, alpha: 1.0),
73 | UIColor(red: 184/255, green: 217/255, blue: 200/255, alpha: 1.0),
74 | UIColor(red: 114/255, green: 185/255, blue: 226/255, alpha: 1.0),
75 | ]
76 |
77 | static func color(forRow row: Int) -> UIColor {
78 | let index = (row - 1) % possibleColors.count
79 | return possibleColors[index]
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/Example/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Example/Tests/ScrollingStackViewInsertionLocationTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScrollingStackViewInsertionLocationTests.swift
3 | // ScrollingStackViewController_Tests
4 | //
5 | // Created by Ed Rutter on 21/06/2018.
6 | // Copyright © 2018 Just Eat. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import ScrollingStackViewController
11 |
12 | class ScrollingStackViewInsertionTests: XCTestCase {
13 |
14 | var vc: ScrollingStackViewController!
15 |
16 | var childA: UIViewController!
17 | var childB: UIViewController!
18 | var insertingChild: UIViewController!
19 |
20 | override func setUp() {
21 | super.setUp()
22 |
23 | let window = UIApplication.shared.keyWindow!
24 | vc = Factory.createScrollingStackViewController(window: window)
25 |
26 | childA = Factory.createStubViewController(height: 100)
27 | childB = Factory.createStubViewController(height: 100)
28 | insertingChild = Factory.createStubViewController(height: 100)
29 | }
30 |
31 | func testShow_InsertingIfNeeded_Insets() {
32 | let insets = UIEdgeInsets(top: 10, left: 20, bottom: 30, right: 40)
33 | vc.show(insertingChild, insertIfNeededWith: (position: .end, insets: insets))
34 |
35 | let paddingView = vc.stackView.arrangedSubviews.first!
36 | let topConstraint = paddingView.constraints.filter { $0.firstAttribute == .top }.first
37 | let leftConstraint = paddingView.constraints.filter { $0.firstAttribute == .leading }.first
38 | let bottomConstraint = paddingView.constraints.filter { $0.firstAttribute == .bottom }.first
39 | let rightConstraint = paddingView.constraints.filter { $0.firstAttribute == .trailing }.first
40 |
41 | XCTAssert(paddingView.subviews.count == 1, "View should be added in a container view")
42 |
43 | XCTAssert(topConstraint?.constant == 10, "Constraint constant should be 10")
44 | XCTAssert(leftConstraint?.constant == 20, "Constraint constant should be 20")
45 | XCTAssert(bottomConstraint?.constant == 30, "Constraint constant should be 30")
46 | XCTAssert(rightConstraint?.constant == 40, "Constraint constant should be 40")
47 |
48 | vc.show(insertingChild, insertIfNeededWith: (position: .end, insets: .zero))
49 | XCTAssert(topConstraint?.constant == 10, "Constraint constant should still be 10")
50 | XCTAssert(leftConstraint?.constant == 20, "Constraint constant should still 20")
51 | XCTAssert(bottomConstraint?.constant == 30, "Constraint constant should still 30")
52 | XCTAssert(rightConstraint?.constant == 40, "Constraint constant should still 40")
53 | }
54 |
55 | func testShow_insertingIfNeeded_atStart() {
56 | vc.insert(viewController: childA, at: 0)
57 | vc.insert(viewController: childB, at: 1)
58 |
59 | vc.show(insertingChild, insertIfNeededWith: (position: .start, insets: .zero))
60 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 0, "Ordering should be InsertingChild, Child A, Child B")
61 | }
62 |
63 | func testShow_insertingIfNeeded_atEnd() {
64 | vc.insert(viewController: childA, at: 0)
65 | vc.insert(viewController: childB, at: 1)
66 |
67 | vc.show(insertingChild, insertIfNeededWith: (position: .end, insets: .zero))
68 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 2, "Ordering should be Child A, Child B, InsertingChild")
69 | }
70 |
71 | func testShow_insertingIfNeeded_atIndex() {
72 | vc.insert(viewController: childA, at: 0)
73 | vc.insert(viewController: childB, at: 1)
74 |
75 | vc.show(insertingChild, insertIfNeededWith: (position: .index(0), insets: .zero))
76 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 0, "Ordering should be InsertingChild, Child A, Child B")
77 |
78 | vc.remove(insertingChild, animated: false)
79 | vc.show(insertingChild, insertIfNeededWith: (position: .index(2), insets: .zero), animated: false)
80 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 2, "Ordering should be Child A, Child B, InsertingChild")
81 |
82 | vc.remove(insertingChild, animated: false)
83 | vc.show(insertingChild, insertIfNeededWith: (position: .index(5), insets: .zero), animated: false)
84 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 2, "Ordering should be Child A, Child B, InsertingChild")
85 | }
86 |
87 | func testShow_insertingIfNeeded_animated_atIndex() {
88 | vc.insert(viewController: childA, at: 0)
89 | vc.insert(viewController: childB, at: 1)
90 |
91 | vc.show(insertingChild, insertIfNeededWith: (position: .index(0), insets: .zero))
92 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 0, "Ordering should be InsertingChild, Child A, Child B")
93 |
94 | let index2Expectation = expectation(description: "Child2Expectation")
95 | vc.remove(insertingChild, animated: true) { _ in
96 | self.vc.show(self.insertingChild, insertIfNeededWith: (position: .index(2), insets: .zero)) { _ in
97 | index2Expectation.fulfill()
98 | }
99 | }
100 | waitForExpectations(timeout: 1, handler: nil)
101 | XCTAssertEqual(vc.arrangedViewOrContainerIndex(for: insertingChild.view), 2, "Ordering should be Child A, Child B, InsertingChild")
102 |
103 | let index5Expectation = expectation(description: "Child5Expectation")
104 | vc.remove(insertingChild, animated: true) { _ in
105 | self.vc.show(self.insertingChild, insertIfNeededWith: (position: .index(5), insets: .zero)) { _ in
106 | index5Expectation.fulfill()
107 | }
108 | }
109 | waitForExpectations(timeout: 1, handler: nil)
110 | XCTAssertEqual(vc.arrangedViewOrContainerIndex(for: insertingChild.view), 2, "Ordering should be Child A, Child B, InsertingChild")
111 | }
112 |
113 | func testShow_insertingIfNeeded_afterViewViewController() {
114 | vc.insert(viewController: childA, at: 0)
115 | vc.insert(viewController: childB, at: 1)
116 |
117 | vc.show(insertingChild, insertIfNeededWith: (position: .after(viewController: childA), insets: .zero))
118 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 1, "Ordering should be Child A, InsertingChild, Child B")
119 | }
120 |
121 | func testShow_insertingIfNeeded_beforeViewViewController() {
122 | vc.insert(viewController: childA, at: 0)
123 | vc.insert(viewController: childB, at: 1)
124 |
125 | vc.show(insertingChild, insertIfNeededWith: (position: .before(viewController: childB), insets: .zero))
126 | XCTAssert(vc.arrangedViewOrContainerIndex(for: insertingChild.view) == 1, "Ordering should be Child A, InsertingChild, Child B")
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/Example/Tests/ScrollingStackViewTests.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import XCTest
3 | import ScrollingStackViewController
4 |
5 | class ScrollingStackViewTests: XCTestCase {
6 |
7 | let window = UIApplication.shared.keyWindow!
8 |
9 | func testSimpleScrolling() {
10 |
11 | // Sets up a scrolling stack view with two view controller with views both
12 | // equal to the height of the window, then scrolls to the second view
13 |
14 | let vc = Factory.createScrollingStackViewController(window: window)
15 |
16 | let height = vc.view.frame.height
17 |
18 | let child1 = Factory.createStubViewController(height: height)
19 | let child2 = Factory.createStubViewController(height: height)
20 |
21 | vc.add(viewController: child1)
22 | vc.add(viewController: child2)
23 |
24 | vc.view.setNeedsLayout()
25 | vc.view.layoutIfNeeded()
26 |
27 | let expectation = self.expectation(description: "Expect scrolling to finish")
28 |
29 | vc.scrollTo(viewController: child2, {
30 | var safeAreaHeight: CGFloat = 0
31 | if #available(iOS 11.0, *) {
32 | safeAreaHeight = vc.view.safeAreaInsets.top
33 | } else {
34 | safeAreaHeight = vc.topLayoutGuide.length
35 | }
36 | XCTAssertEqual(vc.scrollView.contentOffset.y, vc.view.frame.height - safeAreaHeight)
37 | expectation.fulfill()
38 | })
39 |
40 | self.waitForExpectations(timeout: 5.0, handler: nil)
41 | }
42 |
43 | func testShowHideViewControllers() {
44 | let vc = Factory.createScrollingStackViewController(window: window)
45 |
46 | let height = vc.view.frame.height
47 |
48 | let child1 = Factory.createStubViewController(height: height)
49 | let child2 = Factory.createStubViewController(height: height)
50 | XCTAssert(vc.stackView.arrangedSubviews.count == 0)
51 |
52 | vc.add(viewController: child1)
53 | XCTAssert(vc.stackView.arrangedSubviews.count == 1)
54 |
55 | vc.show(child2)
56 | XCTAssert(vc.stackView.arrangedSubviews.count == 1)
57 |
58 | vc.show(child2, insertIfNeededWith: (position: .end, insets: .zero))
59 | XCTAssert(vc.stackView.arrangedSubviews.count == 2)
60 |
61 | vc.hide(child1)
62 | XCTAssert(vc.stackView.arrangedSubviews.count == 2)
63 | XCTAssert(vc.arrangedView(for: child1)!.isHidden)
64 |
65 | vc.remove(child2, animated: false)
66 | XCTAssertEqual(vc.stackView.arrangedSubviews.count, 1)
67 | }
68 |
69 | func testShowHideAnimatedViewControllers() {
70 | let vc = Factory.createScrollingStackViewController(window: window)
71 |
72 | let height = vc.view.frame.height
73 |
74 | let child1 = Factory.createStubViewController(height: height)
75 | let child2 = Factory.createStubViewController(height: height)
76 | XCTAssert(vc.stackView.arrangedSubviews.count == 0)
77 |
78 | vc.add(viewController: child1)
79 | XCTAssert(vc.stackView.arrangedSubviews.count == 1)
80 |
81 | vc.show(child2)
82 | XCTAssert(vc.stackView.arrangedSubviews.count == 1)
83 |
84 | vc.show(child2, insertIfNeededWith: (position: .end, insets: .zero))
85 | XCTAssert(vc.stackView.arrangedSubviews.count == 2)
86 |
87 | vc.hide(child1)
88 | XCTAssert(vc.stackView.arrangedSubviews.count == 2)
89 | XCTAssert(vc.arrangedView(for: child1)!.isHidden)
90 |
91 | let exp = expectation(description: "HideExpectation")
92 | vc.remove(child2, animated: true) { _ in
93 | exp.fulfill()
94 | }
95 | waitForExpectations(timeout: 1, handler: nil)
96 | XCTAssertEqual(vc.stackView.arrangedSubviews.count, 1)
97 | }
98 |
99 | func testRemoveViewControllers() {
100 | let vc = Factory.createScrollingStackViewController(window: window)
101 | let height = vc.view.frame.height
102 |
103 | let arrangedVC = Factory.createStubViewController(height: height)
104 | let containedVC = Factory.createStubViewController(height: height)
105 | let edgeInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
106 |
107 | vc.add(viewController: arrangedVC)
108 | vc.show(arrangedVC)
109 | vc.show(containedVC, insertIfNeededWith: (position: .end, insets: edgeInset))
110 | XCTAssert(vc.stackView.arrangedSubviews.count == 2)
111 |
112 | vc.remove(arrangedVC, animated: false)
113 | XCTAssertEqual(vc.stackView.arrangedSubviews.count, 1)
114 | XCTAssert(arrangedVC.view.superview == nil)
115 |
116 | vc.remove(containedVC, animated: false)
117 | XCTAssertEqual(vc.stackView.arrangedSubviews.count, 0)
118 | XCTAssert(containedVC.view.superview == nil)
119 | }
120 |
121 | func testComplexScrolling() {
122 |
123 | // Setup a scrolling stack view with lots of equally fixed-height children,
124 | // then scroll to one of the children and verify the offset is a product of
125 | // the fixed height of the children
126 |
127 | let height = CGFloat(200);
128 |
129 | let scrollIndex = 10;
130 |
131 | let result = Factory.createScrollingStackViewController(withStubViewControllerCount: 20, ofHeight: height, in: window)
132 |
133 | let expectation = self.expectation(description: "Expect scrolling to finish")
134 |
135 | result.viewController.scrollTo(viewController: result.children[scrollIndex], {
136 | var safeAreaHeight: CGFloat = 0
137 | if #available(iOS 11.0, *) {
138 | safeAreaHeight = result.viewController.view.safeAreaInsets.top
139 | } else {
140 | safeAreaHeight = result.viewController.topLayoutGuide.length
141 | }
142 | XCTAssertEqual(result.viewController.scrollView.contentOffset.y, (height * CGFloat(scrollIndex)) - safeAreaHeight)
143 | expectation.fulfill()
144 | })
145 |
146 | self.waitForExpectations(timeout: 5.0, handler: nil)
147 | }
148 |
149 | func testChildViewControllerInsets() {
150 |
151 | // Verify that stack view correctly applies insets to its children
152 |
153 | let height = CGFloat(200);
154 | let insets = UIEdgeInsets(top: 100, left: 100, bottom: 100, right: 100)
155 |
156 | let result = Factory.createScrollingStackViewController(withStubViewControllerCount: 20, ofHeight: height, withInsets: insets, in: window)
157 |
158 | let stackView = result.viewController.stackView
159 |
160 | stackView.arrangedSubviews.forEach { view in
161 | let innerView = view.subviews.first!
162 | XCTAssertEqual(view.frame.width, stackView.frame.width)
163 | XCTAssertEqual(view.frame.height, innerView.frame.height + insets.top + insets.bottom)
164 | XCTAssertEqual(view.frame.width, innerView.frame.width + insets.left + insets.right)
165 | }
166 |
167 | }
168 |
169 | func testScrollingWithInsets() {
170 |
171 | // Verify that the scroll offset correctly accounts for insets of
172 | // the children of the stack view
173 |
174 | let height = CGFloat(200);
175 | let insets = UIEdgeInsets(top: 100, left: 100, bottom: 100, right: 100)
176 |
177 | let scrollIndex = 10;
178 |
179 | let result = Factory.createScrollingStackViewController(withStubViewControllerCount: 20, ofHeight: height, withInsets: insets, in: window)
180 |
181 | let expectation = self.expectation(description: "Expect scrolling to finish")
182 |
183 | result.viewController.scrollTo(viewController: result.children[scrollIndex], {
184 | var safeAreaHeight: CGFloat = 0
185 | if #available(iOS 11.0, *) {
186 | safeAreaHeight = result.viewController.view.safeAreaInsets.top
187 | } else {
188 | safeAreaHeight = result.viewController.topLayoutGuide.length
189 | }
190 | XCTAssertEqual(result.viewController.scrollView.contentOffset.y, ((height + insets.top + insets.bottom) * CGFloat(scrollIndex)) - safeAreaHeight)
191 | expectation.fulfill()
192 | })
193 |
194 | self.waitForExpectations(timeout: 5.0, handler: nil)
195 | }
196 |
197 | }
198 |
--------------------------------------------------------------------------------
/Example/Tests/UnitTests.xctestplan:
--------------------------------------------------------------------------------
1 | {
2 | "configurations" : [
3 | {
4 | "id" : "412F9657-B02E-44FB-96F3-FB1D00E9D1F7",
5 | "name" : "Default",
6 | "options" : {
7 |
8 | }
9 | }
10 | ],
11 | "defaultOptions" : {
12 | "targetForVariableExpansion" : {
13 | "containerPath" : "container:ScrollingStackViewController.xcodeproj",
14 | "identifier" : "607FACCF1AFB9204008FA782",
15 | "name" : "ScrollingStackViewController_Example"
16 | }
17 | },
18 | "testTargets" : [
19 | {
20 | "target" : {
21 | "containerPath" : "container:ScrollingStackViewController.xcodeproj",
22 | "identifier" : "607FACE41AFB9204008FA782",
23 | "name" : "ScrollingStackViewController_Tests"
24 | }
25 | }
26 | ],
27 | "version" : 1
28 | }
29 |
--------------------------------------------------------------------------------
/Example/Tests/Utilities/Factory.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import UIKit
3 | import ScrollingStackViewController
4 |
5 | typealias FactoryResult = (viewController: ScrollingStackViewController, children: [UIViewController])
6 |
7 | class Factory {
8 |
9 | static func createScrollingStackViewController(window: UIWindow) -> ScrollingStackViewController {
10 | let scrollingStackViewController = ScrollingStackViewController()
11 | let navController = UINavigationController(rootViewController: scrollingStackViewController)
12 | window.rootViewController = navController
13 | _ = navController.view
14 | window.makeKeyAndVisible()
15 | return scrollingStackViewController
16 | }
17 |
18 | static func createStubViewController(height: CGFloat) -> UIViewController {
19 | let vc = UIViewController()
20 | let constraints = [
21 | vc.view.heightAnchor.constraint(equalToConstant: height)
22 | ]
23 |
24 | NSLayoutConstraint.activate(constraints)
25 | return vc
26 | }
27 |
28 | static func createScrollingStackViewController(withStubViewControllerCount count: Int, ofHeight height: CGFloat, in window: UIWindow) -> FactoryResult {
29 | let scrollingStackViewController = createScrollingStackViewController(window: window)
30 | let array: [UIViewController] = (0.. FactoryResult {
38 | let scrollingStackViewController = createScrollingStackViewController(window: window)
39 | let array: [UIViewController] = (0.. 1.10.2'
6 | gem 'fastlane', '~> 2.191.0'
7 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (3.0.5)
5 | rexml
6 | activesupport (5.2.8)
7 | concurrent-ruby (~> 1.0, >= 1.0.2)
8 | i18n (>= 0.7, < 2)
9 | minitest (~> 5.1)
10 | tzinfo (~> 1.1)
11 | addressable (2.8.0)
12 | public_suffix (>= 2.0.2, < 5.0)
13 | algoliasearch (1.27.5)
14 | httpclient (~> 2.8, >= 2.8.3)
15 | json (>= 1.5.1)
16 | artifactory (3.0.15)
17 | atomos (0.1.3)
18 | aws-eventstream (1.2.0)
19 | aws-partitions (1.602.0)
20 | aws-sdk-core (3.131.2)
21 | aws-eventstream (~> 1, >= 1.0.2)
22 | aws-partitions (~> 1, >= 1.525.0)
23 | aws-sigv4 (~> 1.1)
24 | jmespath (~> 1, >= 1.6.1)
25 | aws-sdk-kms (1.57.0)
26 | aws-sdk-core (~> 3, >= 3.127.0)
27 | aws-sigv4 (~> 1.1)
28 | aws-sdk-s3 (1.114.0)
29 | aws-sdk-core (~> 3, >= 3.127.0)
30 | aws-sdk-kms (~> 1)
31 | aws-sigv4 (~> 1.4)
32 | aws-sigv4 (1.5.0)
33 | aws-eventstream (~> 1, >= 1.0.2)
34 | babosa (1.0.4)
35 | claide (1.1.0)
36 | cocoapods (1.10.2)
37 | addressable (~> 2.6)
38 | claide (>= 1.0.2, < 2.0)
39 | cocoapods-core (= 1.10.2)
40 | cocoapods-deintegrate (>= 1.0.3, < 2.0)
41 | cocoapods-downloader (>= 1.4.0, < 2.0)
42 | cocoapods-plugins (>= 1.0.0, < 2.0)
43 | cocoapods-search (>= 1.0.0, < 2.0)
44 | cocoapods-trunk (>= 1.4.0, < 2.0)
45 | cocoapods-try (>= 1.1.0, < 2.0)
46 | colored2 (~> 3.1)
47 | escape (~> 0.0.4)
48 | fourflusher (>= 2.3.0, < 3.0)
49 | gh_inspector (~> 1.0)
50 | molinillo (~> 0.6.6)
51 | nap (~> 1.0)
52 | ruby-macho (~> 1.4)
53 | xcodeproj (>= 1.19.0, < 2.0)
54 | cocoapods-core (1.10.2)
55 | activesupport (> 5.0, < 6)
56 | addressable (~> 2.6)
57 | algoliasearch (~> 1.0)
58 | concurrent-ruby (~> 1.1)
59 | fuzzy_match (~> 2.0.4)
60 | nap (~> 1.0)
61 | netrc (~> 0.11)
62 | public_suffix
63 | typhoeus (~> 1.0)
64 | cocoapods-deintegrate (1.0.5)
65 | cocoapods-downloader (1.6.3)
66 | cocoapods-plugins (1.0.0)
67 | nap
68 | cocoapods-search (1.0.1)
69 | cocoapods-trunk (1.6.0)
70 | nap (>= 0.8, < 2.0)
71 | netrc (~> 0.11)
72 | cocoapods-try (1.2.0)
73 | colored (1.2)
74 | colored2 (3.1.2)
75 | commander (4.6.0)
76 | highline (~> 2.0.0)
77 | concurrent-ruby (1.1.10)
78 | declarative (0.0.20)
79 | digest-crc (0.6.4)
80 | rake (>= 12.0.0, < 14.0.0)
81 | domain_name (0.5.20190701)
82 | unf (>= 0.0.5, < 1.0.0)
83 | dotenv (2.7.6)
84 | emoji_regex (3.2.3)
85 | escape (0.0.4)
86 | ethon (0.15.0)
87 | ffi (>= 1.15.0)
88 | excon (0.92.3)
89 | faraday (1.10.0)
90 | faraday-em_http (~> 1.0)
91 | faraday-em_synchrony (~> 1.0)
92 | faraday-excon (~> 1.1)
93 | faraday-httpclient (~> 1.0)
94 | faraday-multipart (~> 1.0)
95 | faraday-net_http (~> 1.0)
96 | faraday-net_http_persistent (~> 1.0)
97 | faraday-patron (~> 1.0)
98 | faraday-rack (~> 1.0)
99 | faraday-retry (~> 1.0)
100 | ruby2_keywords (>= 0.0.4)
101 | faraday-cookie_jar (0.0.7)
102 | faraday (>= 0.8.0)
103 | http-cookie (~> 1.0.0)
104 | faraday-em_http (1.0.0)
105 | faraday-em_synchrony (1.0.0)
106 | faraday-excon (1.1.0)
107 | faraday-httpclient (1.0.1)
108 | faraday-multipart (1.0.4)
109 | multipart-post (~> 2)
110 | faraday-net_http (1.0.1)
111 | faraday-net_http_persistent (1.2.0)
112 | faraday-patron (1.0.0)
113 | faraday-rack (1.0.0)
114 | faraday-retry (1.0.3)
115 | faraday_middleware (1.2.0)
116 | faraday (~> 1.0)
117 | fastimage (2.2.6)
118 | fastlane (2.191.0)
119 | CFPropertyList (>= 2.3, < 4.0.0)
120 | addressable (>= 2.8, < 3.0.0)
121 | artifactory (~> 3.0)
122 | aws-sdk-s3 (~> 1.0)
123 | babosa (>= 1.0.3, < 2.0.0)
124 | bundler (>= 1.12.0, < 3.0.0)
125 | colored
126 | commander (~> 4.6)
127 | dotenv (>= 2.1.1, < 3.0.0)
128 | emoji_regex (>= 0.1, < 4.0)
129 | excon (>= 0.71.0, < 1.0.0)
130 | faraday (~> 1.0)
131 | faraday-cookie_jar (~> 0.0.6)
132 | faraday_middleware (~> 1.0)
133 | fastimage (>= 2.1.0, < 3.0.0)
134 | gh_inspector (>= 1.1.2, < 2.0.0)
135 | google-apis-androidpublisher_v3 (~> 0.3)
136 | google-apis-playcustomapp_v1 (~> 0.1)
137 | google-cloud-storage (~> 1.31)
138 | highline (~> 2.0)
139 | json (< 3.0.0)
140 | jwt (>= 2.1.0, < 3)
141 | mini_magick (>= 4.9.4, < 5.0.0)
142 | multipart-post (~> 2.0.0)
143 | naturally (~> 2.2)
144 | plist (>= 3.1.0, < 4.0.0)
145 | rubyzip (>= 2.0.0, < 3.0.0)
146 | security (= 0.1.3)
147 | simctl (~> 1.6.3)
148 | terminal-notifier (>= 2.0.0, < 3.0.0)
149 | terminal-table (>= 1.4.5, < 2.0.0)
150 | tty-screen (>= 0.6.3, < 1.0.0)
151 | tty-spinner (>= 0.8.0, < 1.0.0)
152 | word_wrap (~> 1.0.0)
153 | xcodeproj (>= 1.13.0, < 2.0.0)
154 | xcpretty (~> 0.3.0)
155 | xcpretty-travis-formatter (>= 0.0.3)
156 | ffi (1.15.5)
157 | fourflusher (2.3.1)
158 | fuzzy_match (2.0.4)
159 | gh_inspector (1.1.3)
160 | google-apis-androidpublisher_v3 (0.23.0)
161 | google-apis-core (>= 0.6, < 2.a)
162 | google-apis-core (0.7.0)
163 | addressable (~> 2.5, >= 2.5.1)
164 | googleauth (>= 0.16.2, < 2.a)
165 | httpclient (>= 2.8.1, < 3.a)
166 | mini_mime (~> 1.0)
167 | representable (~> 3.0)
168 | retriable (>= 2.0, < 4.a)
169 | rexml
170 | webrick
171 | google-apis-iamcredentials_v1 (0.12.0)
172 | google-apis-core (>= 0.6, < 2.a)
173 | google-apis-playcustomapp_v1 (0.9.0)
174 | google-apis-core (>= 0.6, < 2.a)
175 | google-apis-storage_v1 (0.16.0)
176 | google-apis-core (>= 0.6, < 2.a)
177 | google-cloud-core (1.6.0)
178 | google-cloud-env (~> 1.0)
179 | google-cloud-errors (~> 1.0)
180 | google-cloud-env (1.6.0)
181 | faraday (>= 0.17.3, < 3.0)
182 | google-cloud-errors (1.2.0)
183 | google-cloud-storage (1.37.0)
184 | addressable (~> 2.8)
185 | digest-crc (~> 0.4)
186 | google-apis-iamcredentials_v1 (~> 0.1)
187 | google-apis-storage_v1 (~> 0.1)
188 | google-cloud-core (~> 1.6)
189 | googleauth (>= 0.16.2, < 2.a)
190 | mini_mime (~> 1.0)
191 | googleauth (1.2.0)
192 | faraday (>= 0.17.3, < 3.a)
193 | jwt (>= 1.4, < 3.0)
194 | memoist (~> 0.16)
195 | multi_json (~> 1.11)
196 | os (>= 0.9, < 2.0)
197 | signet (>= 0.16, < 2.a)
198 | highline (2.0.3)
199 | http-cookie (1.0.5)
200 | domain_name (~> 0.5)
201 | httpclient (2.8.3)
202 | i18n (1.10.0)
203 | concurrent-ruby (~> 1.0)
204 | jmespath (1.6.1)
205 | json (2.6.2)
206 | jwt (2.4.1)
207 | memoist (0.16.2)
208 | mini_magick (4.11.0)
209 | mini_mime (1.1.2)
210 | minitest (5.16.1)
211 | molinillo (0.6.6)
212 | multi_json (1.15.0)
213 | multipart-post (2.0.0)
214 | nanaimo (0.3.0)
215 | nap (1.1.0)
216 | naturally (2.2.1)
217 | netrc (0.11.0)
218 | os (1.1.4)
219 | plist (3.6.0)
220 | public_suffix (4.0.7)
221 | rake (13.0.6)
222 | representable (3.2.0)
223 | declarative (< 0.1.0)
224 | trailblazer-option (>= 0.1.1, < 0.2.0)
225 | uber (< 0.2.0)
226 | retriable (3.1.2)
227 | rexml (3.2.5)
228 | rouge (2.0.7)
229 | ruby-macho (1.4.0)
230 | ruby2_keywords (0.0.5)
231 | rubyzip (2.3.2)
232 | security (0.1.3)
233 | signet (0.17.0)
234 | addressable (~> 2.8)
235 | faraday (>= 0.17.5, < 3.a)
236 | jwt (>= 1.5, < 3.0)
237 | multi_json (~> 1.10)
238 | simctl (1.6.8)
239 | CFPropertyList
240 | naturally
241 | terminal-notifier (2.0.0)
242 | terminal-table (1.8.0)
243 | unicode-display_width (~> 1.1, >= 1.1.1)
244 | thread_safe (0.3.6)
245 | trailblazer-option (0.1.2)
246 | tty-cursor (0.7.1)
247 | tty-screen (0.8.1)
248 | tty-spinner (0.9.3)
249 | tty-cursor (~> 0.7)
250 | typhoeus (1.4.0)
251 | ethon (>= 0.9.0)
252 | tzinfo (1.2.10)
253 | thread_safe (~> 0.1)
254 | uber (0.1.0)
255 | unf (0.1.4)
256 | unf_ext
257 | unf_ext (0.0.8.2)
258 | unicode-display_width (1.8.0)
259 | webrick (1.7.0)
260 | word_wrap (1.0.0)
261 | xcodeproj (1.22.0)
262 | CFPropertyList (>= 2.3.3, < 4.0)
263 | atomos (~> 0.1.3)
264 | claide (>= 1.0.2, < 2.0)
265 | colored2 (~> 3.1)
266 | nanaimo (~> 0.3.0)
267 | rexml (~> 3.2.4)
268 | xcpretty (0.3.0)
269 | rouge (~> 2.0.7)
270 | xcpretty-travis-formatter (1.0.1)
271 | xcpretty (~> 0.2, >= 0.0.7)
272 |
273 | PLATFORMS
274 | arm64-darwin-21
275 | x86_64-darwin-19
276 |
277 | DEPENDENCIES
278 | cocoapods (~> 1.10.2)
279 | fastlane (~> 2.191.0)
280 |
281 | RUBY VERSION
282 | ruby 3.0.2p107
283 |
284 | BUNDLED WITH
285 | 2.2.22
286 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2019 Just Eat Holding Ltd
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.1
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "ScrollingStackViewController",
7 | platforms: [
8 | .iOS(.v12)
9 | ],
10 | products: [
11 | .library(
12 | name: "ScrollingStackViewController",
13 | targets: ["ScrollingStackViewController"]),
14 | ],
15 | targets: [
16 | .target(
17 | name: "ScrollingStackViewController",
18 | path: "ScrollingStackViewController/"
19 | )
20 | ]
21 | )
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | ### Warning: This library is not supported by Just Eat Takeaway anymore and therefore considered deprecated. The repository has been archived.
4 |
5 | # ScrollingStackViewController
6 |
7 | [](https://travis-ci.org/justeat/ScrollingStackViewController)
8 | [](http://cocoapods.org/pods/ScrollingStackViewController)
9 | [](http://cocoapods.org/pods/ScrollingStackViewController)
10 | [](http://cocoapods.org/pods/ScrollingStackViewController)
11 |
12 | `ScrollingStackViewController` is a convenient replacement for the `UITableViewController` more suitable in situations when you're building a scrolling controller with a limited number or dynamic and rich "cells".
13 |
14 | ## Motivation
15 |
16 | `UITableViewController` is great for situations when we want to display an arbitrary (possibly large) number of relatively simple cells. Sometimes however you just want to partition your view controller into vertically laid out segments. The segments are probably highly heterogenous, complex, their number is well defined, but you still want to be able to show and hide them depending on the situation. You can achieve that with a `UITableViewController`, but it gets a litte awkward:
17 |
18 | - The Data Source pattern is an overkill here. You might as well just add your segments directly and hide/show them without having to go through `cellForRow:at:`, table view updates, etc. Juggling indexes when you want to show and hide different cells tends to be bug and crash prone and sometimes difficult to animate nicely. You probably don't care for cell reuse in this case, so the advantages of delegation are missing here.
19 | - It's difficult to partition the code well. `UITableViewCell` belongs in the View layer, so you either have to keep the Controller parts in your containing view controller in which case you haven't partioned the Controller layer, or you have to pervert `UITableViewCell` and stick Controller code there. In either case--not a win.
20 |
21 | The solution to the above that `ScrollingStackViewController` provides is to use child view controllers that can honestly keep their own Controller code while using `UIStackView` to deal with the layout and `UIScrollView` for scrolling. It's a simple class that provides all of the scaffolding and aims to deal with all of the UIKit quirks that it likes to throw at you.
22 |
23 | 
24 |
25 | We invite you to check the Order Details page in the Just Eat UK app where each segment is a child view controller, making the such page a perfect use case for using `ScrollingStackViewController`.
26 | The containing view controller only needs to know how to instantiate, initialise, and add the child controllers.
27 |
28 | ## Usage
29 |
30 | Inherit from `ScrollingStackViewController`. Instantiate and add your child view controllers. **Make sure your child view controllers have constraints to self-size vertically.**
31 |
32 | ```swift
33 | class ViewController: ScrollingStackViewController {
34 |
35 | var viewController1: UIViewController!
36 | var viewController2: UIViewController!
37 |
38 | override func viewDidLoad() {
39 | super.viewDidLoad()
40 |
41 | let storyboard = UIStoryboard(name: "Main", bundle: nil)
42 |
43 | viewController1 = storyboard.instantiateViewController(withIdentifier: "ChildController1") as! ChildController1
44 | viewController2 = storyboard.instantiateViewController(withIdentifier: "ChildController2") as! ChildController2
45 |
46 | add(viewController: viewController1)
47 | add(viewController: viewController2)
48 | }
49 | }
50 | ```
51 |
52 | Insert a child view controller at position.
53 |
54 | ```swift
55 | insert(viewController: viewController3, at: .index(1))
56 | ```
57 |
58 | Insert a child view controller with padding (child view is added to a container view). NB: When a child view is added to a padding container view, the show/hide functions should be used.
59 | ```swift
60 | insert(viewController: viewController4,
61 | edgeInsets: UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8),
62 | at: .after(viewController3))
63 | ```
64 |
65 | Remove a child view controller. NB: Might be easier to just add all VCs you were planning to use and then just show and hide them as needed. See below.
66 |
67 | ```swift
68 | remove(viewController: viewController3)
69 | ```
70 |
71 | Show and hide the view controllers using `show(viewController:)` and `hide(viewController:)`. The transition animates.
72 |
73 | ```swift
74 | show(viewController: viewController1)
75 | ```
76 |
77 | The default is a spring animation with 0.5 duration and 1 damping. You can override the default animation closure.
78 |
79 | ```swift
80 | animate = { animations, completion in
81 | UIView.animate(withDuration: 1, animations: animations, completion: completion)
82 | }
83 | ```
84 |
85 | Add spacing.
86 |
87 | ```swift
88 | spacingColor = UIColor.lightGray
89 | stackView.spacing = 0.5
90 | ```
91 |
92 | Add border.
93 |
94 | ```swift
95 | borderColor = UIColor.darkGray
96 | borderWidth = 1
97 | ```
98 |
99 | Programatically scroll to child view controller.
100 |
101 | ```swift
102 | scrollTo(viewController: viewController2, action: { print("Done scrolling!") })
103 | ```
104 |
105 | Override scroll animation.
106 |
107 | ```swift
108 | scrollAnimate = { animations, completion in
109 | UIView.animate(withDuration: 1, animations: animations, completion: completion)
110 | }
111 | ```
112 |
113 | You still have access to the stack view, scroll view, and the background view that back the view controller if you need to do something that's not covered quickly.
114 |
115 | ```swift
116 | scrollView.alwaysBounceVertical = false
117 | stackView.spacing = 1
118 | stackViewBackgroundView.alpha = 0
119 | ```
120 |
121 | ## Requirements
122 |
123 | ScrollingStackViewController requires iOS 12 or higher.
124 |
125 | ## Installation
126 |
127 | ### CocoaPods
128 |
129 | ScrollingStackViewController is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:
130 |
131 | ```ruby
132 | pod "ScrollingStackViewController"
133 | ```
134 |
135 | ### Swift Package Manager
136 |
137 | ScrollingStackViewController is also available through SPM. Copy the URL for this repo, and add the package in your project settings.
138 |
139 |
140 | ## License
141 |
142 | ScrollingStackViewController is available under the Apache License Version 2.0, January 2004. See the LICENSE file for more info.
143 |
144 | - Just Eat iOS team
145 |
--------------------------------------------------------------------------------
/ScrollingStackViewController.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'ScrollingStackViewController'
3 | s.version = ENV['LIB_VERSION']
4 | s.summary = 'A view controller that uses root views of child view controllers as views in a UIStackView.'
5 |
6 | s.description = <<-DESC
7 | This view controller is more suitable than an UITableViewController when creating a list of segments that are dynamically behaving, but are well defined and bound in number. The delegation pattern that the data source of an UITableViewController is best suited for situation when there is an unbounded number of cells, but in many cases is an overkill and becomes a burden. Also, UITableViewCells are not controllers, but sometimes it makes sense to properly partition the responsibility of the segments, not just over the view layer. Using ScrollingStackViewController you can have a bunch of view controllers, each of them encapsulating their own responsibilities.
8 | DESC
9 |
10 | s.homepage = 'https://github.com/justeat/ScrollingStackViewController'
11 | s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
12 | s.author = 'Just Eat Takeaway iOS Team'
13 | s.source = { :git => 'https://github.com/justeat/ScrollingStackViewController.git', :tag => s.version.to_s }
14 |
15 | s.ios.deployment_target = '12.0'
16 | s.swift_version = '5.0'
17 |
18 | s.source_files = 'ScrollingStackViewController/Classes/**/*'
19 | end
20 |
--------------------------------------------------------------------------------
/ScrollingStackViewController/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justeat/ScrollingStackViewController/241da831abaa3acb24a71ed4fe03f871312844e1/ScrollingStackViewController/Assets/.gitkeep
--------------------------------------------------------------------------------
/ScrollingStackViewController/Classes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justeat/ScrollingStackViewController/241da831abaa3acb24a71ed4fe03f871312844e1/ScrollingStackViewController/Classes/.gitkeep
--------------------------------------------------------------------------------
/ScrollingStackViewController/Classes/ScrollingStackViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScrollingStackViewController.swift
3 | // Pods
4 | //
5 | // Created by Maciej Trybilo on 24/01/2017.
6 | // Copyright © 2017 Just Eat Holding Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public enum Position {
12 | case start
13 | case end
14 | case index(_: Int)
15 | case after(viewController: UIViewController)
16 | case before(viewController: UIViewController)
17 | }
18 |
19 | open class ScrollingStackViewController: UIViewController {
20 |
21 | public let scrollView: UIScrollView = UIScrollView()
22 | public let stackViewBackgroundView: UIView = UIView()
23 | public let stackView: UIStackView = UIStackView()
24 |
25 | public var spacingColor: UIColor = UIColor.clear {
26 |
27 | didSet {
28 | stackViewBackgroundView.backgroundColor = spacingColor
29 | }
30 | }
31 |
32 | public var borderColor: UIColor = UIColor.gray {
33 |
34 | didSet {
35 | stackViewBackgroundView.layer.borderColor = borderColor.cgColor
36 | }
37 | }
38 |
39 | public var borderWidth: CGFloat = 0.5 {
40 |
41 | didSet {
42 | stackViewBackgroundView.layer.borderWidth = borderWidth
43 |
44 | pinStackView(withBorderWidth: self.borderWidth)
45 | scrollView.layoutIfNeeded()
46 | }
47 | }
48 |
49 | static public func defaultAnimate(_ animations: @escaping () -> (), completion: ((Bool) -> Void)?) {
50 |
51 | UIView.animate(withDuration: 0.5,
52 | delay: 0,
53 | usingSpringWithDamping: 1,
54 | initialSpringVelocity: 0,
55 | options: [],
56 | animations: animations,
57 | completion: completion)
58 | }
59 |
60 | public var animate = ScrollingStackViewController.defaultAnimate
61 |
62 | private var viewDidLayoutSubviewsClosure: (() -> Void)?
63 |
64 | private var maxOffsetY: CGFloat {
65 | return self.scrollView.contentSize.height - self.scrollView.frame.size.height
66 | }
67 |
68 | static public func defaultScrollAnimate(_ animations: @escaping () -> (), completion: ((Bool) -> Void)?) {
69 |
70 | UIView.animate(withDuration: 0.75,
71 | delay: 0,
72 | usingSpringWithDamping: 0.7,
73 | initialSpringVelocity: 0.25,
74 | options: [],
75 | animations: animations,
76 | completion: completion)
77 | }
78 |
79 | public var scrollAnimate = ScrollingStackViewController.defaultScrollAnimate
80 |
81 | override open func viewDidLoad() {
82 |
83 | super.viewDidLoad()
84 |
85 | scrollView.translatesAutoresizingMaskIntoConstraints = false
86 | stackViewBackgroundView.translatesAutoresizingMaskIntoConstraints = false
87 | stackView.translatesAutoresizingMaskIntoConstraints = false
88 |
89 | view.addSubview(scrollView)
90 | scrollView.addSubview(stackViewBackgroundView)
91 | scrollView.addSubview(stackView)
92 |
93 | stackView.axis = .vertical
94 |
95 | stackViewBackgroundView.backgroundColor = UIColor.clear
96 |
97 | let views = ["scrollView" : scrollView,
98 | "stackViewBackgroundView" : stackViewBackgroundView,
99 | ] as [String : Any]
100 |
101 | var constraints = [NSLayoutConstraint]()
102 |
103 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "V:|[scrollView]|", options: [], metrics: nil, views: views)
104 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|[scrollView]|", options: [], metrics: nil, views: views)
105 |
106 | pinStackView(withBorderWidth: borderWidth)
107 |
108 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "V:|[stackViewBackgroundView]|", options: [], metrics: nil, views: views)
109 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|[stackViewBackgroundView(==scrollView)]|", options: [], metrics: nil, views: views)
110 |
111 | NSLayoutConstraint.activate(constraints)
112 | }
113 |
114 | override open func viewDidLayoutSubviews() {
115 | super.viewDidLayoutSubviews()
116 | viewDidLayoutSubviewsClosure?()
117 | }
118 |
119 | var stackViewConstraints = [NSLayoutConstraint]()
120 |
121 | private func pinStackView(withBorderWidth borderWidth: CGFloat) {
122 |
123 | scrollView.removeConstraints(stackViewConstraints)
124 | stackViewConstraints.removeAll()
125 |
126 | stackViewConstraints += [stackView.topAnchor.constraint(equalTo: scrollView.topAnchor, constant: borderWidth)]
127 | stackViewConstraints += [stackView.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: -borderWidth)]
128 |
129 | stackViewConstraints += [stackView.leftAnchor.constraint(equalTo: scrollView.leftAnchor, constant: borderWidth)]
130 | stackViewConstraints += [stackView.rightAnchor.constraint(equalTo: scrollView.rightAnchor, constant: -borderWidth)]
131 |
132 | stackViewConstraints += [stackView.widthAnchor.constraint(equalTo: scrollView.widthAnchor, constant: -borderWidth * 2)]
133 |
134 | stackViewConstraints.forEach { $0.isActive = true }
135 | }
136 |
137 | //MARK: - View controllers insertion
138 |
139 | open func add(viewController: UIViewController) {
140 | insert(viewController: viewController)
141 | }
142 |
143 | open func add(viewController: UIViewController, edgeInsets: UIEdgeInsets? = nil) {
144 | insert(viewController: viewController, edgeInsets: edgeInsets)
145 | }
146 |
147 | open func insert(viewController: UIViewController, at index: Int) {
148 | insert(viewController: viewController, at: .index(index))
149 | }
150 |
151 | open func insert(viewController: UIViewController, edgeInsets: UIEdgeInsets? = nil, at position: Position = .end) {
152 | var insertionIndex: Int?
153 |
154 | switch position {
155 | case .start:
156 | insertionIndex = 0
157 |
158 | case .end:
159 | insertionIndex = children.count
160 |
161 | case .index(let index):
162 | insertionIndex = min(Int(index), children.count)
163 |
164 | case .after(let afterViewController):
165 | if let afterViewIndex = arrangedViewOrContainerIndex(for: afterViewController.view) {
166 | insertionIndex = afterViewIndex + 1
167 | } else {
168 | insertionIndex = children.count
169 | }
170 |
171 | case .before(let beforeViewController):
172 | if let beforeViewIndex = arrangedViewOrContainerIndex(for: beforeViewController.view) {
173 | insertionIndex = beforeViewIndex
174 | } else {
175 | insertionIndex = children.count
176 | }
177 | }
178 |
179 | insert(viewController: viewController, edgeInsets: edgeInsets, at: insertionIndex ?? children.count)
180 | }
181 |
182 | open func insert(viewController: UIViewController, edgeInsets: UIEdgeInsets?, at index: Int) {
183 | addChild(viewController)
184 | viewController.didMove(toParent: self)
185 |
186 | if let edgeInsets = edgeInsets {
187 | let childView: UIView = viewController.view
188 | let containerView = UIView()
189 | containerView.translatesAutoresizingMaskIntoConstraints = false
190 | childView.translatesAutoresizingMaskIntoConstraints = false
191 | containerView.addSubview(childView)
192 |
193 | let constraints = [childView.topAnchor.constraint(equalTo: containerView.topAnchor, constant: edgeInsets.top),
194 | childView.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: edgeInsets.left),
195 | containerView.bottomAnchor.constraint(equalTo: childView.bottomAnchor, constant: edgeInsets.bottom),
196 | containerView.trailingAnchor.constraint(equalTo: childView.trailingAnchor, constant: edgeInsets.right)]
197 |
198 | NSLayoutConstraint.activate(constraints)
199 | stackView.insertArrangedSubview(containerView, at: index)
200 | } else {
201 | stackView.insertArrangedSubview(viewController.view, at: index)
202 | }
203 | }
204 |
205 | /// Use this function if you want to show a view controller.
206 | ///
207 | /// - Parameters:
208 | /// - viewController: The viewController that has to be shown.
209 | /// - insertionParameters: The position and the insets that has to be used to insert the view controller.
210 | /// - animated: True is should be performed using the animation. False otherwise.
211 | /// - completionHandler: A completion handler called when the animation finish or immidiatly after adding the view controller if animated parameter is false.
212 | ///
213 | /// - Note: if you pass nil to the `insertIfNeededWith` the view controller will be shown only if it is already in the view hierarchy.
214 | open func show(_ viewController: UIViewController, insertIfNeededWith insertionParameters: (position: Position, insets: UIEdgeInsets)?, animated: Bool = true, completionHandler: ((Bool) -> Void)? = nil) {
215 |
216 | if let insertionParameters = insertionParameters, !isArrangedOrContained(view: viewController.view) || !children.contains(viewController) {
217 | insert(viewController: viewController, edgeInsets: insertionParameters.insets, at: insertionParameters.position)
218 | }
219 |
220 | show(viewController, animated: animated, completionHandler: completionHandler)
221 | }
222 |
223 | //MARK: - View controllers removal
224 |
225 | private func remove(arranged viewController: UIViewController) {
226 | guard let arrangedView = arrangedView(for: viewController) else { return }
227 | arrangedView.removeFromSuperview()
228 | if arrangedView != viewController.view { //This happens when the view controller was added with edges. In this case it is added to a container view instead of adding it directly.
229 | viewController.view.removeFromSuperview()
230 | }
231 |
232 | viewController.willMove(toParent: nil)
233 | viewController.removeFromParent()
234 | }
235 |
236 | open func remove(_ viewController: UIViewController, animated: Bool = false, completionHandler: ((Bool) -> Void)? = nil) {
237 | if !animated {
238 | remove(arranged: viewController)
239 | completionHandler?(true)
240 | return
241 | }
242 |
243 | hide(viewController, animated: true) { [weak self] isFinished in
244 | self?.remove(arranged: viewController)
245 | completionHandler?(isFinished)
246 | }
247 | }
248 |
249 | //MARK: - Change view visibility
250 |
251 | open func show(_ viewController: UIViewController, animated: Bool = true, completionHandler: ((Bool) -> Void)? = nil) {
252 | set(viewController, hidden: false, animated: animated, completionHandler: completionHandler)
253 | }
254 |
255 | open func hide(_ viewController: UIViewController, animated: Bool = false, completionHandler: ((Bool) -> Void)? = nil) {
256 | set(viewController, hidden: true, animated: animated, completionHandler: completionHandler)
257 | }
258 |
259 | open func set(_ viewController: UIViewController, hidden: Bool, animated: Bool, completionHandler: ((Bool) -> Void)? = nil) {
260 | guard let view = self.arrangedView(for: viewController) else {
261 | completionHandler?(false)
262 | return
263 | }
264 |
265 | let toAlpha: CGFloat = hidden ? 0 : 1
266 |
267 | if !animated {
268 | view.alpha = toAlpha
269 | view.isHidden = hidden
270 | completionHandler?(true)
271 | } else {
272 | animate({
273 | view.alpha = toAlpha
274 | view.isHidden = hidden
275 | }, { isFinished in
276 | completionHandler?(isFinished)
277 | })
278 | }
279 | }
280 |
281 | //MARK: - Scrolling
282 |
283 | open func scrollTo(viewController: UIViewController, _ action:(() -> Void)? = nil) {
284 |
285 | //check if viewDidLayoutSubviews finished to resize scrollview
286 | if self.isArranged(view: viewController.view), self.maxOffsetY > 0 {
287 | self.scrollTo(view: viewController.view, {
288 | action?()
289 | })
290 | } else if let superview = viewController.view.superview, superview != stackView, self.isArranged(view: superview), self.maxOffsetY > 0 {
291 | self.scrollTo(view: superview, {
292 | action?()
293 | })
294 | } else {
295 | viewDidLayoutSubviewsClosure = { [weak self] in
296 | self?.scrollTo(viewController: viewController, {
297 | self?.viewDidLayoutSubviewsClosure = nil
298 | action?()
299 | })
300 | }
301 | }
302 | }
303 |
304 | private func scrollTo(view: UIView, _ finished: @escaping (() -> Void)) {
305 |
306 | scrollAnimate({
307 | let offsetY = (view.frame.origin.y >= self.maxOffsetY) ? self.maxOffsetY : view.frame.origin.y
308 | self.scrollView.contentOffset = CGPoint(x: view.frame.origin.x, y: offsetY)
309 | }, { isFinished in
310 | if isFinished {
311 | finished()
312 | }
313 | })
314 | }
315 |
316 | //MARK: - Querying
317 |
318 | public func isArranged(view: UIView) -> Bool {
319 | return arrangedViewIndex(for: view) != nil
320 | }
321 |
322 | public func isArrangedOrContained(view: UIView) -> Bool {
323 | return arrangedViewOrContainerIndex(for: view) != nil
324 | }
325 |
326 | public func arrangedView(for viewController: UIViewController) -> UIView? {
327 | guard let index = arrangedViewOrContainerIndex(for: viewController.view) else { return nil }
328 | return stackView.arrangedSubviews[index]
329 | }
330 |
331 | public func arrangedViewOrContainerIndex(for view: UIView) -> Int? {
332 | return arrangedViewIndex(for: view) ?? arrangedViewContainerIndex(for: view)
333 | }
334 |
335 | public func arrangedViewIndex(for view: UIView) -> Int? {
336 | return stackView.arrangedSubviews.index(of: view)
337 | }
338 |
339 | public func arrangedViewContainerIndex(for view: UIView) -> Int? {
340 | if let containerView = stackView.arrangedSubviews.first(where: { $0.subviews.contains(view) }) {
341 | return stackView.arrangedSubviews.index(of: containerView)
342 | } else {
343 | return nil
344 | }
345 | }
346 | }
347 |
--------------------------------------------------------------------------------
/_Pods.xcodeproj:
--------------------------------------------------------------------------------
1 | Example/Pods/Pods.xcodeproj
--------------------------------------------------------------------------------
/fastlane/Fastfile:
--------------------------------------------------------------------------------
1 | default_platform :ios
2 |
3 | platform :ios do
4 |
5 | before_all do
6 | ensure_bundle_exec
7 | $derived_data_folder = "./derived_data"
8 | $workspace_filename = "Example/ScrollingStackViewController.xcworkspace"
9 | $common_test_xcargs = "COMPILER_INDEX_STORE_ENABLE=NO"
10 | end
11 |
12 | lane :unit_tests do |parameters|
13 | UI.user_error! "Missing parameter 'device'" unless parameters.has_key?(:device)
14 | device = parameters[:device]
15 | run_tests(
16 | workspace: $workspace_filename,
17 | scheme: "ScrollingStackViewController-Example",
18 | testplan: "UnitTests",
19 | device: device,
20 | code_coverage: true,
21 | result_bundle: true,
22 | concurrent_workers: 1,
23 | xcargs: $common_test_xcargs,
24 | derived_data_path: $derived_data_folder
25 | )
26 | end
27 |
28 | end
29 |
--------------------------------------------------------------------------------
/fastlane/README.md:
--------------------------------------------------------------------------------
1 | fastlane documentation
2 | ================
3 | # Installation
4 |
5 | Make sure you have the latest version of the Xcode command line tools installed:
6 |
7 | ```
8 | xcode-select --install
9 | ```
10 |
11 | Install _fastlane_ using
12 | ```
13 | [sudo] gem install fastlane -NV
14 | ```
15 | or alternatively using `brew install fastlane`
16 |
17 | # Available Actions
18 | ## iOS
19 | ### ios unit_tests
20 | ```
21 | fastlane ios unit_tests
22 | ```
23 |
24 |
25 | ----
26 |
27 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
28 | More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
29 | The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
30 |
--------------------------------------------------------------------------------
/img/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justeat/ScrollingStackViewController/241da831abaa3acb24a71ed4fe03f871312844e1/img/banner.png
--------------------------------------------------------------------------------
/img/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justeat/ScrollingStackViewController/241da831abaa3acb24a71ed4fe03f871312844e1/img/demo.gif
--------------------------------------------------------------------------------