├── .gitignore
├── .idea
├── .name
├── TransitionOperator.iml
├── encodings.xml
├── misc.xml
├── modules.xml
├── runConfigurations
│ ├── TransitionOperator.xml
│ └── TransitionOperatorSample.xml
└── xcode.xml
├── Cartfile.private
├── Cartfile.resolved
├── LICENSE
├── Playground.playground
├── Contents.swift
└── contents.xcplayground
├── README.md
├── TransitionOperator.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ ├── TransitionOperator.xcscheme
│ │ └── TransitionOperatorSample.xcscheme
└── xcuserdata
│ └── rizumita.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
├── TransitionOperator.xcworkspace
└── contents.xcworkspacedata
├── TransitionOperator
├── CompositeTransitionOperator.swift
├── Info.plist
├── TransitionExecutorSegue.swift
├── TransitionExecutorType.swift
├── TransitionOperator.h
├── TransitionOperator.swift
└── TransitionPayload.swift
├── TransitionOperatorSample
├── AppDelegate.swift
├── Assembler.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Destination.storyboard
├── DestinationViewController.swift
├── Info.plist
├── TransitionOperations.swift
├── ViewController.swift
├── Wireframe.swift
└── WireframeType.swift
├── TransitionOperatorSampleTests
├── Info.plist
└── WireframeTests.swift
└── TransitionOperatorTests
├── CompositeTransitionOperatorTests.swift
├── Info.plist
├── TransitionExecutorSegueTests.swift
├── TransitionOperatorTests.swift
└── UIStoryboardSegue+ExtensionsTests.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | ### https://raw.github.com/github/gitignore/a392c48ccf4136ef75acb05b7ead4e9c75235c19/Global/OSX.gitignore
2 |
3 | .DS_Store
4 | .AppleDouble
5 | .LSOverride
6 |
7 | # Icon must end with two \r
8 | Icon
9 |
10 |
11 | # Thumbnails
12 | ._*
13 |
14 | # Files that might appear in the root of a volume
15 | .DocumentRevisions-V100
16 | .fseventsd
17 | .Spotlight-V100
18 | .TemporaryItems
19 | .Trashes
20 | .VolumeIcon.icns
21 |
22 | # Directories potentially created on remote AFP share
23 | .AppleDB
24 | .AppleDesktop
25 | Network Trash Folder
26 | Temporary Items
27 | .apdisk
28 |
29 |
30 | ### https://raw.github.com/github/gitignore/a392c48ccf4136ef75acb05b7ead4e9c75235c19/Swift.gitignore
31 |
32 | # Xcode
33 | #
34 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
35 |
36 | ## Build generated
37 | build/
38 | DerivedData/
39 |
40 | ## Various settings
41 | *.pbxuser
42 | !default.pbxuser
43 | *.mode1v3
44 | !default.mode1v3
45 | *.mode2v3
46 | !default.mode2v3
47 | *.perspectivev3
48 | !default.perspectivev3
49 | xcuserdata/
50 |
51 | ## Other
52 | *.moved-aside
53 | *.xccheckout
54 | *.xcscmblueprint
55 |
56 | ## Obj-C/Swift specific
57 | *.hmap
58 | *.ipa
59 |
60 | ## Playgrounds
61 | timeline.xctimeline
62 | playground.xcworkspace
63 |
64 | # Swift Package Manager
65 | #
66 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
67 | # Packages/
68 | .build/
69 |
70 | # CocoaPods
71 | #
72 | # We recommend against adding the Pods directory to your .gitignore. However
73 | # you should judge for yourself, the pros and cons are mentioned at:
74 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
75 | #
76 | # Pods/
77 |
78 | # Carthage
79 | #
80 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
81 | Carthage/Checkouts
82 |
83 | Carthage/Build
84 |
85 | # fastlane
86 | #
87 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
88 | # screenshots whenever they are needed.
89 | # For more information about the recommended setup visit:
90 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
91 |
92 | fastlane/report.xml
93 | fastlane/screenshots
94 |
95 |
96 | ### https://raw.github.com/github/gitignore/a392c48ccf4136ef75acb05b7ead4e9c75235c19/Global/JetBrains.gitignore
97 |
98 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
99 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
100 |
101 | # User-specific stuff:
102 | .idea/workspace.xml
103 | .idea/tasks.xml
104 | .idea/dictionaries
105 | .idea/vcs.xml
106 | .idea/jsLibraryMappings.xml
107 |
108 | # Sensitive or high-churn files:
109 | .idea/dataSources.ids
110 | .idea/dataSources.xml
111 | .idea/sqlDataSources.xml
112 | .idea/dynamic.xml
113 | .idea/uiDesigner.xml
114 |
115 | # Gradle:
116 | .idea/gradle.xml
117 | .idea/libraries
118 |
119 | # Mongo Explorer plugin:
120 | .idea/mongoSettings.xml
121 |
122 | ## File-based project format:
123 | *.iws
124 |
125 | ## Plugin-specific files:
126 |
127 | # IntelliJ
128 | /out/
129 |
130 | # mpeltonen/sbt-idea plugin
131 | .idea_modules/
132 |
133 | # JIRA plugin
134 | atlassian-ide-plugin.xml
135 |
136 | # Crashlytics plugin (for Android Studio and IntelliJ)
137 | com_crashlytics_export_strings.xml
138 | crashlytics.properties
139 | crashlytics-build.properties
140 | fabric.properties
141 |
142 |
143 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | TransitionOperator
--------------------------------------------------------------------------------
/.idea/TransitionOperator.iml:
--------------------------------------------------------------------------------
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 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
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 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | GeneralObjective-C
17 |
18 |
19 | Objective-C
20 |
21 |
22 | PropertiesObjective-C
23 |
24 |
25 |
26 |
27 | C/C++
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/TransitionOperator.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/TransitionOperatorSample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/xcode.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Cartfile.private:
--------------------------------------------------------------------------------
1 | github "Swinject/Swinject"
2 |
--------------------------------------------------------------------------------
/Cartfile.resolved:
--------------------------------------------------------------------------------
1 | github "Swinject/Swinject" "1.1.0"
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Ryoichi Izumita
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Playground.playground/Contents.swift:
--------------------------------------------------------------------------------
1 | //: Playground - noun: a place where people can play
2 |
3 | import UIKit
4 | import TransitionOperator
5 |
6 | protocol NumberPossessioner: class {
7 | var number: Int? { get set }
8 | }
9 |
10 | class SourceViewController: UIViewController {
11 | let number = 10
12 | }
13 |
14 | class DestinationViewController: UIViewController, NumberPossessioner {
15 | var number: Int?
16 | }
17 |
18 |
19 | UIStoryboardSegue.transitionOperator = TransitionOperator { (segue: UIStoryboardSegue, source: UIViewController, destination: UIViewController) in
20 | // Injecting dependencies by Swinject
21 | // segue.transitionOperator = assembler.resolver.resolve("MySegue")
22 | }
23 |
24 |
25 | let segue = UIStoryboardSegue(identifier: "playground", source: SourceViewController(), destination: DestinationViewController()) {}
26 |
27 | segue.transitionOperator = TransitionOperator { (segue: UIStoryboardSegue, source: SourceViewController, destination: NumberPossessioner) in
28 | destination.number = source.number
29 | print(destination.number)
30 | print(segue.transitionPayload?.payloadValue)
31 | }
32 |
33 | let payload = TransitionPayload(value: 1)
34 | segue.transitionPayload = payload
35 |
36 | segue.perform()
37 |
--------------------------------------------------------------------------------
/Playground.playground/contents.xcplayground:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TransitionOperator
2 | Transition operator class operates transition from one view controller to other view controller. Mainly the class is used with UIStoryboardSegue.
3 |
4 | ## Usage
5 |
6 | The project has real usage as a sample app that inject a transition operator to segue by DI container library named 'Swinject'. If you want to know power of this library, please read that sample project and sample project's unit tests codes.
7 |
8 | ```Swift
9 | protocol NumberPossessioner: class {
10 | var number: Int? { get set }
11 | }
12 |
13 | class SourceViewController: UIViewController {
14 | let number = 10
15 | }
16 |
17 | class DestinationViewController: UIViewController, NumberPossessioner {
18 | var number: Int?
19 | }
20 |
21 |
22 | TransitionExecutorSegue.transitionOperator = TransitionOperator { (segue: TransitionExecutorSegue, source: UIViewController, destination: UIViewController) in
23 | // Injecting dependencies by Swinject
24 | // segue.transitionOperator = assembler.resolver.resolve("MySegue")
25 | }
26 |
27 |
28 | let segue = TransitionExecutorSegue(identifier: "playground", source: SourceViewController(), destination: DestinationViewController()) {}
29 |
30 | segue.transitionOperator = TransitionOperator { (segue: TransitionExecutorSegue, source: SourceViewController, destination: NumberPossessioner) in
31 | destination.number = source.number
32 | print(destination.number)
33 | print(segue.transitionPayload?.payloadValue)
34 | }
35 |
36 | let payload = TransitionPayload(value: 1)
37 | segue.transitionPayload = payload
38 |
39 | segue.perform()
40 | ```
41 |
42 | ## Install by Carthage
43 |
44 | Add the following line to your Cartfile
45 | ```Cartfile
46 | github "rizumita/TransitionOperator"
47 | ```
48 |
49 | and run `carthage update`
50 |
51 |
52 | ## License
53 |
54 | MIT License
55 |
--------------------------------------------------------------------------------
/TransitionOperator.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6A20BC091C824108005ADB2A /* CompositeTransitionOperator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A20BC081C824108005ADB2A /* CompositeTransitionOperator.swift */; };
11 | 6A20BC0B1C82421B005ADB2A /* CompositeTransitionOperatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A20BC0A1C82421B005ADB2A /* CompositeTransitionOperatorTests.swift */; };
12 | 6A6DD8961C7C54CD00B1DD35 /* TransitionOperator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A6DD8951C7C54CD00B1DD35 /* TransitionOperator.h */; settings = {ATTRIBUTES = (Public, ); }; };
13 | 6A6DD89D1C7C54CD00B1DD35 /* TransitionOperator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A6DD8921C7C54CD00B1DD35 /* TransitionOperator.framework */; };
14 | 6A6DD8A21C7C54CD00B1DD35 /* TransitionOperatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A6DD8A11C7C54CD00B1DD35 /* TransitionOperatorTests.swift */; };
15 | 6A6DD8AD1C7C551B00B1DD35 /* TransitionOperator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A6DD8AC1C7C551B00B1DD35 /* TransitionOperator.swift */; };
16 | 6AD52F0E1C89604700713FA6 /* TransitionExecutorSegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD52F0D1C89604700713FA6 /* TransitionExecutorSegue.swift */; };
17 | 6AD52F101C8963B800713FA6 /* TransitionExecutorSegueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD52F0F1C8963B800713FA6 /* TransitionExecutorSegueTests.swift */; };
18 | 6AD838221C7F41FB0070F103 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD838211C7F41FB0070F103 /* AppDelegate.swift */; };
19 | 6AD838241C7F41FB0070F103 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD838231C7F41FB0070F103 /* ViewController.swift */; };
20 | 6AD838271C7F41FB0070F103 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AD838251C7F41FB0070F103 /* Main.storyboard */; };
21 | 6AD838291C7F41FB0070F103 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6AD838281C7F41FB0070F103 /* Assets.xcassets */; };
22 | 6AD8382C1C7F41FB0070F103 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AD8382A1C7F41FB0070F103 /* LaunchScreen.storyboard */; };
23 | 6AD838421C7F42EF0070F103 /* Swinject.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6AD838411C7F42EF0070F103 /* Swinject.framework */; };
24 | 6AD838441C7F435B0070F103 /* DestinationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD838431C7F435B0070F103 /* DestinationViewController.swift */; };
25 | 6AD838461C7F43690070F103 /* Destination.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AD838451C7F43690070F103 /* Destination.storyboard */; };
26 | 6AD838481C7F448D0070F103 /* Assembler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD838471C7F448D0070F103 /* Assembler.swift */; };
27 | 6AD838491C7F45150070F103 /* TransitionOperator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A6DD8921C7C54CD00B1DD35 /* TransitionOperator.framework */; };
28 | 6AD8384D1C7F45890070F103 /* TransitionOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD8384C1C7F45890070F103 /* TransitionOperations.swift */; };
29 | 6AFE42001C7F48F400019C21 /* Wireframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AFE41FF1C7F48F400019C21 /* Wireframe.swift */; };
30 | 6AFE42021C7F4A3700019C21 /* WireframeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AFE42011C7F4A3700019C21 /* WireframeType.swift */; };
31 | 6AFE42041C7F4B2600019C21 /* WireframeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AFE42031C7F4B2600019C21 /* WireframeTests.swift */; };
32 | 6AFE42051C7F4B6900019C21 /* Swinject.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6AD838411C7F42EF0070F103 /* Swinject.framework */; };
33 | CB876974F71B84D27C7406E8 /* TransitionPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB876247AEB23B753364CFA0 /* TransitionPayload.swift */; };
34 | CB876E765DD942F70ABF841F /* TransitionExecutorType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB876B5F17E75B51A45FCC0A /* TransitionExecutorType.swift */; };
35 | /* End PBXBuildFile section */
36 |
37 | /* Begin PBXContainerItemProxy section */
38 | 6A6DD89E1C7C54CD00B1DD35 /* PBXContainerItemProxy */ = {
39 | isa = PBXContainerItemProxy;
40 | containerPortal = 6A6DD8891C7C54CD00B1DD35 /* Project object */;
41 | proxyType = 1;
42 | remoteGlobalIDString = 6A6DD8911C7C54CD00B1DD35;
43 | remoteInfo = TransitionOperator;
44 | };
45 | 6AD838331C7F41FB0070F103 /* PBXContainerItemProxy */ = {
46 | isa = PBXContainerItemProxy;
47 | containerPortal = 6A6DD8891C7C54CD00B1DD35 /* Project object */;
48 | proxyType = 1;
49 | remoteGlobalIDString = 6AD8381E1C7F41FB0070F103;
50 | remoteInfo = TransitionOperatorSample;
51 | };
52 | 6AD8384A1C7F45250070F103 /* PBXContainerItemProxy */ = {
53 | isa = PBXContainerItemProxy;
54 | containerPortal = 6A6DD8891C7C54CD00B1DD35 /* Project object */;
55 | proxyType = 1;
56 | remoteGlobalIDString = 6A6DD8911C7C54CD00B1DD35;
57 | remoteInfo = TransitionOperator;
58 | };
59 | /* End PBXContainerItemProxy section */
60 |
61 | /* Begin PBXFileReference section */
62 | 6A20BC081C824108005ADB2A /* CompositeTransitionOperator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompositeTransitionOperator.swift; sourceTree = ""; };
63 | 6A20BC0A1C82421B005ADB2A /* CompositeTransitionOperatorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompositeTransitionOperatorTests.swift; sourceTree = ""; };
64 | 6A6DD8921C7C54CD00B1DD35 /* TransitionOperator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TransitionOperator.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65 | 6A6DD8951C7C54CD00B1DD35 /* TransitionOperator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TransitionOperator.h; sourceTree = ""; };
66 | 6A6DD8971C7C54CD00B1DD35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
67 | 6A6DD89C1C7C54CD00B1DD35 /* TransitionOperatorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TransitionOperatorTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
68 | 6A6DD8A11C7C54CD00B1DD35 /* TransitionOperatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransitionOperatorTests.swift; sourceTree = ""; };
69 | 6A6DD8A31C7C54CD00B1DD35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
70 | 6A6DD8AC1C7C551B00B1DD35 /* TransitionOperator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionOperator.swift; sourceTree = ""; };
71 | 6A6DD8B01C7C5B1100B1DD35 /* UIStoryboardSegue+ExtensionsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIStoryboardSegue+ExtensionsTests.swift"; sourceTree = ""; };
72 | 6AD52F0D1C89604700713FA6 /* TransitionExecutorSegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionExecutorSegue.swift; sourceTree = ""; };
73 | 6AD52F0F1C8963B800713FA6 /* TransitionExecutorSegueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionExecutorSegueTests.swift; sourceTree = ""; };
74 | 6AD8381F1C7F41FB0070F103 /* TransitionOperatorSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TransitionOperatorSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
75 | 6AD838211C7F41FB0070F103 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
76 | 6AD838231C7F41FB0070F103 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
77 | 6AD838261C7F41FB0070F103 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
78 | 6AD838281C7F41FB0070F103 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
79 | 6AD8382B1C7F41FB0070F103 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
80 | 6AD8382D1C7F41FB0070F103 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
81 | 6AD838321C7F41FB0070F103 /* TransitionOperatorSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TransitionOperatorSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
82 | 6AD838381C7F41FB0070F103 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
83 | 6AD838411C7F42EF0070F103 /* Swinject.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Swinject.framework; path = Carthage/Build/iOS/Swinject.framework; sourceTree = SOURCE_ROOT; };
84 | 6AD838431C7F435B0070F103 /* DestinationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DestinationViewController.swift; sourceTree = ""; };
85 | 6AD838451C7F43690070F103 /* Destination.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Destination.storyboard; sourceTree = ""; };
86 | 6AD838471C7F448D0070F103 /* Assembler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Assembler.swift; sourceTree = ""; };
87 | 6AD8384C1C7F45890070F103 /* TransitionOperations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionOperations.swift; sourceTree = ""; };
88 | 6AFE41FF1C7F48F400019C21 /* Wireframe.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Wireframe.swift; sourceTree = ""; };
89 | 6AFE42011C7F4A3700019C21 /* WireframeType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WireframeType.swift; sourceTree = ""; };
90 | 6AFE42031C7F4B2600019C21 /* WireframeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WireframeTests.swift; sourceTree = ""; };
91 | CB876247AEB23B753364CFA0 /* TransitionPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionPayload.swift; sourceTree = ""; };
92 | CB876B5F17E75B51A45FCC0A /* TransitionExecutorType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionExecutorType.swift; sourceTree = ""; };
93 | /* End PBXFileReference section */
94 |
95 | /* Begin PBXFrameworksBuildPhase section */
96 | 6A6DD88E1C7C54CD00B1DD35 /* Frameworks */ = {
97 | isa = PBXFrameworksBuildPhase;
98 | buildActionMask = 2147483647;
99 | files = (
100 | );
101 | runOnlyForDeploymentPostprocessing = 0;
102 | };
103 | 6A6DD8991C7C54CD00B1DD35 /* Frameworks */ = {
104 | isa = PBXFrameworksBuildPhase;
105 | buildActionMask = 2147483647;
106 | files = (
107 | 6A6DD89D1C7C54CD00B1DD35 /* TransitionOperator.framework in Frameworks */,
108 | );
109 | runOnlyForDeploymentPostprocessing = 0;
110 | };
111 | 6AD8381C1C7F41FB0070F103 /* Frameworks */ = {
112 | isa = PBXFrameworksBuildPhase;
113 | buildActionMask = 2147483647;
114 | files = (
115 | 6AD838491C7F45150070F103 /* TransitionOperator.framework in Frameworks */,
116 | 6AD838421C7F42EF0070F103 /* Swinject.framework in Frameworks */,
117 | );
118 | runOnlyForDeploymentPostprocessing = 0;
119 | };
120 | 6AD8382F1C7F41FB0070F103 /* Frameworks */ = {
121 | isa = PBXFrameworksBuildPhase;
122 | buildActionMask = 2147483647;
123 | files = (
124 | 6AFE42051C7F4B6900019C21 /* Swinject.framework in Frameworks */,
125 | );
126 | runOnlyForDeploymentPostprocessing = 0;
127 | };
128 | /* End PBXFrameworksBuildPhase section */
129 |
130 | /* Begin PBXGroup section */
131 | 6A6DD8881C7C54CD00B1DD35 = {
132 | isa = PBXGroup;
133 | children = (
134 | 6A6DD8941C7C54CD00B1DD35 /* TransitionOperator */,
135 | 6A6DD8A01C7C54CD00B1DD35 /* TransitionOperatorTests */,
136 | 6AD838201C7F41FB0070F103 /* TransitionOperatorSample */,
137 | 6AD838351C7F41FB0070F103 /* TransitionOperatorSampleTests */,
138 | 6A6DD8931C7C54CD00B1DD35 /* Products */,
139 | );
140 | sourceTree = "";
141 | };
142 | 6A6DD8931C7C54CD00B1DD35 /* Products */ = {
143 | isa = PBXGroup;
144 | children = (
145 | 6A6DD8921C7C54CD00B1DD35 /* TransitionOperator.framework */,
146 | 6A6DD89C1C7C54CD00B1DD35 /* TransitionOperatorTests.xctest */,
147 | 6AD8381F1C7F41FB0070F103 /* TransitionOperatorSample.app */,
148 | 6AD838321C7F41FB0070F103 /* TransitionOperatorSampleTests.xctest */,
149 | );
150 | name = Products;
151 | sourceTree = "";
152 | };
153 | 6A6DD8941C7C54CD00B1DD35 /* TransitionOperator */ = {
154 | isa = PBXGroup;
155 | children = (
156 | 6A6DD8951C7C54CD00B1DD35 /* TransitionOperator.h */,
157 | 6A6DD8971C7C54CD00B1DD35 /* Info.plist */,
158 | 6A6DD8AC1C7C551B00B1DD35 /* TransitionOperator.swift */,
159 | 6A20BC081C824108005ADB2A /* CompositeTransitionOperator.swift */,
160 | CB876247AEB23B753364CFA0 /* TransitionPayload.swift */,
161 | CB876B5F17E75B51A45FCC0A /* TransitionExecutorType.swift */,
162 | 6AD52F0D1C89604700713FA6 /* TransitionExecutorSegue.swift */,
163 | );
164 | path = TransitionOperator;
165 | sourceTree = "";
166 | };
167 | 6A6DD8A01C7C54CD00B1DD35 /* TransitionOperatorTests */ = {
168 | isa = PBXGroup;
169 | children = (
170 | 6A6DD8A11C7C54CD00B1DD35 /* TransitionOperatorTests.swift */,
171 | 6A20BC0A1C82421B005ADB2A /* CompositeTransitionOperatorTests.swift */,
172 | 6A6DD8B01C7C5B1100B1DD35 /* UIStoryboardSegue+ExtensionsTests.swift */,
173 | 6A6DD8A31C7C54CD00B1DD35 /* Info.plist */,
174 | 6AD52F0F1C8963B800713FA6 /* TransitionExecutorSegueTests.swift */,
175 | );
176 | path = TransitionOperatorTests;
177 | sourceTree = "";
178 | };
179 | 6AD838201C7F41FB0070F103 /* TransitionOperatorSample */ = {
180 | isa = PBXGroup;
181 | children = (
182 | 6AD838211C7F41FB0070F103 /* AppDelegate.swift */,
183 | 6AD838471C7F448D0070F103 /* Assembler.swift */,
184 | 6AD8384C1C7F45890070F103 /* TransitionOperations.swift */,
185 | 6AFE42011C7F4A3700019C21 /* WireframeType.swift */,
186 | 6AFE41FF1C7F48F400019C21 /* Wireframe.swift */,
187 | 6AD838231C7F41FB0070F103 /* ViewController.swift */,
188 | 6AD838431C7F435B0070F103 /* DestinationViewController.swift */,
189 | 6AD838251C7F41FB0070F103 /* Main.storyboard */,
190 | 6AD838451C7F43690070F103 /* Destination.storyboard */,
191 | 6AD838281C7F41FB0070F103 /* Assets.xcassets */,
192 | 6AD8382A1C7F41FB0070F103 /* LaunchScreen.storyboard */,
193 | 6AD8382D1C7F41FB0070F103 /* Info.plist */,
194 | 6AD838401C7F42E10070F103 /* Frameworks */,
195 | );
196 | path = TransitionOperatorSample;
197 | sourceTree = "";
198 | };
199 | 6AD838351C7F41FB0070F103 /* TransitionOperatorSampleTests */ = {
200 | isa = PBXGroup;
201 | children = (
202 | 6AD838381C7F41FB0070F103 /* Info.plist */,
203 | 6AFE42031C7F4B2600019C21 /* WireframeTests.swift */,
204 | );
205 | path = TransitionOperatorSampleTests;
206 | sourceTree = "";
207 | };
208 | 6AD838401C7F42E10070F103 /* Frameworks */ = {
209 | isa = PBXGroup;
210 | children = (
211 | 6AD838411C7F42EF0070F103 /* Swinject.framework */,
212 | );
213 | name = Frameworks;
214 | sourceTree = "";
215 | };
216 | /* End PBXGroup section */
217 |
218 | /* Begin PBXHeadersBuildPhase section */
219 | 6A6DD88F1C7C54CD00B1DD35 /* Headers */ = {
220 | isa = PBXHeadersBuildPhase;
221 | buildActionMask = 2147483647;
222 | files = (
223 | 6A6DD8961C7C54CD00B1DD35 /* TransitionOperator.h in Headers */,
224 | );
225 | runOnlyForDeploymentPostprocessing = 0;
226 | };
227 | /* End PBXHeadersBuildPhase section */
228 |
229 | /* Begin PBXNativeTarget section */
230 | 6A6DD8911C7C54CD00B1DD35 /* TransitionOperator */ = {
231 | isa = PBXNativeTarget;
232 | buildConfigurationList = 6A6DD8A61C7C54CD00B1DD35 /* Build configuration list for PBXNativeTarget "TransitionOperator" */;
233 | buildPhases = (
234 | 6A6DD88D1C7C54CD00B1DD35 /* Sources */,
235 | 6A6DD88E1C7C54CD00B1DD35 /* Frameworks */,
236 | 6A6DD88F1C7C54CD00B1DD35 /* Headers */,
237 | 6A6DD8901C7C54CD00B1DD35 /* Resources */,
238 | );
239 | buildRules = (
240 | );
241 | dependencies = (
242 | );
243 | name = TransitionOperator;
244 | productName = TransitionOperator;
245 | productReference = 6A6DD8921C7C54CD00B1DD35 /* TransitionOperator.framework */;
246 | productType = "com.apple.product-type.framework";
247 | };
248 | 6A6DD89B1C7C54CD00B1DD35 /* TransitionOperatorTests */ = {
249 | isa = PBXNativeTarget;
250 | buildConfigurationList = 6A6DD8A91C7C54CD00B1DD35 /* Build configuration list for PBXNativeTarget "TransitionOperatorTests" */;
251 | buildPhases = (
252 | 6A6DD8981C7C54CD00B1DD35 /* Sources */,
253 | 6A6DD8991C7C54CD00B1DD35 /* Frameworks */,
254 | 6A6DD89A1C7C54CD00B1DD35 /* Resources */,
255 | );
256 | buildRules = (
257 | );
258 | dependencies = (
259 | 6A6DD89F1C7C54CD00B1DD35 /* PBXTargetDependency */,
260 | );
261 | name = TransitionOperatorTests;
262 | productName = TransitionOperatorTests;
263 | productReference = 6A6DD89C1C7C54CD00B1DD35 /* TransitionOperatorTests.xctest */;
264 | productType = "com.apple.product-type.bundle.unit-test";
265 | };
266 | 6AD8381E1C7F41FB0070F103 /* TransitionOperatorSample */ = {
267 | isa = PBXNativeTarget;
268 | buildConfigurationList = 6AD8383D1C7F41FB0070F103 /* Build configuration list for PBXNativeTarget "TransitionOperatorSample" */;
269 | buildPhases = (
270 | 6AD8381B1C7F41FB0070F103 /* Sources */,
271 | 6AD8381C1C7F41FB0070F103 /* Frameworks */,
272 | 6AD8381D1C7F41FB0070F103 /* Resources */,
273 | 6AD8383F1C7F42A80070F103 /* Carthage Copy Frameworks */,
274 | );
275 | buildRules = (
276 | );
277 | dependencies = (
278 | 6AD8384B1C7F45250070F103 /* PBXTargetDependency */,
279 | );
280 | name = TransitionOperatorSample;
281 | productName = TransitionOperatorSample;
282 | productReference = 6AD8381F1C7F41FB0070F103 /* TransitionOperatorSample.app */;
283 | productType = "com.apple.product-type.application";
284 | };
285 | 6AD838311C7F41FB0070F103 /* TransitionOperatorSampleTests */ = {
286 | isa = PBXNativeTarget;
287 | buildConfigurationList = 6AD8383E1C7F41FB0070F103 /* Build configuration list for PBXNativeTarget "TransitionOperatorSampleTests" */;
288 | buildPhases = (
289 | 6AD8382E1C7F41FB0070F103 /* Sources */,
290 | 6AD8382F1C7F41FB0070F103 /* Frameworks */,
291 | 6AD838301C7F41FB0070F103 /* Resources */,
292 | );
293 | buildRules = (
294 | );
295 | dependencies = (
296 | 6AD838341C7F41FB0070F103 /* PBXTargetDependency */,
297 | );
298 | name = TransitionOperatorSampleTests;
299 | productName = TransitionOperatorSampleTests;
300 | productReference = 6AD838321C7F41FB0070F103 /* TransitionOperatorSampleTests.xctest */;
301 | productType = "com.apple.product-type.bundle.unit-test";
302 | };
303 | /* End PBXNativeTarget section */
304 |
305 | /* Begin PBXProject section */
306 | 6A6DD8891C7C54CD00B1DD35 /* Project object */ = {
307 | isa = PBXProject;
308 | attributes = {
309 | LastSwiftUpdateCheck = 0720;
310 | LastUpgradeCheck = 0720;
311 | ORGANIZATIONNAME = "CAPH TECH";
312 | TargetAttributes = {
313 | 6A6DD8911C7C54CD00B1DD35 = {
314 | CreatedOnToolsVersion = 7.2.1;
315 | };
316 | 6A6DD89B1C7C54CD00B1DD35 = {
317 | CreatedOnToolsVersion = 7.2.1;
318 | };
319 | 6AD8381E1C7F41FB0070F103 = {
320 | CreatedOnToolsVersion = 7.2.1;
321 | };
322 | 6AD838311C7F41FB0070F103 = {
323 | CreatedOnToolsVersion = 7.2.1;
324 | TestTargetID = 6AD8381E1C7F41FB0070F103;
325 | };
326 | };
327 | };
328 | buildConfigurationList = 6A6DD88C1C7C54CD00B1DD35 /* Build configuration list for PBXProject "TransitionOperator" */;
329 | compatibilityVersion = "Xcode 3.2";
330 | developmentRegion = English;
331 | hasScannedForEncodings = 0;
332 | knownRegions = (
333 | en,
334 | Base,
335 | );
336 | mainGroup = 6A6DD8881C7C54CD00B1DD35;
337 | productRefGroup = 6A6DD8931C7C54CD00B1DD35 /* Products */;
338 | projectDirPath = "";
339 | projectRoot = "";
340 | targets = (
341 | 6A6DD8911C7C54CD00B1DD35 /* TransitionOperator */,
342 | 6A6DD89B1C7C54CD00B1DD35 /* TransitionOperatorTests */,
343 | 6AD8381E1C7F41FB0070F103 /* TransitionOperatorSample */,
344 | 6AD838311C7F41FB0070F103 /* TransitionOperatorSampleTests */,
345 | );
346 | };
347 | /* End PBXProject section */
348 |
349 | /* Begin PBXResourcesBuildPhase section */
350 | 6A6DD8901C7C54CD00B1DD35 /* Resources */ = {
351 | isa = PBXResourcesBuildPhase;
352 | buildActionMask = 2147483647;
353 | files = (
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | };
357 | 6A6DD89A1C7C54CD00B1DD35 /* Resources */ = {
358 | isa = PBXResourcesBuildPhase;
359 | buildActionMask = 2147483647;
360 | files = (
361 | );
362 | runOnlyForDeploymentPostprocessing = 0;
363 | };
364 | 6AD8381D1C7F41FB0070F103 /* Resources */ = {
365 | isa = PBXResourcesBuildPhase;
366 | buildActionMask = 2147483647;
367 | files = (
368 | 6AD8382C1C7F41FB0070F103 /* LaunchScreen.storyboard in Resources */,
369 | 6AD838291C7F41FB0070F103 /* Assets.xcassets in Resources */,
370 | 6AD838271C7F41FB0070F103 /* Main.storyboard in Resources */,
371 | 6AD838461C7F43690070F103 /* Destination.storyboard in Resources */,
372 | );
373 | runOnlyForDeploymentPostprocessing = 0;
374 | };
375 | 6AD838301C7F41FB0070F103 /* Resources */ = {
376 | isa = PBXResourcesBuildPhase;
377 | buildActionMask = 2147483647;
378 | files = (
379 | );
380 | runOnlyForDeploymentPostprocessing = 0;
381 | };
382 | /* End PBXResourcesBuildPhase section */
383 |
384 | /* Begin PBXShellScriptBuildPhase section */
385 | 6AD8383F1C7F42A80070F103 /* Carthage Copy Frameworks */ = {
386 | isa = PBXShellScriptBuildPhase;
387 | buildActionMask = 2147483647;
388 | files = (
389 | );
390 | inputPaths = (
391 | "$(SRCROOT)/Carthage/Build/iOS/Swinject.framework",
392 | );
393 | name = "Carthage Copy Frameworks";
394 | outputPaths = (
395 | );
396 | runOnlyForDeploymentPostprocessing = 0;
397 | shellPath = /bin/sh;
398 | shellScript = "/usr/local/bin/carthage copy-frameworks";
399 | };
400 | /* End PBXShellScriptBuildPhase section */
401 |
402 | /* Begin PBXSourcesBuildPhase section */
403 | 6A6DD88D1C7C54CD00B1DD35 /* Sources */ = {
404 | isa = PBXSourcesBuildPhase;
405 | buildActionMask = 2147483647;
406 | files = (
407 | 6A20BC091C824108005ADB2A /* CompositeTransitionOperator.swift in Sources */,
408 | 6A6DD8AD1C7C551B00B1DD35 /* TransitionOperator.swift in Sources */,
409 | 6AD52F0E1C89604700713FA6 /* TransitionExecutorSegue.swift in Sources */,
410 | CB876974F71B84D27C7406E8 /* TransitionPayload.swift in Sources */,
411 | CB876E765DD942F70ABF841F /* TransitionExecutorType.swift in Sources */,
412 | );
413 | runOnlyForDeploymentPostprocessing = 0;
414 | };
415 | 6A6DD8981C7C54CD00B1DD35 /* Sources */ = {
416 | isa = PBXSourcesBuildPhase;
417 | buildActionMask = 2147483647;
418 | files = (
419 | 6A20BC0B1C82421B005ADB2A /* CompositeTransitionOperatorTests.swift in Sources */,
420 | 6A6DD8A21C7C54CD00B1DD35 /* TransitionOperatorTests.swift in Sources */,
421 | 6AD52F101C8963B800713FA6 /* TransitionExecutorSegueTests.swift in Sources */,
422 | );
423 | runOnlyForDeploymentPostprocessing = 0;
424 | };
425 | 6AD8381B1C7F41FB0070F103 /* Sources */ = {
426 | isa = PBXSourcesBuildPhase;
427 | buildActionMask = 2147483647;
428 | files = (
429 | 6AD838481C7F448D0070F103 /* Assembler.swift in Sources */,
430 | 6AD8384D1C7F45890070F103 /* TransitionOperations.swift in Sources */,
431 | 6AFE42001C7F48F400019C21 /* Wireframe.swift in Sources */,
432 | 6AD838241C7F41FB0070F103 /* ViewController.swift in Sources */,
433 | 6AD838441C7F435B0070F103 /* DestinationViewController.swift in Sources */,
434 | 6AD838221C7F41FB0070F103 /* AppDelegate.swift in Sources */,
435 | 6AFE42021C7F4A3700019C21 /* WireframeType.swift in Sources */,
436 | );
437 | runOnlyForDeploymentPostprocessing = 0;
438 | };
439 | 6AD8382E1C7F41FB0070F103 /* Sources */ = {
440 | isa = PBXSourcesBuildPhase;
441 | buildActionMask = 2147483647;
442 | files = (
443 | 6AFE42041C7F4B2600019C21 /* WireframeTests.swift in Sources */,
444 | );
445 | runOnlyForDeploymentPostprocessing = 0;
446 | };
447 | /* End PBXSourcesBuildPhase section */
448 |
449 | /* Begin PBXTargetDependency section */
450 | 6A6DD89F1C7C54CD00B1DD35 /* PBXTargetDependency */ = {
451 | isa = PBXTargetDependency;
452 | target = 6A6DD8911C7C54CD00B1DD35 /* TransitionOperator */;
453 | targetProxy = 6A6DD89E1C7C54CD00B1DD35 /* PBXContainerItemProxy */;
454 | };
455 | 6AD838341C7F41FB0070F103 /* PBXTargetDependency */ = {
456 | isa = PBXTargetDependency;
457 | target = 6AD8381E1C7F41FB0070F103 /* TransitionOperatorSample */;
458 | targetProxy = 6AD838331C7F41FB0070F103 /* PBXContainerItemProxy */;
459 | };
460 | 6AD8384B1C7F45250070F103 /* PBXTargetDependency */ = {
461 | isa = PBXTargetDependency;
462 | target = 6A6DD8911C7C54CD00B1DD35 /* TransitionOperator */;
463 | targetProxy = 6AD8384A1C7F45250070F103 /* PBXContainerItemProxy */;
464 | };
465 | /* End PBXTargetDependency section */
466 |
467 | /* Begin PBXVariantGroup section */
468 | 6AD838251C7F41FB0070F103 /* Main.storyboard */ = {
469 | isa = PBXVariantGroup;
470 | children = (
471 | 6AD838261C7F41FB0070F103 /* Base */,
472 | );
473 | name = Main.storyboard;
474 | sourceTree = "";
475 | };
476 | 6AD8382A1C7F41FB0070F103 /* LaunchScreen.storyboard */ = {
477 | isa = PBXVariantGroup;
478 | children = (
479 | 6AD8382B1C7F41FB0070F103 /* Base */,
480 | );
481 | name = LaunchScreen.storyboard;
482 | sourceTree = "";
483 | };
484 | /* End PBXVariantGroup section */
485 |
486 | /* Begin XCBuildConfiguration section */
487 | 6A6DD8A41C7C54CD00B1DD35 /* Debug */ = {
488 | isa = XCBuildConfiguration;
489 | buildSettings = {
490 | ALWAYS_SEARCH_USER_PATHS = NO;
491 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
492 | CLANG_CXX_LIBRARY = "libc++";
493 | CLANG_ENABLE_MODULES = YES;
494 | CLANG_ENABLE_OBJC_ARC = YES;
495 | CLANG_WARN_BOOL_CONVERSION = YES;
496 | CLANG_WARN_CONSTANT_CONVERSION = YES;
497 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
498 | CLANG_WARN_EMPTY_BODY = YES;
499 | CLANG_WARN_ENUM_CONVERSION = YES;
500 | CLANG_WARN_INT_CONVERSION = YES;
501 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
502 | CLANG_WARN_UNREACHABLE_CODE = YES;
503 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
504 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
505 | COPY_PHASE_STRIP = NO;
506 | CURRENT_PROJECT_VERSION = 1;
507 | DEBUG_INFORMATION_FORMAT = dwarf;
508 | ENABLE_STRICT_OBJC_MSGSEND = YES;
509 | ENABLE_TESTABILITY = YES;
510 | GCC_C_LANGUAGE_STANDARD = gnu99;
511 | GCC_DYNAMIC_NO_PIC = NO;
512 | GCC_NO_COMMON_BLOCKS = YES;
513 | GCC_OPTIMIZATION_LEVEL = 0;
514 | GCC_PREPROCESSOR_DEFINITIONS = (
515 | "DEBUG=1",
516 | "$(inherited)",
517 | );
518 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
519 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
520 | GCC_WARN_UNDECLARED_SELECTOR = YES;
521 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
522 | GCC_WARN_UNUSED_FUNCTION = YES;
523 | GCC_WARN_UNUSED_VARIABLE = YES;
524 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
525 | MTL_ENABLE_DEBUG_INFO = YES;
526 | ONLY_ACTIVE_ARCH = YES;
527 | SDKROOT = iphoneos;
528 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
529 | TARGETED_DEVICE_FAMILY = "1,2";
530 | VERSIONING_SYSTEM = "apple-generic";
531 | VERSION_INFO_PREFIX = "";
532 | };
533 | name = Debug;
534 | };
535 | 6A6DD8A51C7C54CD00B1DD35 /* Release */ = {
536 | isa = XCBuildConfiguration;
537 | buildSettings = {
538 | ALWAYS_SEARCH_USER_PATHS = NO;
539 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
540 | CLANG_CXX_LIBRARY = "libc++";
541 | CLANG_ENABLE_MODULES = YES;
542 | CLANG_ENABLE_OBJC_ARC = YES;
543 | CLANG_WARN_BOOL_CONVERSION = YES;
544 | CLANG_WARN_CONSTANT_CONVERSION = YES;
545 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
546 | CLANG_WARN_EMPTY_BODY = YES;
547 | CLANG_WARN_ENUM_CONVERSION = YES;
548 | CLANG_WARN_INT_CONVERSION = YES;
549 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
550 | CLANG_WARN_UNREACHABLE_CODE = YES;
551 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
552 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
553 | COPY_PHASE_STRIP = NO;
554 | CURRENT_PROJECT_VERSION = 1;
555 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
556 | ENABLE_NS_ASSERTIONS = NO;
557 | ENABLE_STRICT_OBJC_MSGSEND = YES;
558 | GCC_C_LANGUAGE_STANDARD = gnu99;
559 | GCC_NO_COMMON_BLOCKS = YES;
560 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
561 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
562 | GCC_WARN_UNDECLARED_SELECTOR = YES;
563 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
564 | GCC_WARN_UNUSED_FUNCTION = YES;
565 | GCC_WARN_UNUSED_VARIABLE = YES;
566 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
567 | MTL_ENABLE_DEBUG_INFO = NO;
568 | SDKROOT = iphoneos;
569 | TARGETED_DEVICE_FAMILY = "1,2";
570 | VALIDATE_PRODUCT = YES;
571 | VERSIONING_SYSTEM = "apple-generic";
572 | VERSION_INFO_PREFIX = "";
573 | };
574 | name = Release;
575 | };
576 | 6A6DD8A71C7C54CD00B1DD35 /* Debug */ = {
577 | isa = XCBuildConfiguration;
578 | buildSettings = {
579 | CLANG_ENABLE_MODULES = YES;
580 | DEFINES_MODULE = YES;
581 | DYLIB_COMPATIBILITY_VERSION = 1;
582 | DYLIB_CURRENT_VERSION = 1;
583 | DYLIB_INSTALL_NAME_BASE = "@rpath";
584 | INFOPLIST_FILE = TransitionOperator/Info.plist;
585 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
586 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
587 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperator;
588 | PRODUCT_NAME = "$(TARGET_NAME)";
589 | SKIP_INSTALL = YES;
590 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
591 | };
592 | name = Debug;
593 | };
594 | 6A6DD8A81C7C54CD00B1DD35 /* Release */ = {
595 | isa = XCBuildConfiguration;
596 | buildSettings = {
597 | CLANG_ENABLE_MODULES = YES;
598 | DEFINES_MODULE = YES;
599 | DYLIB_COMPATIBILITY_VERSION = 1;
600 | DYLIB_CURRENT_VERSION = 1;
601 | DYLIB_INSTALL_NAME_BASE = "@rpath";
602 | INFOPLIST_FILE = TransitionOperator/Info.plist;
603 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
604 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
605 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperator;
606 | PRODUCT_NAME = "$(TARGET_NAME)";
607 | SKIP_INSTALL = YES;
608 | };
609 | name = Release;
610 | };
611 | 6A6DD8AA1C7C54CD00B1DD35 /* Debug */ = {
612 | isa = XCBuildConfiguration;
613 | buildSettings = {
614 | INFOPLIST_FILE = TransitionOperatorTests/Info.plist;
615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
616 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperatorTests;
617 | PRODUCT_NAME = "$(TARGET_NAME)";
618 | };
619 | name = Debug;
620 | };
621 | 6A6DD8AB1C7C54CD00B1DD35 /* Release */ = {
622 | isa = XCBuildConfiguration;
623 | buildSettings = {
624 | INFOPLIST_FILE = TransitionOperatorTests/Info.plist;
625 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
626 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperatorTests;
627 | PRODUCT_NAME = "$(TARGET_NAME)";
628 | };
629 | name = Release;
630 | };
631 | 6AD838391C7F41FB0070F103 /* Debug */ = {
632 | isa = XCBuildConfiguration;
633 | buildSettings = {
634 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
635 | FRAMEWORK_SEARCH_PATHS = (
636 | "$(inherited)",
637 | "$(PROJECT_DIR)/Carthage/Build/iOS",
638 | );
639 | INFOPLIST_FILE = TransitionOperatorSample/Info.plist;
640 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
641 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
642 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperatorSample;
643 | PRODUCT_NAME = "$(TARGET_NAME)";
644 | };
645 | name = Debug;
646 | };
647 | 6AD8383A1C7F41FB0070F103 /* Release */ = {
648 | isa = XCBuildConfiguration;
649 | buildSettings = {
650 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
651 | FRAMEWORK_SEARCH_PATHS = (
652 | "$(inherited)",
653 | "$(PROJECT_DIR)/Carthage/Build/iOS",
654 | );
655 | INFOPLIST_FILE = TransitionOperatorSample/Info.plist;
656 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
657 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
658 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperatorSample;
659 | PRODUCT_NAME = "$(TARGET_NAME)";
660 | };
661 | name = Release;
662 | };
663 | 6AD8383B1C7F41FB0070F103 /* Debug */ = {
664 | isa = XCBuildConfiguration;
665 | buildSettings = {
666 | BUNDLE_LOADER = "$(TEST_HOST)";
667 | CLANG_ENABLE_MODULES = YES;
668 | FRAMEWORK_SEARCH_PATHS = (
669 | "$(inherited)",
670 | "$(PROJECT_DIR)/Carthage/Build/iOS",
671 | );
672 | INFOPLIST_FILE = TransitionOperatorSampleTests/Info.plist;
673 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
674 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
675 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperatorSampleTests;
676 | PRODUCT_NAME = "$(TARGET_NAME)";
677 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
678 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TransitionOperatorSample.app/TransitionOperatorSample";
679 | };
680 | name = Debug;
681 | };
682 | 6AD8383C1C7F41FB0070F103 /* Release */ = {
683 | isa = XCBuildConfiguration;
684 | buildSettings = {
685 | BUNDLE_LOADER = "$(TEST_HOST)";
686 | CLANG_ENABLE_MODULES = YES;
687 | FRAMEWORK_SEARCH_PATHS = (
688 | "$(inherited)",
689 | "$(PROJECT_DIR)/Carthage/Build/iOS",
690 | );
691 | INFOPLIST_FILE = TransitionOperatorSampleTests/Info.plist;
692 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
693 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
694 | PRODUCT_BUNDLE_IDENTIFIER = jp.caph.TransitionOperatorSampleTests;
695 | PRODUCT_NAME = "$(TARGET_NAME)";
696 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TransitionOperatorSample.app/TransitionOperatorSample";
697 | };
698 | name = Release;
699 | };
700 | /* End XCBuildConfiguration section */
701 |
702 | /* Begin XCConfigurationList section */
703 | 6A6DD88C1C7C54CD00B1DD35 /* Build configuration list for PBXProject "TransitionOperator" */ = {
704 | isa = XCConfigurationList;
705 | buildConfigurations = (
706 | 6A6DD8A41C7C54CD00B1DD35 /* Debug */,
707 | 6A6DD8A51C7C54CD00B1DD35 /* Release */,
708 | );
709 | defaultConfigurationIsVisible = 0;
710 | defaultConfigurationName = Release;
711 | };
712 | 6A6DD8A61C7C54CD00B1DD35 /* Build configuration list for PBXNativeTarget "TransitionOperator" */ = {
713 | isa = XCConfigurationList;
714 | buildConfigurations = (
715 | 6A6DD8A71C7C54CD00B1DD35 /* Debug */,
716 | 6A6DD8A81C7C54CD00B1DD35 /* Release */,
717 | );
718 | defaultConfigurationIsVisible = 0;
719 | defaultConfigurationName = Release;
720 | };
721 | 6A6DD8A91C7C54CD00B1DD35 /* Build configuration list for PBXNativeTarget "TransitionOperatorTests" */ = {
722 | isa = XCConfigurationList;
723 | buildConfigurations = (
724 | 6A6DD8AA1C7C54CD00B1DD35 /* Debug */,
725 | 6A6DD8AB1C7C54CD00B1DD35 /* Release */,
726 | );
727 | defaultConfigurationIsVisible = 0;
728 | defaultConfigurationName = Release;
729 | };
730 | 6AD8383D1C7F41FB0070F103 /* Build configuration list for PBXNativeTarget "TransitionOperatorSample" */ = {
731 | isa = XCConfigurationList;
732 | buildConfigurations = (
733 | 6AD838391C7F41FB0070F103 /* Debug */,
734 | 6AD8383A1C7F41FB0070F103 /* Release */,
735 | );
736 | defaultConfigurationIsVisible = 0;
737 | defaultConfigurationName = Release;
738 | };
739 | 6AD8383E1C7F41FB0070F103 /* Build configuration list for PBXNativeTarget "TransitionOperatorSampleTests" */ = {
740 | isa = XCConfigurationList;
741 | buildConfigurations = (
742 | 6AD8383B1C7F41FB0070F103 /* Debug */,
743 | 6AD8383C1C7F41FB0070F103 /* Release */,
744 | );
745 | defaultConfigurationIsVisible = 0;
746 | defaultConfigurationName = Release;
747 | };
748 | /* End XCConfigurationList section */
749 | };
750 | rootObject = 6A6DD8891C7C54CD00B1DD35 /* Project object */;
751 | }
752 |
--------------------------------------------------------------------------------
/TransitionOperator.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TransitionOperator.xcodeproj/xcshareddata/xcschemes/TransitionOperator.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/TransitionOperator.xcodeproj/xcshareddata/xcschemes/TransitionOperatorSample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/TransitionOperator.xcodeproj/xcuserdata/rizumita.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Tests.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 | TransitionOperator.xcscheme_^#shared#^_
13 |
14 | orderHint
15 | 0
16 |
17 | TransitionOperatorSample.xcscheme_^#shared#^_
18 |
19 | orderHint
20 | 1
21 |
22 |
23 | SuppressBuildableAutocreation
24 |
25 | 6A6DD8911C7C54CD00B1DD35
26 |
27 | primary
28 |
29 |
30 | 6A6DD89B1C7C54CD00B1DD35
31 |
32 | primary
33 |
34 |
35 | 6AD8381E1C7F41FB0070F103
36 |
37 | primary
38 |
39 |
40 | 6AD838311C7F41FB0070F103
41 |
42 | primary
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/TransitionOperator.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TransitionOperator/CompositeTransitionOperator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CompositeTransitionOperator.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/28.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public class CompositeTransitionOperator: TransitionOperatorType, ArrayLiteralConvertible {
12 |
13 | public typealias Element = TransitionOperatorType
14 |
15 | public required init(arrayLiteral elements: Element...) {
16 | operators = elements
17 | }
18 |
19 | public var forced: Bool = false
20 |
21 | private var operators: [Element] = []
22 |
23 | init(operators: [Element], forced: Bool = false) {
24 | self.operators = operators
25 | }
26 |
27 | public func add(nextOperator nextOperator: Element) {
28 | operators.append(nextOperator)
29 | }
30 |
31 | public func operate(executor executor: TransitionExecutorType, source: Any, destination: Any) -> Bool {
32 | for op in operators {
33 | if op.operate(executor: executor, source: source, destination: destination) == false && !forced {
34 | return false
35 | }
36 | }
37 | return true
38 | }
39 |
40 | }
41 |
42 | infix operator += {}
43 |
44 | public func +=(compositeOperator: CompositeTransitionOperator, nextOperator: TransitionOperatorType) {
45 | compositeOperator.add(nextOperator: nextOperator)
46 | }
47 |
--------------------------------------------------------------------------------
/TransitionOperator/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 | 0.11.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/TransitionOperator/TransitionExecutorSegue.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TransitionExecutorSegue.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/03/04.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class TransitionExecutorSegue: UIStoryboardSegue, TransitionExecutorType {
12 |
13 | public static var transitionOperator: TransitionOperatorType?
14 |
15 | public var transitionOperator: TransitionOperatorType?
16 |
17 | public var transitionPayload: TransitionPayloadType?
18 |
19 | public override func perform() {
20 | self.dynamicType.transitionOperator?.operate(executor: self, source: sourceViewController, destination: destinationViewController)
21 | transitionOperator?.operate(executor: self, source: sourceViewController, destination: destinationViewController)
22 | super.perform()
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/TransitionOperator/TransitionExecutorType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Created by 和泉田 領一 on 2016/02/25.
3 | // Copyright (c) 2016 CAPH TECH. All rights reserved.
4 | //
5 |
6 | import Foundation
7 |
8 | public protocol TransitionExecutorType: class {
9 |
10 | var transitionOperator: TransitionOperatorType? { get set }
11 |
12 | var transitionPayload: TransitionPayloadType? { get set }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/TransitionOperator/TransitionOperator.h:
--------------------------------------------------------------------------------
1 | //
2 | // TransitionOperator.h
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/23.
6 | // Copyright © 2016年 CAPH. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for TransitionOperator.
12 | FOUNDATION_EXPORT double TransitionOperatorVersionNumber;
13 |
14 | //! Project version string for TransitionOperator.
15 | FOUNDATION_EXPORT const unsigned char TransitionOperatorVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/TransitionOperator/TransitionOperator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TransitionOperator.swift
3 | // TransitionOperator
4 | //
5 | // Created by Ryoichi Izumita on 2016/02/23.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public protocol TransitionOperatorType: class {
12 |
13 | func operate(executor executor: TransitionExecutorType, source: Any, destination: Any) -> Bool
14 |
15 | }
16 |
17 | public class TransitionOperator: TransitionOperatorType {
18 |
19 | public typealias Operation = (Executor, Source, Destination) throws -> ()
20 |
21 | let operation: Operation
22 |
23 | public init(_ operation: Operation) {
24 | self.operation = operation
25 | }
26 |
27 | public func operate(executor executor: TransitionExecutorType, source: Any, destination: Any) -> Bool {
28 | do {
29 | switch (executor, source, destination) {
30 | case (let e as Executor, let s as Source, let d as Destination):
31 | try operation(e, s, d)
32 | return true
33 | default:
34 | return false
35 | }
36 | }
37 | catch {
38 | return false
39 | }
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/TransitionOperator/TransitionPayload.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Created by 和泉田 領一 on 2016/02/25.
3 | // Copyright (c) 2016 CAPH TECH. All rights reserved.
4 | //
5 |
6 | import Foundation
7 |
8 | public protocol TransitionPayloadType: class {
9 |
10 | var payloadValue: Any? { get }
11 |
12 | }
13 |
14 | public class TransitionPayload: TransitionPayloadType {
15 |
16 | public var payloadValue: Any?
17 |
18 | public init(value: Any?) {
19 | payloadValue = value
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // TransitionOperatorSample
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. 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: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | _ = assembler
20 | return true
21 | }
22 |
23 | func applicationWillResignActive(application: UIApplication) {
24 | // 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.
25 | // 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.
26 | }
27 |
28 | func applicationDidEnterBackground(application: UIApplication) {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | func applicationWillEnterForeground(application: UIApplication) {
34 | // 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.
35 | }
36 |
37 | func applicationDidBecomeActive(application: UIApplication) {
38 | // 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.
39 | }
40 |
41 | func applicationWillTerminate(application: UIApplication) {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/Assembler.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Assembler.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import Swinject
11 | import TransitionOperator
12 |
13 | let assembler = try! Assembler(assemblies: [Assembly()])
14 |
15 | class Assembly: AssemblyType {
16 |
17 | func assemble(container: Container) {
18 | container.register(WireframeType.self) { r in
19 | return Wireframe()
20 | }.inObjectScope(.Container)
21 |
22 | container.register(TransitionOperatorType.self, name: "DestinationSegue") {
23 | r in
24 | return storyboardReferenceDestinationTransitionOperator
25 | }
26 |
27 | container.register(TransitionOperatorType.self, name: "ActionDestinationSegue") {
28 | r in
29 | return actionDestinationTransitionOperator
30 | }
31 |
32 | TransitionExecutorSegue.transitionOperator = TransitionOperator {
33 | (segue: TransitionExecutorSegue, source: Any, destination: Any) in
34 | if let op = assembler.resolver.resolve(TransitionOperatorType.self, name: segue.identifier) {
35 | segue.transitionOperator = op
36 | }
37 | }
38 | }
39 |
40 | }
41 |
42 | extension SwinjectStoryboard {
43 |
44 | class func setup() {
45 | defaultContainer.registerForStoryboard(ViewController.self) {
46 | r, c in
47 | let wireframe = assembler.resolver.resolve(WireframeType.self)
48 | wireframe?.viewController = c
49 | c.wireframe = wireframe
50 | }
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/TransitionOperatorSample/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/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 |
46 |
47 |
48 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/Destination.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/DestinationViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DestinationViewController.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DestinationViewController: UIViewController {
12 |
13 | var text: String?
14 |
15 | @IBOutlet weak var textLabel: UILabel!
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 |
20 | textLabel.text = text
21 | }
22 |
23 | override func didReceiveMemoryWarning() {
24 | super.didReceiveMemoryWarning()
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 |
29 | /*
30 | // MARK: - Navigation
31 |
32 | // In a storyboard-based application, you will often want to do a little preparation before navigation
33 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
34 | // Get the new view controller using segue.destinationViewController.
35 | // Pass the selected object to the new view controller.
36 | }
37 | */
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/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 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/TransitionOperations.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Transitions.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import TransitionOperator
11 |
12 | var storyboardReferenceDestinationTransitionOperator: TransitionOperatorType = TransitionOperator { (segue: TransitionExecutorSegue, source: Any, destination: DestinationViewController) in
13 | destination.text = "Storyboard Reference"
14 | }
15 |
16 | var actionDestinationTransitionOperator: TransitionOperatorType = TransitionOperator { (segue: TransitionExecutorSegue, source: Any, destination: DestinationViewController) in
17 | if let text = segue.transitionPayload?.payloadValue as? String {
18 | destination.text = text
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // TransitionOperatorSample
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | weak var wireframe: WireframeType!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | // Do any additional setup after loading the view, typically from a nib.
18 | }
19 |
20 | override func didReceiveMemoryWarning() {
21 | super.didReceiveMemoryWarning()
22 | // Dispose of any resources that can be recreated.
23 | }
24 |
25 | @IBAction func action(sender: AnyObject) {
26 | wireframe.showDestination(withText: "IBAction")
27 | }
28 |
29 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
30 | wireframe.prepare(forSegue: segue, sender: sender)
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/TransitionOperatorSample/Wireframe.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Wireframe.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import TransitionOperator
11 |
12 | class Wireframe: WireframeType {
13 |
14 | var viewController: UIViewController?
15 |
16 | func showDestination(withText text: String) {
17 | viewController?.performSegueWithIdentifier("ActionDestinationSegue", sender: TransitionPayload(value: text))
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/TransitionOperatorSample/WireframeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WireframeType.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import TransitionOperator
11 |
12 | protocol WireframeType: _WireframeType {
13 |
14 | var viewController: UIViewController? { get set }
15 |
16 | func showDestination(withText text: String)
17 |
18 | }
19 |
20 | protocol _WireframeType: class {
21 |
22 | func prepare(forSegue segue: UIStoryboardSegue, sender: AnyObject?)
23 | }
24 |
25 | extension _WireframeType {
26 |
27 | func prepare(forSegue segue: UIStoryboardSegue, sender: AnyObject?) {
28 | switch (segue, sender) {
29 | case (let s as TransitionExecutorSegue, let .Some(op as TransitionOperatorType)):
30 | s.transitionOperator = op
31 | case (let s as TransitionExecutorSegue, let .Some(payload as TransitionPayloadType)):
32 | s.transitionPayload = payload
33 | default: ()
34 | }
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/TransitionOperatorSampleTests/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 |
--------------------------------------------------------------------------------
/TransitionOperatorSampleTests/WireframeTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WireframeTests.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/25.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import TransitionOperatorSample
11 | import Swinject
12 | import TransitionOperator
13 |
14 | class WireframeTests: XCTestCase {
15 |
16 | override func setUp() {
17 | super.setUp()
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 | }
20 |
21 | override func tearDown() {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | super.tearDown()
24 | }
25 |
26 | func testShowDestination() {
27 | var result: String?
28 |
29 | let expectation = expectationWithDescription("testShowDestination")
30 |
31 | let container = Container()
32 | container.register(TransitionOperatorType.self, name: "ActionDestinationSegue") {
33 | r in
34 | return TransitionOperator {
35 | (segue: TransitionExecutorSegue, s: UIViewController, d: UIViewController) in
36 | result = segue.transitionPayload?.payloadValue as? String
37 | XCTAssertEqual(result!, "test_text")
38 | XCTAssertTrue(d is DestinationViewController)
39 | expectation.fulfill()
40 | }
41 | }
42 |
43 | TransitionExecutorSegue.transitionOperator = TransitionOperator {
44 | (segue: TransitionExecutorSegue, source: Any, destination: Any) in
45 | if let op = container.resolve(TransitionOperatorType.self, name: segue.identifier) {
46 | segue.transitionOperator = op
47 | }
48 | }
49 |
50 | let wireframe = Wireframe()
51 | let navigationController = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController() as? UINavigationController
52 | let controller = navigationController?.viewControllers.first
53 | wireframe.viewController = controller
54 |
55 | wireframe.showDestination(withText: "test_text")
56 |
57 | waitForExpectationsWithTimeout(2.0) { (error: NSError?) -> Void in }
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/TransitionOperatorTests/CompositeTransitionOperatorTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CompositeTransitionOperatorTests.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/28.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import TransitionOperator
11 |
12 | class CompositeTransitionOperatorTests: XCTestCase {
13 |
14 | class TestExecutor: TransitionExecutorType {
15 | var transitionOperator: TransitionOperatorType?
16 | var transitionPayload: TransitionPayloadType?
17 | }
18 |
19 | override func setUp() {
20 | super.setUp()
21 | // Put setup code here. This method is called before the invocation of each test method in the class.
22 | }
23 |
24 | override func tearDown() {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | super.tearDown()
27 | }
28 |
29 | func testComposite() {
30 | var sum: Int = 0
31 |
32 | let cOperator = CompositeTransitionOperator(operators: [TransitionOperator { (e: TestExecutor, s: Any, d: Any) in
33 | sum = sum + 1
34 | XCTAssertEqual(sum, 1)
35 | }, TransitionOperator { (e: TestExecutor, s: Any, d: Any) in
36 | sum = sum + 2
37 | XCTAssertEqual(sum, 3)
38 | }, TransitionOperator { (e: TestExecutor, s: Any, d: Any) in
39 | sum = sum + 3
40 | XCTAssertEqual(sum, 6)
41 | }])
42 | cOperator.operate(executor: TestExecutor(), source: "test", destination: "test")
43 |
44 | XCTAssertEqual(sum, 6)
45 | }
46 |
47 | func testArrayLiteral() {
48 | var sum: Int = 0
49 |
50 | let cOperator: CompositeTransitionOperator = [TransitionOperator { (e: TestExecutor, s: Any, d: Any) in
51 | sum = sum + 1
52 | XCTAssertEqual(sum, 1)
53 | }, TransitionOperator { (e: TestExecutor, s: Any, d: Any) in
54 | sum = sum + 2
55 | XCTAssertEqual(sum, 3)
56 | }, TransitionOperator { (e: TestExecutor, s: Any, d: Any) in
57 | sum = sum + 3
58 | XCTAssertEqual(sum, 6)
59 | }]
60 | cOperator.operate(executor: TestExecutor(), source: "test", destination: "test")
61 |
62 | XCTAssertEqual(sum, 6)
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/TransitionOperatorTests/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 |
--------------------------------------------------------------------------------
/TransitionOperatorTests/TransitionExecutorSegueTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TransitionExecutorSegueTests.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/03/04.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import TransitionOperator
11 |
12 | class TransitionExecutorSegueTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | TransitionExecutorSegue.transitionOperator = nil
22 | super.tearDown()
23 | }
24 |
25 | func testStaticTransitionOperator() {
26 | let expectation = expectationWithDescription("testStaticTransitionOperator")
27 |
28 | TransitionExecutorSegue.transitionOperator = TransitionOperator { (segue: TransitionExecutorSegue, source: UIViewController, destination: UIViewController) in
29 | XCTAssertEqual(segue.identifier!, "test")
30 | expectation.fulfill()
31 | }
32 | let source = UIViewController(nibName: nil, bundle: nil)
33 | let destination = UIViewController(nibName: nil, bundle: nil)
34 | let segue = TransitionExecutorSegue(identifier: "test", source: source, destination: destination) {
35 | source.presentViewController(destination, animated: false, completion: nil)
36 | }
37 | segue.perform()
38 |
39 | waitForExpectationsWithTimeout(2.0) { _ in }
40 | }
41 |
42 | func testStaticTransitionOperatorWithSubclass() {
43 | class SubSegue: TransitionExecutorSegue {}
44 |
45 | let expectation = expectationWithDescription("testStaticTransitionOperator")
46 |
47 | SubSegue.transitionOperator = TransitionOperator { (segue: SubSegue, source: UIViewController, destination: UIViewController) in
48 | XCTAssertTrue(segue.dynamicType == SubSegue.self)
49 | XCTAssertEqual(segue.identifier!, "test")
50 | expectation.fulfill()
51 | }
52 | let source = UIViewController(nibName: nil, bundle: nil)
53 | let destination = UIViewController(nibName: nil, bundle: nil)
54 | let segue = SubSegue(identifier: "test", source: source, destination: destination) {
55 | source.presentViewController(destination, animated: false, completion: nil)
56 | }
57 | segue.perform()
58 |
59 | waitForExpectationsWithTimeout(2.0) { _ in }
60 | }
61 |
62 | func testStaticTransitionOperatorWithSubclassAndParent() {
63 | class SubSegue: TransitionExecutorSegue {}
64 |
65 | let expectation = expectationWithDescription("testStaticTransitionOperator")
66 |
67 | SubSegue.transitionOperator = TransitionOperator { (segue: SubSegue, source: UIViewController, destination: UIViewController) in
68 | XCTFail()
69 | }
70 |
71 | let source = UIViewController(nibName: nil, bundle: nil)
72 | let destination = UIViewController(nibName: nil, bundle: nil)
73 | let segue = TransitionExecutorSegue(identifier: "test", source: source, destination: destination) {
74 | source.presentViewController(destination, animated: false, completion: nil)
75 | expectation.fulfill()
76 | }
77 | segue.perform()
78 |
79 | waitForExpectationsWithTimeout(2.0) { _ in }
80 | }
81 |
82 | func testTransitionOperator() {
83 | let expectation = expectationWithDescription("testStaticTransitionOperator")
84 |
85 | let source = SourceViewController()
86 | let destination = DestinationViewController()
87 | let segue = TransitionExecutorSegue(identifier: "test", source: source, destination: destination) {
88 | source.presentViewController(destination, animated: false, completion: nil)
89 | }
90 | segue.transitionOperator = TransitionOperator { (segue: TransitionExecutorSegue, s: SourceViewController, d: DestinationViewController) in
91 | destination.number = source.number
92 | expectation.fulfill()
93 | }
94 | segue.perform()
95 |
96 | waitForExpectationsWithTimeout(2.0) { _ in }
97 | }
98 |
99 | func testTransitionOperatorWithSubclass() {
100 | class SubSegue: TransitionExecutorSegue {}
101 |
102 | let expectation = expectationWithDescription("testStaticTransitionOperator")
103 |
104 | let source = UIViewController(nibName: nil, bundle: nil)
105 | let destination = UIViewController(nibName: nil, bundle: nil)
106 | let segue = SubSegue(identifier: "test", source: source, destination: destination) {
107 | source.presentViewController(destination, animated: false, completion: nil)
108 | }
109 | segue.transitionOperator = TransitionOperator { (segue: SubSegue, source: UIViewController, destination: UIViewController) in
110 | expectation.fulfill()
111 | }
112 | segue.perform()
113 |
114 | waitForExpectationsWithTimeout(2.0) { _ in }
115 | }
116 |
117 | func testTransitionPayload() {
118 | let expectation = expectationWithDescription("testTransitionPayload")
119 |
120 | let segue = TransitionExecutorSegue(identifier: "test", source: UIViewController(nibName: nil, bundle: nil), destination: UIViewController(nibName: nil, bundle: nil)) {}
121 | segue.transitionOperator = TransitionOperator { (s: TransitionExecutorSegue, source: UIViewController, destination: UIViewController) in
122 | let value = s.transitionPayload?.payloadValue as! Int
123 | XCTAssertEqual(value, 1)
124 | expectation.fulfill()
125 | }
126 | segue.transitionPayload = TransitionPayload(value: 1)
127 | segue.perform()
128 |
129 | waitForExpectationsWithTimeout(2.0) { _ in }
130 | }
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/TransitionOperatorTests/TransitionOperatorTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TransitionOperatorTests.swift
3 | // TransitionOperatorTests
4 | //
5 | // Created by 和泉田 領一 on 2016/02/23.
6 | // Copyright © 2016年 CAPH. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import UIKit
11 | @testable import TransitionOperator
12 |
13 | class TransitionOperatorTests: XCTestCase {
14 |
15 | override func setUp() {
16 | super.setUp()
17 | // Put setup code here. This method is called before the invocation of each test method in the class.
18 | }
19 |
20 | override func tearDown() {
21 | // Put teardown code here. This method is called after the invocation of each test method in the class.
22 | super.tearDown()
23 | }
24 |
25 | class TestExecutor: TransitionExecutorType {
26 | var transitionOperator: TransitionOperatorType?
27 | var transitionPayload: TransitionPayloadType?
28 | }
29 |
30 | func testOperate() {
31 | let op = TransitionOperator { (executor: TestExecutor, source: SourceViewController, destination: DestinationViewController) -> () in
32 | XCTAssertTrue(executor.dynamicType == TestExecutor.self)
33 | destination.number = source.number
34 | }
35 |
36 | let destination = DestinationViewController(nibName: nil, bundle: nil)
37 | op.operate(executor: TestExecutor(), source: SourceViewController(nibName: nil, bundle: nil), destination: destination)
38 | XCTAssertEqual(destination.number!, 10)
39 | }
40 |
41 | func testUnsuitableType() {
42 | class UnsuitableViewController: UIViewController {}
43 |
44 | let op = TransitionOperator { (executor: TestExecutor, source: SourceViewController, destination: DestinationViewController) -> () in
45 | XCTFail()
46 | }
47 |
48 | let destination = UnsuitableViewController()
49 | op.operate(executor: TestExecutor(), source: SourceViewController(nibName: nil, bundle: nil), destination: destination)
50 | }
51 |
52 | }
53 |
54 | class SourceViewController: UIViewController {
55 | let number = 10
56 | }
57 |
58 | class DestinationViewController: UIViewController {
59 | var number: Int?
60 | }
61 |
--------------------------------------------------------------------------------
/TransitionOperatorTests/UIStoryboardSegue+ExtensionsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIStoryboardSegue+ExtensionsTests.swift
3 | // TransitionOperator
4 | //
5 | // Created by 和泉田 領一 on 2016/02/23.
6 | // Copyright © 2016年 CAPH TECH. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import UIKit
11 | @testable import TransitionOperator
12 |
13 | class UIStoryboardSegue_ExtensionsTests: XCTestCase {
14 |
15 | override func setUp() {
16 | super.setUp()
17 | // Put setup code here. This method is called before the invocation of each test method in the class.
18 | }
19 |
20 | override func tearDown() {
21 | UIStoryboardSegue.transitionOperator = nil
22 | super.tearDown()
23 | }
24 |
25 | func testStaticTransitionOperator() {
26 | let expectation = expectationWithDescription("testStaticTransitionOperator")
27 |
28 | UIStoryboardSegue.transitionOperator = TransitionOperator { (segue: UIStoryboardSegue, source: UIViewController, destination: UIViewController) in
29 | XCTAssertEqual(segue.identifier!, "test")
30 | expectation.fulfill()
31 | }
32 | let source = UIViewController(nibName: nil, bundle: nil)
33 | let destination = UIViewController(nibName: nil, bundle: nil)
34 | let segue = UIStoryboardSegue(identifier: "test", source: source, destination: destination) {
35 | source.presentViewController(destination, animated: false, completion: nil)
36 | }
37 | segue.perform()
38 |
39 | waitForExpectationsWithTimeout(2.0) { _ in }
40 | }
41 |
42 | func testStaticTransitionOperatorWithSubclass() {
43 | class SubSegue: UIStoryboardSegue {}
44 |
45 | let expectation = expectationWithDescription("testStaticTransitionOperator")
46 |
47 | SubSegue.transitionOperator = TransitionOperator { (segue: SubSegue, source: UIViewController, destination: UIViewController) in
48 | XCTAssertTrue(segue.dynamicType == SubSegue.self)
49 | XCTAssertEqual(segue.identifier!, "test")
50 | expectation.fulfill()
51 | }
52 | let source = UIViewController(nibName: nil, bundle: nil)
53 | let destination = UIViewController(nibName: nil, bundle: nil)
54 | let segue = SubSegue(identifier: "test", source: source, destination: destination) {
55 | source.presentViewController(destination, animated: false, completion: nil)
56 | }
57 | segue.perform()
58 |
59 | waitForExpectationsWithTimeout(2.0) { _ in }
60 | }
61 |
62 | func testStaticTransitionOperatorWithParentAndSubclass() {
63 | class SubSegue: UIStoryboardSegue {}
64 |
65 | let expectation = expectationWithDescription("testStaticTransitionOperator")
66 |
67 | UIStoryboardSegue.transitionOperator = TransitionOperator { (segue: UIStoryboardSegue, source: UIViewController, destination: UIViewController) in
68 | XCTFail()
69 | }
70 |
71 | let source = UIViewController(nibName: nil, bundle: nil)
72 | let destination = UIViewController(nibName: nil, bundle: nil)
73 | let segue = SubSegue(identifier: "test", source: source, destination: destination) {
74 | source.presentViewController(destination, animated: false, completion: nil)
75 | expectation.fulfill()
76 | }
77 | segue.perform()
78 |
79 | waitForExpectationsWithTimeout(2.0) { _ in }
80 | }
81 |
82 | func testStaticTransitionOperatorWithSubclassAndParent() {
83 | class SubSegue: UIStoryboardSegue {}
84 |
85 | let expectation = expectationWithDescription("testStaticTransitionOperator")
86 |
87 | SubSegue.transitionOperator = TransitionOperator { (segue: SubSegue, source: UIViewController, destination: UIViewController) in
88 | XCTFail()
89 | }
90 |
91 | let source = UIViewController(nibName: nil, bundle: nil)
92 | let destination = UIViewController(nibName: nil, bundle: nil)
93 | let segue = UIStoryboardSegue(identifier: "test", source: source, destination: destination) {
94 | source.presentViewController(destination, animated: false, completion: nil)
95 | expectation.fulfill()
96 | }
97 | segue.perform()
98 |
99 | waitForExpectationsWithTimeout(2.0) { _ in }
100 | }
101 |
102 | func testTransitionOperator() {
103 | let expectation = expectationWithDescription("testStaticTransitionOperator")
104 |
105 | let source = SourceViewController()
106 | let destination = DestinationViewController()
107 | let segue = UIStoryboardSegue(identifier: "test", source: source, destination: destination) {
108 | source.presentViewController(destination, animated: false, completion: nil)
109 | }
110 | segue.transitionOperator = TransitionOperator { (segue: UIStoryboardSegue, s: SourceViewController, d: DestinationViewController) in
111 | destination.number = source.number
112 | expectation.fulfill()
113 | }
114 | segue.perform()
115 |
116 | waitForExpectationsWithTimeout(2.0) { _ in }
117 | }
118 |
119 | func testTransitionOperatorWithSubclass() {
120 | class SubSegue: UIStoryboardSegue {}
121 |
122 | let expectation = expectationWithDescription("testStaticTransitionOperator")
123 |
124 | let source = UIViewController(nibName: nil, bundle: nil)
125 | let destination = UIViewController(nibName: nil, bundle: nil)
126 | let segue = SubSegue(identifier: "test", source: source, destination: destination) {
127 | source.presentViewController(destination, animated: false, completion: nil)
128 | }
129 | segue.transitionOperator = TransitionOperator { (segue: SubSegue, source: UIViewController, destination: UIViewController) in
130 | expectation.fulfill()
131 | }
132 | segue.perform()
133 |
134 | waitForExpectationsWithTimeout(2.0) { _ in }
135 | }
136 |
137 | func testTransitionPayload() {
138 | let expectation = expectationWithDescription("testTransitionPayload")
139 |
140 | let segue = UIStoryboardSegue(identifier: "test", source: UIViewController(nibName: nil, bundle: nil), destination: UIViewController(nibName: nil, bundle: nil)) {}
141 | segue.transitionOperator = TransitionOperator { (s: UIStoryboardSegue, source: UIViewController, destination: UIViewController) in
142 | let value = s.transitionPayload?.payloadValue as! Int
143 | XCTAssertEqual(value, 1)
144 | expectation.fulfill()
145 | }
146 | segue.transitionPayload = TransitionPayload(value: 1)
147 | segue.perform()
148 |
149 | waitForExpectationsWithTimeout(2.0) { _ in }
150 | }
151 |
152 | }
153 |
--------------------------------------------------------------------------------