├── .gitignore ├── .swift-version ├── .travis.yml ├── Cartfile ├── Cartfile.resolved ├── Example ├── Podfile ├── Podfile.lock ├── RxSegue.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── RxSegue-Example.xcscheme ├── RxSegue.xcworkspace │ └── contents.xcworkspacedata ├── RxSegue │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── BaseViewController.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── avatar.imageset │ │ │ ├── Contents.json │ │ │ └── avatar@2x.png │ ├── Info.plist │ ├── ProfileViewController.swift │ ├── RootViewController.swift │ ├── SecondViewController.swift │ └── ViewController.swift └── Tests │ ├── Info.plist │ ├── Mocks │ └── MockViewController.swift │ ├── ModalSegueSpec.swift │ └── NavigationSegueSpec.swift ├── LICENSE ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── Helpers.swift │ ├── ModalSegue.swift │ ├── NavigationSegue.swift │ └── SegueType.swift ├── README.md ├── RxSegue.podspec ├── RxSegue.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── RxSegue-iOS.xcscheme ├── RxSegue ├── Info.plist └── RxSegue.h └── RxSegueExample.gif /.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 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | Example/Pods/ 33 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | os: osx 6 | osx_image: xcode9.1 7 | language: objective-c 8 | sudo: required 9 | env: 10 | global: 11 | - WORKSPACE="Example/RxSegue.xcworkspace" 12 | - SCHEME="RxSegue-Example" 13 | - IOS_SDK="iphonesimulator11.1" 14 | - DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=11.1" 15 | before_install: 16 | - gem install cocoapods # Since Travis is not always on latest version 17 | - cd Example && pod update && cd .. 18 | script: 19 | - set -o pipefail 20 | - xcodebuild clean build test 21 | -workspace "$WORKSPACE" 22 | -scheme "$SCHEME" 23 | -configuration Release 24 | -sdk "$IOS_SDK" 25 | -destination "$DESTINATION" 26 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "ReactiveX/RxSwift" ~> 4.0 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "ReactiveX/RxSwift" "4.0.0" 2 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | source 'https://github.com/CocoaPods/Specs.git' 3 | use_frameworks! 4 | 5 | target 'RxSegue_Example' do 6 | pod 'RxSegue', :path => '../' 7 | pod 'RxCocoa', '~> 4.0' 8 | end 9 | 10 | target 'RxSegue_Tests' do 11 | pod 'RxSegue', :path => '../' 12 | pod 'Nimble', '~> 7.0' 13 | end 14 | 15 | post_install do |installer| 16 | installer.pods_project.targets.each do |target| 17 | target.build_configurations.each do |config| 18 | config.build_settings['SWIFT_VERSION'] = '4.0' 19 | end 20 | # if target.name == 'RxSwift' || target.name == 'RxCocoa' 21 | # target.build_configurations.each do |config| 22 | # if config.name == 'Debug' 23 | # config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-D', 'TRACE_RESOURCES'] 24 | # end 25 | # end 26 | # end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Nimble (7.0.3) 3 | - RxCocoa (4.0.0): 4 | - RxSwift (~> 4.0) 5 | - RxSegue (2.0.0): 6 | - RxSwift (~> 4.0) 7 | - RxSwift (4.0.0) 8 | 9 | DEPENDENCIES: 10 | - Nimble (~> 7.0) 11 | - RxCocoa (~> 4.0) 12 | - RxSegue (from `../`) 13 | 14 | EXTERNAL SOURCES: 15 | RxSegue: 16 | :path: ../ 17 | 18 | SPEC CHECKSUMS: 19 | Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac 20 | RxCocoa: d62846ca96495d862fa4c59ea7d87e5031d7340e 21 | RxSegue: 5a6d41926f293a635bd9d11149b01ee131d0c601 22 | RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334 23 | 24 | PODFILE CHECKSUM: 680337950b11ffdc8bffd61e0f44610cbaa38511 25 | 26 | COCOAPODS: 1.3.1 27 | -------------------------------------------------------------------------------- /Example/RxSegue.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 12 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 13 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 14 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 15 | 796974BDD248DDCB74D81131 /* Pods_RxSegue_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C05EC112D7A63B82C375230 /* Pods_RxSegue_Tests.framework */; }; 16 | 8419117E1C43E3B600D14629 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8419117D1C43E3B600D14629 /* ProfileViewController.swift */; }; 17 | 841911881C43E82700D14629 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841911871C43E82700D14629 /* SecondViewController.swift */; }; 18 | 84A996871C9D5A49004957F8 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A996861C9D5A49004957F8 /* BaseViewController.swift */; }; 19 | 84A996891C9D5B87004957F8 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A996881C9D5B87004957F8 /* RootViewController.swift */; }; 20 | 84A9968B1C9D5F98004957F8 /* ModalSegueSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A9968A1C9D5F98004957F8 /* ModalSegueSpec.swift */; }; 21 | 84A9968F1C9D6762004957F8 /* MockViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A9968D1C9D672D004957F8 /* MockViewController.swift */; }; 22 | 84A996921C9D6BC8004957F8 /* NavigationSegueSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A996901C9D687E004957F8 /* NavigationSegueSpec.swift */; }; 23 | F3676004064488F0F99BBA8C /* Pods_RxSegue_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C487A1527FF7A10CB20258CD /* Pods_RxSegue_Example.framework */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 32 | remoteInfo = RxSegue; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 16C9D238DF5BF691069311B1 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 38 | 1B0B52ADB1AF36E07EAF6B89 /* Pods-RxSegue_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxSegue_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxSegue_Tests/Pods-RxSegue_Tests.release.xcconfig"; sourceTree = ""; }; 39 | 2C05EC112D7A63B82C375230 /* Pods_RxSegue_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RxSegue_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 33A5CAE41B8282BF01CAF8F1 /* RxSegue.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = RxSegue.podspec; path = ../RxSegue.podspec; sourceTree = ""; }; 41 | 40F4D00444042E97874E87D2 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 42 | 607FACD01AFB9204008FA782 /* RxSegue_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RxSegue_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 46 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 48 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 49 | 607FACE51AFB9204008FA782 /* RxSegue_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RxSegue_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 8419117D1C43E3B600D14629 /* ProfileViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = ""; }; 52 | 841911871C43E82700D14629 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; 53 | 84A996861C9D5A49004957F8 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; 54 | 84A996881C9D5B87004957F8 /* RootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; 55 | 84A9968A1C9D5F98004957F8 /* ModalSegueSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModalSegueSpec.swift; sourceTree = ""; }; 56 | 84A9968D1C9D672D004957F8 /* MockViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockViewController.swift; sourceTree = ""; }; 57 | 84A996901C9D687E004957F8 /* NavigationSegueSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationSegueSpec.swift; sourceTree = ""; }; 58 | C487A1527FF7A10CB20258CD /* Pods_RxSegue_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RxSegue_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | CE46285659D7A5F282188505 /* Pods-RxSegue_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxSegue_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RxSegue_Tests/Pods-RxSegue_Tests.debug.xcconfig"; sourceTree = ""; }; 60 | D26D9089E7D1FC617D4C9EEC /* Pods-RxSegue_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxSegue_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxSegue_Example/Pods-RxSegue_Example.release.xcconfig"; sourceTree = ""; }; 61 | FBF2D70EA123A1174FA12763 /* Pods-RxSegue_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxSegue_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RxSegue_Example/Pods-RxSegue_Example.debug.xcconfig"; sourceTree = ""; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | F3676004064488F0F99BBA8C /* Pods_RxSegue_Example.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 796974BDD248DDCB74D81131 /* Pods_RxSegue_Tests.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 607FACC71AFB9204008FA782 = { 85 | isa = PBXGroup; 86 | children = ( 87 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 88 | 607FACD21AFB9204008FA782 /* Example for RxSegue */, 89 | 607FACE81AFB9204008FA782 /* Tests */, 90 | 607FACD11AFB9204008FA782 /* Products */, 91 | 9AA56464711D96DF27DD086F /* Pods */, 92 | CF113B6116EF5EA3FEFF0613 /* Frameworks */, 93 | ); 94 | sourceTree = ""; 95 | }; 96 | 607FACD11AFB9204008FA782 /* Products */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 607FACD01AFB9204008FA782 /* RxSegue_Example.app */, 100 | 607FACE51AFB9204008FA782 /* RxSegue_Tests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 607FACD21AFB9204008FA782 /* Example for RxSegue */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 109 | 84A996861C9D5A49004957F8 /* BaseViewController.swift */, 110 | 84A996881C9D5B87004957F8 /* RootViewController.swift */, 111 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 112 | 841911871C43E82700D14629 /* SecondViewController.swift */, 113 | 8419117D1C43E3B600D14629 /* ProfileViewController.swift */, 114 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 115 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 116 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 117 | 607FACD31AFB9204008FA782 /* Supporting Files */, 118 | ); 119 | name = "Example for RxSegue"; 120 | path = RxSegue; 121 | sourceTree = ""; 122 | }; 123 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 607FACD41AFB9204008FA782 /* Info.plist */, 127 | ); 128 | name = "Supporting Files"; 129 | sourceTree = ""; 130 | }; 131 | 607FACE81AFB9204008FA782 /* Tests */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 84A9968C1C9D66FF004957F8 /* Mocks */, 135 | 84A9968A1C9D5F98004957F8 /* ModalSegueSpec.swift */, 136 | 84A996901C9D687E004957F8 /* NavigationSegueSpec.swift */, 137 | 607FACE91AFB9204008FA782 /* Supporting Files */, 138 | ); 139 | path = Tests; 140 | sourceTree = ""; 141 | }; 142 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 607FACEA1AFB9204008FA782 /* Info.plist */, 146 | ); 147 | name = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 33A5CAE41B8282BF01CAF8F1 /* RxSegue.podspec */, 154 | 40F4D00444042E97874E87D2 /* README.md */, 155 | 16C9D238DF5BF691069311B1 /* LICENSE */, 156 | ); 157 | name = "Podspec Metadata"; 158 | sourceTree = ""; 159 | }; 160 | 84A9968C1C9D66FF004957F8 /* Mocks */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 84A9968D1C9D672D004957F8 /* MockViewController.swift */, 164 | ); 165 | path = Mocks; 166 | sourceTree = ""; 167 | }; 168 | 9AA56464711D96DF27DD086F /* Pods */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | FBF2D70EA123A1174FA12763 /* Pods-RxSegue_Example.debug.xcconfig */, 172 | D26D9089E7D1FC617D4C9EEC /* Pods-RxSegue_Example.release.xcconfig */, 173 | CE46285659D7A5F282188505 /* Pods-RxSegue_Tests.debug.xcconfig */, 174 | 1B0B52ADB1AF36E07EAF6B89 /* Pods-RxSegue_Tests.release.xcconfig */, 175 | ); 176 | name = Pods; 177 | sourceTree = ""; 178 | }; 179 | CF113B6116EF5EA3FEFF0613 /* Frameworks */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | C487A1527FF7A10CB20258CD /* Pods_RxSegue_Example.framework */, 183 | 2C05EC112D7A63B82C375230 /* Pods_RxSegue_Tests.framework */, 184 | ); 185 | name = Frameworks; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXGroup section */ 189 | 190 | /* Begin PBXNativeTarget section */ 191 | 607FACCF1AFB9204008FA782 /* RxSegue_Example */ = { 192 | isa = PBXNativeTarget; 193 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RxSegue_Example" */; 194 | buildPhases = ( 195 | A040D39929249D47B3B86E4B /* [CP] Check Pods Manifest.lock */, 196 | 607FACCC1AFB9204008FA782 /* Sources */, 197 | 607FACCD1AFB9204008FA782 /* Frameworks */, 198 | 607FACCE1AFB9204008FA782 /* Resources */, 199 | 252255971AB2D54FBACDABA7 /* [CP] Embed Pods Frameworks */, 200 | 9CC170A484709D0EF4C54AC9 /* [CP] Copy Pods Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | ); 206 | name = RxSegue_Example; 207 | productName = RxSegue; 208 | productReference = 607FACD01AFB9204008FA782 /* RxSegue_Example.app */; 209 | productType = "com.apple.product-type.application"; 210 | }; 211 | 607FACE41AFB9204008FA782 /* RxSegue_Tests */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RxSegue_Tests" */; 214 | buildPhases = ( 215 | 135542E24AD17D6D38DE955C /* [CP] Check Pods Manifest.lock */, 216 | 607FACE11AFB9204008FA782 /* Sources */, 217 | 607FACE21AFB9204008FA782 /* Frameworks */, 218 | 607FACE31AFB9204008FA782 /* Resources */, 219 | 989884637C47E5EED1F6F894 /* [CP] Embed Pods Frameworks */, 220 | B9792104F15E849A2D5EF2BB /* [CP] Copy Pods Resources */, 221 | ); 222 | buildRules = ( 223 | ); 224 | dependencies = ( 225 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 226 | ); 227 | name = RxSegue_Tests; 228 | productName = Tests; 229 | productReference = 607FACE51AFB9204008FA782 /* RxSegue_Tests.xctest */; 230 | productType = "com.apple.product-type.bundle.unit-test"; 231 | }; 232 | /* End PBXNativeTarget section */ 233 | 234 | /* Begin PBXProject section */ 235 | 607FACC81AFB9204008FA782 /* Project object */ = { 236 | isa = PBXProject; 237 | attributes = { 238 | LastSwiftUpdateCheck = 0720; 239 | LastUpgradeCheck = 0910; 240 | ORGANIZATIONNAME = CocoaPods; 241 | TargetAttributes = { 242 | 607FACCF1AFB9204008FA782 = { 243 | CreatedOnToolsVersion = 6.3.1; 244 | LastSwiftMigration = 0910; 245 | }; 246 | 607FACE41AFB9204008FA782 = { 247 | CreatedOnToolsVersion = 6.3.1; 248 | LastSwiftMigration = 0910; 249 | }; 250 | }; 251 | }; 252 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RxSegue" */; 253 | compatibilityVersion = "Xcode 3.2"; 254 | developmentRegion = English; 255 | hasScannedForEncodings = 0; 256 | knownRegions = ( 257 | en, 258 | Base, 259 | ); 260 | mainGroup = 607FACC71AFB9204008FA782; 261 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 262 | projectDirPath = ""; 263 | projectRoot = ""; 264 | targets = ( 265 | 607FACCF1AFB9204008FA782 /* RxSegue_Example */, 266 | 607FACE41AFB9204008FA782 /* RxSegue_Tests */, 267 | ); 268 | }; 269 | /* End PBXProject section */ 270 | 271 | /* Begin PBXResourcesBuildPhase section */ 272 | 607FACCE1AFB9204008FA782 /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 277 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 278 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 607FACE31AFB9204008FA782 /* Resources */ = { 283 | isa = PBXResourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXResourcesBuildPhase section */ 290 | 291 | /* Begin PBXShellScriptBuildPhase section */ 292 | 135542E24AD17D6D38DE955C /* [CP] Check Pods Manifest.lock */ = { 293 | isa = PBXShellScriptBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | ); 297 | inputPaths = ( 298 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 299 | "${PODS_ROOT}/Manifest.lock", 300 | ); 301 | name = "[CP] Check Pods Manifest.lock"; 302 | outputPaths = ( 303 | "$(DERIVED_FILE_DIR)/Pods-RxSegue_Tests-checkManifestLockResult.txt", 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | shellPath = /bin/sh; 307 | 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"; 308 | showEnvVarsInLog = 0; 309 | }; 310 | 252255971AB2D54FBACDABA7 /* [CP] Embed Pods Frameworks */ = { 311 | isa = PBXShellScriptBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | ); 315 | inputPaths = ( 316 | "${SRCROOT}/Pods/Target Support Files/Pods-RxSegue_Example/Pods-RxSegue_Example-frameworks.sh", 317 | "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", 318 | "${BUILT_PRODUCTS_DIR}/RxSegue/RxSegue.framework", 319 | "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", 320 | ); 321 | name = "[CP] Embed Pods Frameworks"; 322 | outputPaths = ( 323 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", 324 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSegue.framework", 325 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", 326 | ); 327 | runOnlyForDeploymentPostprocessing = 0; 328 | shellPath = /bin/sh; 329 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxSegue_Example/Pods-RxSegue_Example-frameworks.sh\"\n"; 330 | showEnvVarsInLog = 0; 331 | }; 332 | 989884637C47E5EED1F6F894 /* [CP] Embed Pods Frameworks */ = { 333 | isa = PBXShellScriptBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | ); 337 | inputPaths = ( 338 | "${SRCROOT}/Pods/Target Support Files/Pods-RxSegue_Tests/Pods-RxSegue_Tests-frameworks.sh", 339 | "${BUILT_PRODUCTS_DIR}/RxSegue/RxSegue.framework", 340 | "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", 341 | "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", 342 | ); 343 | name = "[CP] Embed Pods Frameworks"; 344 | outputPaths = ( 345 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSegue.framework", 346 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", 347 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | shellPath = /bin/sh; 351 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxSegue_Tests/Pods-RxSegue_Tests-frameworks.sh\"\n"; 352 | showEnvVarsInLog = 0; 353 | }; 354 | 9CC170A484709D0EF4C54AC9 /* [CP] Copy Pods Resources */ = { 355 | isa = PBXShellScriptBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | ); 359 | inputPaths = ( 360 | ); 361 | name = "[CP] Copy Pods Resources"; 362 | outputPaths = ( 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | shellPath = /bin/sh; 366 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxSegue_Example/Pods-RxSegue_Example-resources.sh\"\n"; 367 | showEnvVarsInLog = 0; 368 | }; 369 | A040D39929249D47B3B86E4B /* [CP] Check Pods Manifest.lock */ = { 370 | isa = PBXShellScriptBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | ); 374 | inputPaths = ( 375 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 376 | "${PODS_ROOT}/Manifest.lock", 377 | ); 378 | name = "[CP] Check Pods Manifest.lock"; 379 | outputPaths = ( 380 | "$(DERIVED_FILE_DIR)/Pods-RxSegue_Example-checkManifestLockResult.txt", 381 | ); 382 | runOnlyForDeploymentPostprocessing = 0; 383 | shellPath = /bin/sh; 384 | 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"; 385 | showEnvVarsInLog = 0; 386 | }; 387 | B9792104F15E849A2D5EF2BB /* [CP] Copy Pods Resources */ = { 388 | isa = PBXShellScriptBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | ); 392 | inputPaths = ( 393 | ); 394 | name = "[CP] Copy Pods Resources"; 395 | outputPaths = ( 396 | ); 397 | runOnlyForDeploymentPostprocessing = 0; 398 | shellPath = /bin/sh; 399 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxSegue_Tests/Pods-RxSegue_Tests-resources.sh\"\n"; 400 | showEnvVarsInLog = 0; 401 | }; 402 | /* End PBXShellScriptBuildPhase section */ 403 | 404 | /* Begin PBXSourcesBuildPhase section */ 405 | 607FACCC1AFB9204008FA782 /* Sources */ = { 406 | isa = PBXSourcesBuildPhase; 407 | buildActionMask = 2147483647; 408 | files = ( 409 | 84A996871C9D5A49004957F8 /* BaseViewController.swift in Sources */, 410 | 841911881C43E82700D14629 /* SecondViewController.swift in Sources */, 411 | 84A996891C9D5B87004957F8 /* RootViewController.swift in Sources */, 412 | 8419117E1C43E3B600D14629 /* ProfileViewController.swift in Sources */, 413 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 414 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 415 | ); 416 | runOnlyForDeploymentPostprocessing = 0; 417 | }; 418 | 607FACE11AFB9204008FA782 /* Sources */ = { 419 | isa = PBXSourcesBuildPhase; 420 | buildActionMask = 2147483647; 421 | files = ( 422 | 84A996921C9D6BC8004957F8 /* NavigationSegueSpec.swift in Sources */, 423 | 84A9968F1C9D6762004957F8 /* MockViewController.swift in Sources */, 424 | 84A9968B1C9D5F98004957F8 /* ModalSegueSpec.swift in Sources */, 425 | ); 426 | runOnlyForDeploymentPostprocessing = 0; 427 | }; 428 | /* End PBXSourcesBuildPhase section */ 429 | 430 | /* Begin PBXTargetDependency section */ 431 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 432 | isa = PBXTargetDependency; 433 | target = 607FACCF1AFB9204008FA782 /* RxSegue_Example */; 434 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 435 | }; 436 | /* End PBXTargetDependency section */ 437 | 438 | /* Begin PBXVariantGroup section */ 439 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 440 | isa = PBXVariantGroup; 441 | children = ( 442 | 607FACDA1AFB9204008FA782 /* Base */, 443 | ); 444 | name = Main.storyboard; 445 | sourceTree = ""; 446 | }; 447 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 448 | isa = PBXVariantGroup; 449 | children = ( 450 | 607FACDF1AFB9204008FA782 /* Base */, 451 | ); 452 | name = LaunchScreen.xib; 453 | sourceTree = ""; 454 | }; 455 | /* End PBXVariantGroup section */ 456 | 457 | /* Begin XCBuildConfiguration section */ 458 | 607FACED1AFB9204008FA782 /* Debug */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | ALWAYS_SEARCH_USER_PATHS = NO; 462 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 463 | CLANG_CXX_LIBRARY = "libc++"; 464 | CLANG_ENABLE_MODULES = YES; 465 | CLANG_ENABLE_OBJC_ARC = YES; 466 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 467 | CLANG_WARN_BOOL_CONVERSION = YES; 468 | CLANG_WARN_COMMA = YES; 469 | CLANG_WARN_CONSTANT_CONVERSION = YES; 470 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 471 | CLANG_WARN_EMPTY_BODY = YES; 472 | CLANG_WARN_ENUM_CONVERSION = YES; 473 | CLANG_WARN_INFINITE_RECURSION = YES; 474 | CLANG_WARN_INT_CONVERSION = YES; 475 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 477 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 478 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 479 | CLANG_WARN_STRICT_PROTOTYPES = YES; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CLANG_WARN_UNREACHABLE_CODE = YES; 482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | COPY_PHASE_STRIP = NO; 485 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 486 | ENABLE_STRICT_OBJC_MSGSEND = YES; 487 | ENABLE_TESTABILITY = YES; 488 | GCC_C_LANGUAGE_STANDARD = gnu99; 489 | GCC_DYNAMIC_NO_PIC = NO; 490 | GCC_NO_COMMON_BLOCKS = YES; 491 | GCC_OPTIMIZATION_LEVEL = 0; 492 | GCC_PREPROCESSOR_DEFINITIONS = ( 493 | "DEBUG=1", 494 | "$(inherited)", 495 | ); 496 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 497 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 498 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 499 | GCC_WARN_UNDECLARED_SELECTOR = YES; 500 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 501 | GCC_WARN_UNUSED_FUNCTION = YES; 502 | GCC_WARN_UNUSED_VARIABLE = YES; 503 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 504 | MTL_ENABLE_DEBUG_INFO = YES; 505 | ONLY_ACTIVE_ARCH = YES; 506 | SDKROOT = iphoneos; 507 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 508 | }; 509 | name = Debug; 510 | }; 511 | 607FACEE1AFB9204008FA782 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | ALWAYS_SEARCH_USER_PATHS = NO; 515 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 516 | CLANG_CXX_LIBRARY = "libc++"; 517 | CLANG_ENABLE_MODULES = YES; 518 | CLANG_ENABLE_OBJC_ARC = YES; 519 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 520 | CLANG_WARN_BOOL_CONVERSION = YES; 521 | CLANG_WARN_COMMA = YES; 522 | CLANG_WARN_CONSTANT_CONVERSION = YES; 523 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 524 | CLANG_WARN_EMPTY_BODY = YES; 525 | CLANG_WARN_ENUM_CONVERSION = YES; 526 | CLANG_WARN_INFINITE_RECURSION = YES; 527 | CLANG_WARN_INT_CONVERSION = YES; 528 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 529 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 530 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 531 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 532 | CLANG_WARN_STRICT_PROTOTYPES = YES; 533 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 534 | CLANG_WARN_UNREACHABLE_CODE = YES; 535 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 536 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 537 | COPY_PHASE_STRIP = NO; 538 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 539 | ENABLE_NS_ASSERTIONS = NO; 540 | ENABLE_STRICT_OBJC_MSGSEND = YES; 541 | GCC_C_LANGUAGE_STANDARD = gnu99; 542 | GCC_NO_COMMON_BLOCKS = YES; 543 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 544 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 545 | GCC_WARN_UNDECLARED_SELECTOR = YES; 546 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 547 | GCC_WARN_UNUSED_FUNCTION = YES; 548 | GCC_WARN_UNUSED_VARIABLE = YES; 549 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 550 | MTL_ENABLE_DEBUG_INFO = NO; 551 | SDKROOT = iphoneos; 552 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 553 | VALIDATE_PRODUCT = YES; 554 | }; 555 | name = Release; 556 | }; 557 | 607FACF01AFB9204008FA782 /* Debug */ = { 558 | isa = XCBuildConfiguration; 559 | baseConfigurationReference = FBF2D70EA123A1174FA12763 /* Pods-RxSegue_Example.debug.xcconfig */; 560 | buildSettings = { 561 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 562 | INFOPLIST_FILE = RxSegue/Info.plist; 563 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 564 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 565 | MODULE_NAME = ExampleApp; 566 | OTHER_SWIFT_FLAGS = "$(inherited)"; 567 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 568 | PRODUCT_NAME = "$(TARGET_NAME)"; 569 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 570 | SWIFT_VERSION = 4.0; 571 | }; 572 | name = Debug; 573 | }; 574 | 607FACF11AFB9204008FA782 /* Release */ = { 575 | isa = XCBuildConfiguration; 576 | baseConfigurationReference = D26D9089E7D1FC617D4C9EEC /* Pods-RxSegue_Example.release.xcconfig */; 577 | buildSettings = { 578 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 579 | INFOPLIST_FILE = RxSegue/Info.plist; 580 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 581 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 582 | MODULE_NAME = ExampleApp; 583 | OTHER_SWIFT_FLAGS = "$(inherited)"; 584 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 585 | PRODUCT_NAME = "$(TARGET_NAME)"; 586 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 587 | SWIFT_VERSION = 4.0; 588 | }; 589 | name = Release; 590 | }; 591 | 607FACF31AFB9204008FA782 /* Debug */ = { 592 | isa = XCBuildConfiguration; 593 | baseConfigurationReference = CE46285659D7A5F282188505 /* Pods-RxSegue_Tests.debug.xcconfig */; 594 | buildSettings = { 595 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 596 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 597 | GCC_PREPROCESSOR_DEFINITIONS = ( 598 | "DEBUG=1", 599 | "$(inherited)", 600 | ); 601 | INFOPLIST_FILE = Tests/Info.plist; 602 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 603 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 604 | PRODUCT_NAME = "$(TARGET_NAME)"; 605 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 606 | SWIFT_VERSION = 4.0; 607 | }; 608 | name = Debug; 609 | }; 610 | 607FACF41AFB9204008FA782 /* Release */ = { 611 | isa = XCBuildConfiguration; 612 | baseConfigurationReference = 1B0B52ADB1AF36E07EAF6B89 /* Pods-RxSegue_Tests.release.xcconfig */; 613 | buildSettings = { 614 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 615 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 616 | INFOPLIST_FILE = Tests/Info.plist; 617 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 618 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 619 | PRODUCT_NAME = "$(TARGET_NAME)"; 620 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 621 | SWIFT_VERSION = 4.0; 622 | }; 623 | name = Release; 624 | }; 625 | /* End XCBuildConfiguration section */ 626 | 627 | /* Begin XCConfigurationList section */ 628 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RxSegue" */ = { 629 | isa = XCConfigurationList; 630 | buildConfigurations = ( 631 | 607FACED1AFB9204008FA782 /* Debug */, 632 | 607FACEE1AFB9204008FA782 /* Release */, 633 | ); 634 | defaultConfigurationIsVisible = 0; 635 | defaultConfigurationName = Release; 636 | }; 637 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RxSegue_Example" */ = { 638 | isa = XCConfigurationList; 639 | buildConfigurations = ( 640 | 607FACF01AFB9204008FA782 /* Debug */, 641 | 607FACF11AFB9204008FA782 /* Release */, 642 | ); 643 | defaultConfigurationIsVisible = 0; 644 | defaultConfigurationName = Release; 645 | }; 646 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RxSegue_Tests" */ = { 647 | isa = XCConfigurationList; 648 | buildConfigurations = ( 649 | 607FACF31AFB9204008FA782 /* Debug */, 650 | 607FACF41AFB9204008FA782 /* Release */, 651 | ); 652 | defaultConfigurationIsVisible = 0; 653 | defaultConfigurationName = Release; 654 | }; 655 | /* End XCConfigurationList section */ 656 | }; 657 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 658 | } 659 | -------------------------------------------------------------------------------- /Example/RxSegue.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/RxSegue.xcodeproj/xcshareddata/xcschemes/RxSegue-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 101 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Example/RxSegue.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/RxSegue/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RxSegue 4 | // 5 | // Created by sshulga on 01/11/2016. 6 | // Copyright (c) 2016 sshulga. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | var window: UIWindow? 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Example/RxSegue/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/RxSegue/Base.lproj/Main.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 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 54 | 57 | 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 | 102 | 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 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /Example/RxSegue/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RxSwift 11 | 12 | //func delay(delay:Double, queue:dispatch_queue_t = dispatch_get_main_queue() , closure:()->()) { 13 | // dispatch_after( 14 | // dispatch_time( 15 | // DISPATCH_TIME_NOW, 16 | // Int64(delay * Double(NSEC_PER_SEC)) 17 | // ), 18 | // queue, closure) 19 | //} 20 | 21 | class BaseViewController: UIViewController { 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | #if TRACE_RESOURCES 26 | print("Number of start resources = \(RxSwift.Resources.total)") 27 | #endif 28 | } 29 | 30 | deinit { 31 | #if TRACE_RESOURCES 32 | print("deinit \(self)") 33 | print("View controller disposed with \(RxSwift.Resources.total) resources") 34 | // delay(0.1, closure: { () -> () in 35 | // print("Number of resource after deinit \(RxSwift.resourceCount)") 36 | // }) 37 | #endif 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Example/RxSegue/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 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/RxSegue/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/RxSegue/Images.xcassets/avatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "avatar@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/RxSegue/Images.xcassets/avatar.imageset/avatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RxSwiftCommunity/RxSegue/c6fb2a3992d70a5da55ec61b15ee069b7e45e799/Example/RxSegue/Images.xcassets/avatar.imageset/avatar@2x.png -------------------------------------------------------------------------------- /Example/RxSegue/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/RxSegue/ProfileViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileViewController.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 1/11/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RxSwift 11 | import RxCocoa 12 | 13 | class ProfileViewModel { 14 | let name:Variable 15 | let email:Variable 16 | let avatar:Variable 17 | 18 | init(name:String, email:String, avatar:UIImage? = nil) { 19 | self.name = Variable(name) 20 | self.email = Variable(email) 21 | self.avatar = Variable(avatar) 22 | } 23 | } 24 | 25 | class ProfileViewController: BaseViewController { 26 | 27 | let disposeBag = DisposeBag() 28 | 29 | @IBOutlet var imageView: UIImageView! 30 | @IBOutlet var nameLabel: UILabel! 31 | @IBOutlet var emailLabel: UILabel! 32 | 33 | var profileViewModel:ProfileViewModel! 34 | 35 | override func viewDidLoad() { 36 | super.viewDidLoad() 37 | 38 | profileViewModel.avatar 39 | .asObservable() 40 | .bind(to: imageView.rx.image) 41 | .disposed(by: disposeBag) 42 | 43 | profileViewModel.email 44 | .asObservable() 45 | .map(Optional.init) 46 | .bind(to: emailLabel.rx.text) 47 | .disposed(by: disposeBag) 48 | 49 | profileViewModel.name 50 | .asObservable() 51 | .map(Optional.init) 52 | .bind(to: nameLabel.rx.text) 53 | .disposed(by: disposeBag) 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Example/RxSegue/RootViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class RootViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | 26 | @IBAction func presentPressed(sender: AnyObject) { 27 | let viewController: ViewController = StoryBoard.main.instantiateViewController() 28 | let navigationController = UINavigationController(rootViewController: viewController) 29 | present(navigationController, 30 | animated: true, 31 | completion: nil) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Example/RxSegue/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 1/11/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RxCocoa 11 | import RxSwift 12 | 13 | class SecondViewController: BaseViewController { 14 | 15 | let disposeBag = DisposeBag() 16 | 17 | @IBOutlet weak var dismissButton: UIButton! 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | dismissButton 21 | .rx.tap 22 | .subscribe(onNext:{ [weak self] in 23 | self?.dismiss(animated: true, completion: nil) 24 | }) 25 | .disposed(by: disposeBag) 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Example/RxSegue/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // RxSegue 4 | // 5 | // Created by sshulga on 01/11/2016. 6 | // Copyright (c) 2016 sshulga. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RxSegue 11 | import RxSwift 12 | import RxCocoa 13 | 14 | struct StoryBoard { 15 | static let main = UIStoryboard(name: "Main", bundle: nil) 16 | } 17 | 18 | extension UIViewController { 19 | class var storyboardId: String { 20 | return String(describing: self) 21 | } 22 | } 23 | 24 | extension UIStoryboard { 25 | func instantiateViewController() -> T { 26 | guard let viewController = instantiateViewController(withIdentifier: T.storyboardId) as? T else { 27 | fatalError("Cast error to \(T.self)") 28 | } 29 | return viewController 30 | } 31 | } 32 | 33 | class ViewController: BaseViewController { 34 | let disposeBag = DisposeBag() 35 | @IBOutlet var pushButton: UIButton! 36 | @IBOutlet var presentButton: UIButton! 37 | @IBOutlet weak var dismissButton: UIButton! 38 | 39 | var voidSegue: AnyObserver { 40 | return ModalSegue(fromViewController: self, 41 | toViewControllerFactory: { (sender, context) -> SecondViewController in 42 | return StoryBoard.main.instantiateViewController() 43 | }).asObserver() 44 | } 45 | 46 | var profileSegue: AnyObserver { 47 | return NavigationSegue(fromViewController: self.navigationController!, 48 | toViewControllerFactory: { (sender, context) -> ProfileViewController in 49 | let profileViewController: ProfileViewController = StoryBoard.main 50 | .instantiateViewController() 51 | profileViewController.profileViewModel = context 52 | 53 | return profileViewController 54 | }).asObserver() 55 | } 56 | 57 | override func viewDidLoad() { 58 | super.viewDidLoad() 59 | 60 | presentButton.rx.tap 61 | .bind(to: voidSegue) 62 | .disposed(by: disposeBag) 63 | 64 | pushButton.rx.tap 65 | .map { 66 | return ProfileViewModel(name: "John Doe", 67 | email: "JohnDoe@example.com", 68 | avatar: UIImage(named: "avatar")) 69 | } 70 | .bind(to: profileSegue) 71 | .disposed(by: disposeBag) 72 | 73 | dismissButton.rx.tap 74 | .subscribe (onNext: { [weak self] in 75 | self?.dismiss(animated: true, completion: nil) 76 | }) 77 | .disposed(by: disposeBag) 78 | } 79 | 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/Mocks/MockViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MockViewController.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MockViewController: UIViewController { 12 | 13 | override func present(_ viewControllerToPresent: UIViewController, 14 | animated flag: Bool, 15 | completion: (() -> Void)?) { 16 | completion?() 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Example/Tests/ModalSegueSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModalSegueTests.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Nimble 11 | import RxSegue 12 | import RxSwift 13 | 14 | let dummyError = NSError(domain: "RxSegue.dummyError", code: -1, userInfo: nil) 15 | 16 | final class ModalSegueTests: XCTestCase { 17 | 18 | func test_ShouldCallToViewControllerFactoryWithSameSender() { 19 | let viewController = MockViewController() 20 | let subject = Observable.just(Void()) 21 | var sameSender: Bool? 22 | 23 | let segue = ModalSegue( 24 | fromViewController: viewController, 25 | toViewControllerFactory: { (sender, _) -> UIViewController in 26 | sameSender = viewController === sender 27 | return UIViewController() 28 | }) 29 | _ = subject.subscribe(segue) 30 | 31 | expect(sameSender).toNot(beNil()) 32 | expect(sameSender).to(beTrue()) 33 | } 34 | 35 | func test_ShouldNotCallToViewControllerFactoryForEmptyObservable() { 36 | let viewController = MockViewController() 37 | let empty = Observable.empty() 38 | var factoryCalled = false 39 | 40 | let segue = ModalSegue( 41 | fromViewController: viewController, 42 | toViewControllerFactory: { (sender, context) -> UIViewController in 43 | factoryCalled = true 44 | return UIViewController() 45 | }) 46 | _ = empty.subscribe(segue) 47 | 48 | expect(factoryCalled).to(beFalse()) 49 | } 50 | 51 | func test_ShouldNotCallToViewControllerFactoryWithErrorObservable() { 52 | let viewController = MockViewController() 53 | let errorObservable = Observable.error(dummyError) 54 | var factoryCalled = false 55 | 56 | let segue = ModalSegue( 57 | fromViewController: viewController, 58 | toViewControllerFactory: { (sender, context) -> UIViewController in 59 | factoryCalled = true 60 | return UIViewController() 61 | }) 62 | _ = errorObservable.subscribe(segue) 63 | 64 | expect(factoryCalled).to(beFalse()) 65 | } 66 | 67 | func test_ShouldHaveSameContextValue() { 68 | let viewController = MockViewController() 69 | var expectedContext: Int? 70 | let subject = Observable.just(1) 71 | 72 | let segue = ModalSegue( 73 | fromViewController: viewController, 74 | toViewControllerFactory: { (sender, context) -> UIViewController in 75 | expectedContext = context 76 | return UIViewController() 77 | }) 78 | _ = subject.asObservable().subscribe(segue) 79 | 80 | expect(expectedContext).to(be(1)) 81 | } 82 | 83 | func test_ShouldCallCompletionBlock() { 84 | let viewController = MockViewController() 85 | let subject = Observable.just(Void()) 86 | var completionCalled = false 87 | 88 | let segue = ModalSegue( 89 | fromViewController: viewController, 90 | toViewControllerFactory: { (sender, context) -> UIViewController in 91 | return UIViewController() 92 | }, 93 | animated: true, 94 | presentationCompletion: { 95 | completionCalled = true 96 | }) 97 | _ = subject.asObservable().subscribe(segue) 98 | 99 | expect(completionCalled).to(beTrue()) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Example/Tests/NavigationSegueSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationSegueSpec.swift 3 | // RxSegue 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Nimble 11 | import RxSegue 12 | import RxSwift 13 | 14 | class NavigationSegueTests: XCTestCase { 15 | 16 | func test_ShouldCallToViewControllerFactoryWithSameSender() { 17 | let just = Observable.just(Void()) 18 | var sameSender: Bool? 19 | let navigationController = UINavigationController(rootViewController: UIViewController()) 20 | 21 | let segue = NavigationSegue( 22 | fromViewController: navigationController, 23 | toViewControllerFactory: { (sender, context) -> UIViewController in 24 | sameSender = navigationController === sender 25 | return UIViewController() 26 | }) 27 | _ = just.subscribe(segue) 28 | 29 | expect(sameSender).toNot(beNil()) 30 | expect(sameSender).to(beTrue()) 31 | } 32 | 33 | func test_ShouldNotCallToViewControllerFactoryWithEmptyObservable() { 34 | let empty = Observable.empty() 35 | var factoryCalled = false 36 | let navigationController = UINavigationController(rootViewController: UIViewController()) 37 | 38 | let segue = NavigationSegue( 39 | fromViewController: navigationController, 40 | toViewControllerFactory: { (sender, context) -> UIViewController in 41 | factoryCalled = true 42 | return UIViewController() 43 | }) 44 | _ = empty.subscribe(segue) 45 | 46 | expect(factoryCalled).to(beFalse()) 47 | } 48 | 49 | func test_ShouldNotCallToViewControllerFactoryWithErrorObservable() { 50 | let errorObservable = Observable.error(dummyError) 51 | var factoryCalled = false 52 | let navigationController = UINavigationController(rootViewController: UIViewController()) 53 | 54 | let segue = NavigationSegue( 55 | fromViewController: navigationController, 56 | toViewControllerFactory: { (sender, context) -> UIViewController in 57 | factoryCalled = true 58 | return UIViewController() 59 | }) 60 | _ = errorObservable.subscribe(segue) 61 | 62 | expect(factoryCalled).to(beFalse()) 63 | } 64 | 65 | func test_shouldHaveSameContextInFactoryClosure() { 66 | let just = Observable.just(1) 67 | var expectedContext: Int? 68 | let navigationController = UINavigationController(rootViewController: UIViewController()) 69 | 70 | let segue = NavigationSegue( 71 | fromViewController: navigationController, 72 | toViewControllerFactory: { (sender, context) -> UIViewController in 73 | expectedContext = context 74 | return UIViewController() 75 | }) 76 | _ = just.subscribe(segue) 77 | 78 | expect(expectedContext).toNot(beNil()) 79 | expect(expectedContext).to(be(1)) 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 RxSwiftCommunity 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RxSwiftCommunity/RxSegue/c6fb2a3992d70a5da55ec61b15ee069b7e45e799/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RxSwiftCommunity/RxSegue/c6fb2a3992d70a5da55ec61b15ee069b7e45e799/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/Helpers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Helpers.swift 3 | // Pods 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | func bindingErrorToInterface(_ error: Error) { 12 | let errorMessage = "Binding error to UI: \(error)" 13 | #if DEBUG 14 | fatalError(errorMessage) 15 | #else 16 | print(errorMessage) 17 | #endif 18 | } 19 | -------------------------------------------------------------------------------- /Pod/Classes/ModalSegue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ModalSegue.swift 3 | // Pods 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // 7 | // 8 | 9 | import UIKit 10 | import RxSwift 11 | 12 | public struct ModalSegue: SegueType { 14 | /** 15 | The type of elements in sequence that observer can observe. 16 | */ 17 | public typealias E = ContextType 18 | /** 19 | Type of the view controller from which navigation will appear 20 | */ 21 | public typealias T = FromViewControllerType 22 | /** 23 | Type of the target view controller 24 | */ 25 | public typealias U = ToViewControllerType 26 | /** 27 | Represents view controller from which navigation will appear 28 | */ 29 | public weak var fromViewController: T? 30 | /** 31 | View controller factory closure, which produces view controller to navigate to 32 | 33 | - parameter sender: view controller from which navigation will appear 34 | - parameter context: contex to pass to the target view controller 35 | 36 | - returns: created and configured view controller 37 | */ 38 | public let toViewControllerFactory: (_ sender: T, _ context: E) -> U 39 | /** 40 | Represetns whether transitions should be animated or not 41 | */ 42 | public let animated: Bool 43 | /** 44 | Completion closure for the modal presentation 45 | */ 46 | let presentationCompletion: (() -> Void)? 47 | /** 48 | Constructs new moodal segue 49 | 50 | - parameter fromViewController: view controller from which navigation will appear 51 | - parameter toViewControllerFactory: view controller factory closure, which produces view controller to navigate to 52 | - parameter animated: represetns whether transitions should be animated or not 53 | - parameter presentationCompletion: completion closure for the modal presentation 54 | */ 55 | public init(fromViewController: T, 56 | toViewControllerFactory: @escaping (_ sender: T, _ context: E) -> U, 57 | animated: Bool = true, 58 | presentationCompletion: (() -> Void)? = nil) { 59 | self.fromViewController = fromViewController 60 | self.toViewControllerFactory = toViewControllerFactory 61 | self.animated = animated 62 | self.presentationCompletion = presentationCompletion 63 | } 64 | /** 65 | Notify observer about sequence event. 66 | 67 | - parameter event: Event that occured. 68 | */ 69 | public func on(_ event: Event) { 70 | MainScheduler.ensureExecutingOnScheduler() 71 | 72 | switch event { 73 | case .next(let element): 74 | guard let fromVC = fromViewController else { 75 | return 76 | } 77 | let toVC = toViewControllerFactory(fromVC, element) 78 | fromVC.present(toVC, 79 | animated: animated, 80 | completion: presentationCompletion) 81 | case .error(let error): 82 | bindingErrorToInterface(error) 83 | break 84 | case .completed: 85 | break 86 | } 87 | } 88 | /** 89 | Erases type of observer and returns canonical observer. 90 | 91 | - returns: type erased observer. 92 | */ 93 | func asObserver() -> AnyObserver { 94 | return AnyObserver(eventHandler: on) 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Pod/Classes/NavigationSegue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationSegue.swift 3 | // Pods 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // 7 | // 8 | 9 | import UIKit 10 | import RxSwift 11 | 12 | public struct NavigationSegue< 13 | FromViewControllerType: UINavigationController, 14 | ToViewControllerType: UIViewController, 15 | ContextType>: SegueType { 16 | /** 17 | The type of elements in sequence that observer can observe. 18 | */ 19 | public typealias E = ContextType 20 | /** 21 | Type of the view controller from which navigation will appear 22 | */ 23 | public typealias T = FromViewControllerType 24 | /** 25 | Type of the target view controller 26 | */ 27 | public typealias U = ToViewControllerType 28 | /** 29 | Represents view controller from which navigation will appear 30 | */ 31 | public weak var fromViewController: T? 32 | /** 33 | View controller factory closure, which produces view controller to navigate to 34 | 35 | - parameter sender: view controller from which navigation will appear 36 | - parameter context: contex to pass to the target view controller 37 | 38 | - returns: created and configured view controller 39 | */ 40 | public let toViewControllerFactory: (_ sender: T, _ context: E) -> U 41 | /** 42 | Represetns whether transitions should be animated or not 43 | */ 44 | public let animated: Bool 45 | /** 46 | Constructs new navigation segue 47 | 48 | - parameter fromViewController: view controller from which navigation will appear 49 | - parameter toViewControllerFactory: view controller factory closure, which produces view controller to navigate to 50 | - parameter animated: represetns whether transitions should be animated or not */ 51 | public init(fromViewController: T, 52 | toViewControllerFactory: @escaping (_ sender: T, _ context: E) -> U, 53 | animated: Bool = true) { 54 | self.fromViewController = fromViewController 55 | self.toViewControllerFactory = toViewControllerFactory 56 | self.animated = animated 57 | } 58 | /** 59 | Notify observer about sequence event. 60 | 61 | - parameter event: Event that occured. 62 | */ 63 | public func on(_ event: Event) { 64 | MainScheduler.ensureExecutingOnScheduler() 65 | 66 | switch event { 67 | case .next(let element): 68 | guard let fromVC = fromViewController else { 69 | return 70 | } 71 | let toVC = toViewControllerFactory(fromVC, element) 72 | fromVC.pushViewController(toVC, animated: animated) 73 | case .error(let error): 74 | bindingErrorToInterface(error) 75 | break 76 | case .completed: 77 | break 78 | } 79 | } 80 | /** 81 | Erases type of observer and returns canonical observer. 82 | 83 | - returns: type erased observer. 84 | */ 85 | func asObserver() -> AnyObserver { 86 | return AnyObserver(eventHandler: on) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Pod/Classes/SegueType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SegueType.swift 3 | // Pods 4 | // 5 | // Created by Segii Shulga on 3/19/16. 6 | // 7 | // 8 | 9 | import UIKit 10 | import RxSwift 11 | 12 | /** 13 | * `SegueType`. 14 | 15 | represents base intarface for navigation abstraction 16 | */ 17 | public protocol SegueType: ObserverType { 18 | /** 19 | Type of the view controller from which navigation will appear 20 | */ 21 | associatedtype T 22 | /** 23 | Type of the target view controller 24 | */ 25 | associatedtype U 26 | /** 27 | Represents view controller from which navigation will appear 28 | */ 29 | var fromViewController: T? { get } 30 | /** 31 | View controller factory closure, which produces view controller to navigate to 32 | 33 | - parameter sender: view controller from which navigation will appear 34 | - parameter context: contex to pass to the target view controller 35 | 36 | - returns: created and configured view controller 37 | */ 38 | var toViewControllerFactory: (_ sender: T, _ context: E) -> U { get } 39 | /** 40 | Represetns whether transitions should be animated or not 41 | */ 42 | var animated: Bool { get } 43 | } 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RxSegue 2 | ### Reactive generic segue, implemented with RxSwift. 3 | 4 | [![Build Status](https://travis-ci.org/RxSwiftCommunity/RxSegue.svg?branch=master)](https://travis-ci.org/RxSwiftCommunity/RxSegue) 5 | [![Version](https://img.shields.io/cocoapods/v/RxSegue.svg?style=flat)](http://cocoapods.org/pods/RxSegue) 6 | [![License](https://img.shields.io/cocoapods/l/RxSegue.svg?style=flat)](http://cocoapods.org/pods/RxSegue) 7 | [![Platform](https://img.shields.io/cocoapods/p/RxSegue.svg?style=flat)](http://cocoapods.org/pods/RxSegue) 8 | 9 | ## Usage 10 | 11 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 12 | 13 | ## Example 14 | 15 | ![RxSegueExample](https://github.com/RxSwiftCommunity/RxSegue/blob/master/RxSegueExample.gif) 16 | 17 | ```swift 18 | class ViewController: BaseViewController { 19 | let disposeBag = DisposeBag() 20 | @IBOutlet var pushButton: UIButton! 21 | @IBOutlet var presentButton: UIButton! 22 | @IBOutlet weak var dismissButton: UIButton! 23 | 24 | var voidSegue: AnyObserver { 25 | return ModalSegue(fromViewController: self, 26 | toViewControllerFactory: { (sender, context) -> SecondViewController in 27 | return SecondViewController() 28 | }).asObserver() 29 | } 30 | 31 | var profileSegue: AnyObserver { 32 | return NavigationSegue(fromViewController: self.navigationController!, 33 | toViewControllerFactory: { (sender, context) -> ProfileViewController in 34 | let profileViewController: ProfileViewController = ... 35 | profileViewController.profileViewModel = context 36 | return profileViewController 37 | }).asObserver() 38 | } 39 | 40 | override func viewDidLoad() { 41 | super.viewDidLoad() 42 | 43 | presentButton.rx.tap 44 | .bindTo(voidSegue) 45 | .addDisposableTo(disposeBag) 46 | 47 | pushButton.rx.tap 48 | .map { 49 | return ProfileViewModel(name: "John Doe", 50 | email: "JohnDoe@example.com", 51 | avatar: UIImage(named: "avatar")) 52 | } 53 | .bindTo(profileSegue) 54 | .addDisposableTo(disposeBag) 55 | } 56 | 57 | } 58 | ``` 59 | 60 | ## Installation 61 | 62 | RxSegue is available through [CocoaPods](http://cocoapods.org). To install 63 | it, simply add the following line to your Podfile: 64 | 65 | ```ruby 66 | pod "RxSegue" 67 | ``` 68 | 69 | ## License 70 | 71 | RxSegue is available under the MIT license. See the LICENSE file for more info. 72 | -------------------------------------------------------------------------------- /RxSegue.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "RxSegue" 3 | s.version = "2.0.0" 4 | s.summary = "Reactive generic segue" 5 | 6 | # This description is used to generate tags and improve search results. 7 | # * Think: What does it do? Why did you write it? What is the focus? 8 | # * Try to keep it short, snappy and to the point. 9 | # * Write the description between the DESC delimiters below. 10 | # * Finally, don't worry about the indent, CocoaPods strips it! 11 | s.description = <<-DESC 12 | Reactive generic segue. 13 | Implemented with RxSwift. 14 | Abstracts navigation logic 15 | 16 | ```swift 17 | var profileSegue: NavigationSegue { 20 | return NavigationSegue(fromViewController: self.navigationController!, 21 | toViewControllerFactory: { (sender, context) -> ProfileViewController in 22 | let profileViewController: ProfileViewController = ... 23 | profileViewController.profileViewModel = context 24 | return profileViewController 25 | }) 26 | } 27 | //---------- 28 | pushButton.rx_tap 29 | .map { 30 | return ProfileViewModel(name: "John Doe", 31 | email: "JohnDoe@example.com", 32 | avatar: UIImage(named: "avatar")) 33 | } 34 | .bindTo(profileSegue) 35 | .addDisposableTo(disposeBag) 36 | 37 | ``` 38 | DESC 39 | 40 | s.homepage = "https://github.com/RxSwiftCommunity/RxSegue.git" 41 | s.license = 'MIT' 42 | s.author = { "sergdort" => "sergdort@gmail.com" } 43 | s.source = { 44 | :git => "https://github.com/RxSwiftCommunity/RxSegue.git", 45 | :tag => s.version.to_s 46 | } 47 | s.social_media_url = 'https://twitter.com/SergDort' 48 | 49 | s.platform = :ios, '8.0' 50 | s.requires_arc = true 51 | 52 | s.source_files = 'Pod/Classes/**/*' 53 | s.dependency 'RxSwift', '~> 4.0' 54 | end 55 | -------------------------------------------------------------------------------- /RxSegue.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2242BE081CD0DB490072B9AA /* RxSegue.h in Headers */ = {isa = PBXBuildFile; fileRef = 2242BE071CD0DB490072B9AA /* RxSegue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 2242BE161CD0DB910072B9AA /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2242BE111CD0DB910072B9AA /* Helpers.swift */; }; 12 | 2242BE171CD0DB910072B9AA /* ModalSegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2242BE121CD0DB910072B9AA /* ModalSegue.swift */; }; 13 | 2242BE181CD0DB910072B9AA /* NavigationSegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2242BE131CD0DB910072B9AA /* NavigationSegue.swift */; }; 14 | 2242BE191CD0DB910072B9AA /* SegueType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2242BE141CD0DB910072B9AA /* SegueType.swift */; }; 15 | 2242BE451CD0DF2B0072B9AA /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2242BE441CD0DF2B0072B9AA /* RxSwift.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 2242BE041CD0DB490072B9AA /* RxSegue.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSegue.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 2242BE071CD0DB490072B9AA /* RxSegue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RxSegue.h; sourceTree = ""; }; 21 | 2242BE091CD0DB490072B9AA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22 | 2242BE111CD0DB910072B9AA /* Helpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Helpers.swift; sourceTree = ""; }; 23 | 2242BE121CD0DB910072B9AA /* ModalSegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModalSegue.swift; sourceTree = ""; }; 24 | 2242BE131CD0DB910072B9AA /* NavigationSegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationSegue.swift; sourceTree = ""; }; 25 | 2242BE141CD0DB910072B9AA /* SegueType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SegueType.swift; sourceTree = ""; }; 26 | 2242BE441CD0DF2B0072B9AA /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = Carthage/Build/iOS/RxSwift.framework; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 2242BE001CD0DB490072B9AA /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | 2242BE451CD0DF2B0072B9AA /* RxSwift.framework in Frameworks */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | 2242BDFA1CD0DB490072B9AA = { 42 | isa = PBXGroup; 43 | children = ( 44 | 2242BE0F1CD0DB910072B9AA /* Classes */, 45 | 2242BE411CD0DE950072B9AA /* Carthage */, 46 | 2242BE061CD0DB490072B9AA /* RxSegue */, 47 | 2242BE051CD0DB490072B9AA /* Products */, 48 | ); 49 | sourceTree = ""; 50 | }; 51 | 2242BE051CD0DB490072B9AA /* Products */ = { 52 | isa = PBXGroup; 53 | children = ( 54 | 2242BE041CD0DB490072B9AA /* RxSegue.framework */, 55 | ); 56 | name = Products; 57 | sourceTree = ""; 58 | }; 59 | 2242BE061CD0DB490072B9AA /* RxSegue */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | 2242BE071CD0DB490072B9AA /* RxSegue.h */, 63 | 2242BE091CD0DB490072B9AA /* Info.plist */, 64 | ); 65 | path = RxSegue; 66 | sourceTree = ""; 67 | }; 68 | 2242BE0F1CD0DB910072B9AA /* Classes */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 2242BE111CD0DB910072B9AA /* Helpers.swift */, 72 | 2242BE121CD0DB910072B9AA /* ModalSegue.swift */, 73 | 2242BE131CD0DB910072B9AA /* NavigationSegue.swift */, 74 | 2242BE141CD0DB910072B9AA /* SegueType.swift */, 75 | ); 76 | name = Classes; 77 | path = Pod/Classes; 78 | sourceTree = ""; 79 | }; 80 | 2242BE411CD0DE950072B9AA /* Carthage */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 2242BE441CD0DF2B0072B9AA /* RxSwift.framework */, 84 | ); 85 | name = Carthage; 86 | sourceTree = ""; 87 | }; 88 | /* End PBXGroup section */ 89 | 90 | /* Begin PBXHeadersBuildPhase section */ 91 | 2242BE011CD0DB490072B9AA /* Headers */ = { 92 | isa = PBXHeadersBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 2242BE081CD0DB490072B9AA /* RxSegue.h in Headers */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | /* End PBXHeadersBuildPhase section */ 100 | 101 | /* Begin PBXNativeTarget section */ 102 | 2242BE031CD0DB490072B9AA /* RxSegue-iOS */ = { 103 | isa = PBXNativeTarget; 104 | buildConfigurationList = 2242BE0C1CD0DB490072B9AA /* Build configuration list for PBXNativeTarget "RxSegue-iOS" */; 105 | buildPhases = ( 106 | 2242BDFF1CD0DB490072B9AA /* Sources */, 107 | 2242BE001CD0DB490072B9AA /* Frameworks */, 108 | 2242BE011CD0DB490072B9AA /* Headers */, 109 | 2242BE021CD0DB490072B9AA /* Resources */, 110 | ); 111 | buildRules = ( 112 | ); 113 | dependencies = ( 114 | ); 115 | name = "RxSegue-iOS"; 116 | productName = RxSegue; 117 | productReference = 2242BE041CD0DB490072B9AA /* RxSegue.framework */; 118 | productType = "com.apple.product-type.framework"; 119 | }; 120 | /* End PBXNativeTarget section */ 121 | 122 | /* Begin PBXProject section */ 123 | 2242BDFB1CD0DB490072B9AA /* Project object */ = { 124 | isa = PBXProject; 125 | attributes = { 126 | LastUpgradeCheck = 0730; 127 | ORGANIZATIONNAME = RxSwiftCommunity; 128 | TargetAttributes = { 129 | 2242BE031CD0DB490072B9AA = { 130 | CreatedOnToolsVersion = 7.3; 131 | LastSwiftMigration = 0800; 132 | }; 133 | }; 134 | }; 135 | buildConfigurationList = 2242BDFE1CD0DB490072B9AA /* Build configuration list for PBXProject "RxSegue" */; 136 | compatibilityVersion = "Xcode 3.2"; 137 | developmentRegion = English; 138 | hasScannedForEncodings = 0; 139 | knownRegions = ( 140 | en, 141 | ); 142 | mainGroup = 2242BDFA1CD0DB490072B9AA; 143 | productRefGroup = 2242BE051CD0DB490072B9AA /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | 2242BE031CD0DB490072B9AA /* RxSegue-iOS */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | 2242BE021CD0DB490072B9AA /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | /* End PBXResourcesBuildPhase section */ 161 | 162 | /* Begin PBXSourcesBuildPhase section */ 163 | 2242BDFF1CD0DB490072B9AA /* Sources */ = { 164 | isa = PBXSourcesBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | 2242BE181CD0DB910072B9AA /* NavigationSegue.swift in Sources */, 168 | 2242BE191CD0DB910072B9AA /* SegueType.swift in Sources */, 169 | 2242BE161CD0DB910072B9AA /* Helpers.swift in Sources */, 170 | 2242BE171CD0DB910072B9AA /* ModalSegue.swift in Sources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXSourcesBuildPhase section */ 175 | 176 | /* Begin XCBuildConfiguration section */ 177 | 2242BE0A1CD0DB490072B9AA /* Debug */ = { 178 | isa = XCBuildConfiguration; 179 | buildSettings = { 180 | ALWAYS_SEARCH_USER_PATHS = NO; 181 | CLANG_ANALYZER_NONNULL = YES; 182 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 183 | CLANG_CXX_LIBRARY = "libc++"; 184 | CLANG_ENABLE_MODULES = YES; 185 | CLANG_ENABLE_OBJC_ARC = YES; 186 | CLANG_WARN_BOOL_CONVERSION = YES; 187 | CLANG_WARN_CONSTANT_CONVERSION = YES; 188 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 189 | CLANG_WARN_EMPTY_BODY = YES; 190 | CLANG_WARN_ENUM_CONVERSION = YES; 191 | CLANG_WARN_INT_CONVERSION = YES; 192 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 193 | CLANG_WARN_UNREACHABLE_CODE = YES; 194 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 195 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 196 | COPY_PHASE_STRIP = NO; 197 | CURRENT_PROJECT_VERSION = 1; 198 | DEBUG_INFORMATION_FORMAT = dwarf; 199 | ENABLE_STRICT_OBJC_MSGSEND = YES; 200 | ENABLE_TESTABILITY = YES; 201 | GCC_C_LANGUAGE_STANDARD = gnu99; 202 | GCC_DYNAMIC_NO_PIC = NO; 203 | GCC_NO_COMMON_BLOCKS = YES; 204 | GCC_OPTIMIZATION_LEVEL = 0; 205 | GCC_PREPROCESSOR_DEFINITIONS = ( 206 | "DEBUG=1", 207 | "$(inherited)", 208 | ); 209 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 210 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 211 | GCC_WARN_UNDECLARED_SELECTOR = YES; 212 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 213 | GCC_WARN_UNUSED_FUNCTION = YES; 214 | GCC_WARN_UNUSED_VARIABLE = YES; 215 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 216 | MTL_ENABLE_DEBUG_INFO = YES; 217 | ONLY_ACTIVE_ARCH = YES; 218 | SDKROOT = iphoneos; 219 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 220 | TARGETED_DEVICE_FAMILY = "1,2"; 221 | VERSIONING_SYSTEM = "apple-generic"; 222 | VERSION_INFO_PREFIX = ""; 223 | }; 224 | name = Debug; 225 | }; 226 | 2242BE0B1CD0DB490072B9AA /* Release */ = { 227 | isa = XCBuildConfiguration; 228 | buildSettings = { 229 | ALWAYS_SEARCH_USER_PATHS = NO; 230 | CLANG_ANALYZER_NONNULL = YES; 231 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 232 | CLANG_CXX_LIBRARY = "libc++"; 233 | CLANG_ENABLE_MODULES = YES; 234 | CLANG_ENABLE_OBJC_ARC = YES; 235 | CLANG_WARN_BOOL_CONVERSION = YES; 236 | CLANG_WARN_CONSTANT_CONVERSION = YES; 237 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 238 | CLANG_WARN_EMPTY_BODY = YES; 239 | CLANG_WARN_ENUM_CONVERSION = YES; 240 | CLANG_WARN_INT_CONVERSION = YES; 241 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 242 | CLANG_WARN_UNREACHABLE_CODE = YES; 243 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 244 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 245 | COPY_PHASE_STRIP = NO; 246 | CURRENT_PROJECT_VERSION = 1; 247 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 248 | ENABLE_NS_ASSERTIONS = NO; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | GCC_C_LANGUAGE_STANDARD = gnu99; 251 | GCC_NO_COMMON_BLOCKS = YES; 252 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 253 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 254 | GCC_WARN_UNDECLARED_SELECTOR = YES; 255 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 256 | GCC_WARN_UNUSED_FUNCTION = YES; 257 | GCC_WARN_UNUSED_VARIABLE = YES; 258 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 259 | MTL_ENABLE_DEBUG_INFO = NO; 260 | SDKROOT = iphoneos; 261 | TARGETED_DEVICE_FAMILY = "1,2"; 262 | VALIDATE_PRODUCT = YES; 263 | VERSIONING_SYSTEM = "apple-generic"; 264 | VERSION_INFO_PREFIX = ""; 265 | }; 266 | name = Release; 267 | }; 268 | 2242BE0D1CD0DB490072B9AA /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | DEFINES_MODULE = YES; 272 | DYLIB_COMPATIBILITY_VERSION = 1; 273 | DYLIB_CURRENT_VERSION = 1; 274 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 275 | FRAMEWORK_SEARCH_PATHS = ( 276 | "$(inherited)", 277 | "$(PROJECT_DIR)/Carthage/Build/iOS", 278 | ); 279 | INFOPLIST_FILE = RxSegue/Info.plist; 280 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 281 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 282 | PRODUCT_BUNDLE_IDENTIFIER = io.github.rxswiftcommunity.RxSegue; 283 | PRODUCT_NAME = RxSegue; 284 | SKIP_INSTALL = YES; 285 | SWIFT_VERSION = 4.0; 286 | }; 287 | name = Debug; 288 | }; 289 | 2242BE0E1CD0DB490072B9AA /* Release */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | DEFINES_MODULE = YES; 293 | DYLIB_COMPATIBILITY_VERSION = 1; 294 | DYLIB_CURRENT_VERSION = 1; 295 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 296 | FRAMEWORK_SEARCH_PATHS = ( 297 | "$(inherited)", 298 | "$(PROJECT_DIR)/Carthage/Build/iOS", 299 | ); 300 | INFOPLIST_FILE = RxSegue/Info.plist; 301 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 302 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 303 | PRODUCT_BUNDLE_IDENTIFIER = io.github.rxswiftcommunity.RxSegue; 304 | PRODUCT_NAME = RxSegue; 305 | SKIP_INSTALL = YES; 306 | SWIFT_VERSION = 4.0; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | 2242BDFE1CD0DB490072B9AA /* Build configuration list for PBXProject "RxSegue" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 2242BE0A1CD0DB490072B9AA /* Debug */, 317 | 2242BE0B1CD0DB490072B9AA /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | 2242BE0C1CD0DB490072B9AA /* Build configuration list for PBXNativeTarget "RxSegue-iOS" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | 2242BE0D1CD0DB490072B9AA /* Debug */, 326 | 2242BE0E1CD0DB490072B9AA /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = 2242BDFB1CD0DB490072B9AA /* Project object */; 334 | } 335 | -------------------------------------------------------------------------------- /RxSegue.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RxSegue.xcodeproj/xcshareddata/xcschemes/RxSegue-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /RxSegue/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 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /RxSegue/RxSegue.h: -------------------------------------------------------------------------------- 1 | // 2 | // RxSegue.h 3 | // RxSegue 4 | // 5 | // Created by Sam Ritchie on 27/04/2016. 6 | // Copyright © 2016 RxSwiftCommunity. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for RxSegue. 12 | FOUNDATION_EXPORT double RxSegueVersionNumber; 13 | 14 | //! Project version string for RxSegue. 15 | FOUNDATION_EXPORT const unsigned char RxSegueVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /RxSegueExample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RxSwiftCommunity/RxSegue/c6fb2a3992d70a5da55ec61b15ee069b7e45e799/RxSegueExample.gif --------------------------------------------------------------------------------