├── CustomTransitionExample ├── CustomTransitionExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── blanchefaur.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── blanchefaur.xcuserdatad │ │ └── xcschemes │ │ ├── CustomTransitionExample.xcscheme │ │ └── xcschememanagement.plist ├── CustomTransitionExample │ ├── AnimatedTransitioning.h │ ├── AnimatedTransitioning.m │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── MainStoryboard.storyboard │ ├── CustomTransitionExample-Info.plist │ ├── CustomTransitionExample-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── MainViewController.h │ ├── MainViewController.m │ ├── SecondViewController.h │ ├── SecondViewController.m │ ├── TransitionDelegate.h │ ├── TransitionDelegate.m │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m └── CustomTransitionExampleTests │ ├── CustomTransitionExampleTests-Info.plist │ ├── CustomTransitionExampleTests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── README.md ├── Screenshots ├── screenshot1.png └── screenshot2.png └── Transition Delegate ├── AnimatedTransitioning.h ├── AnimatedTransitioning.m ├── TransitionDelegate.h └── TransitionDelegate.m /CustomTransitionExample/CustomTransitionExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 27FDFF7E1819A6500026B4A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27FDFF7D1819A6500026B4A7 /* Foundation.framework */; }; 11 | 27FDFF801819A6500026B4A7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27FDFF7F1819A6500026B4A7 /* CoreGraphics.framework */; }; 12 | 27FDFF821819A6500026B4A7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27FDFF811819A6500026B4A7 /* UIKit.framework */; }; 13 | 27FDFF881819A6500026B4A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 27FDFF861819A6500026B4A7 /* InfoPlist.strings */; }; 14 | 27FDFF8A1819A6500026B4A7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFF891819A6500026B4A7 /* main.m */; }; 15 | 27FDFF8E1819A6500026B4A7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFF8D1819A6500026B4A7 /* AppDelegate.m */; }; 16 | 27FDFF911819A6510026B4A7 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27FDFF8F1819A6510026B4A7 /* MainStoryboard.storyboard */; }; 17 | 27FDFF961819A6510026B4A7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27FDFF951819A6510026B4A7 /* Images.xcassets */; }; 18 | 27FDFF9D1819A6510026B4A7 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27FDFF9C1819A6510026B4A7 /* XCTest.framework */; }; 19 | 27FDFF9E1819A6510026B4A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27FDFF7D1819A6500026B4A7 /* Foundation.framework */; }; 20 | 27FDFF9F1819A6510026B4A7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27FDFF811819A6500026B4A7 /* UIKit.framework */; }; 21 | 27FDFFA71819A6510026B4A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 27FDFFA51819A6510026B4A7 /* InfoPlist.strings */; }; 22 | 27FDFFA91819A6510026B4A7 /* CustomTransitionExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFFA81819A6510026B4A7 /* CustomTransitionExampleTests.m */; }; 23 | 27FDFFB41819AE420026B4A7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFFB31819AE420026B4A7 /* MainViewController.m */; }; 24 | 27FDFFB71819B1D90026B4A7 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFFB61819B1D90026B4A7 /* SecondViewController.m */; }; 25 | 27FDFFBB1819B6960026B4A7 /* TransitionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFFBA1819B6960026B4A7 /* TransitionDelegate.m */; }; 26 | 27FDFFC11819B7B60026B4A7 /* AnimatedTransitioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDFFC01819B7B60026B4A7 /* AnimatedTransitioning.m */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 27FDFFA01819A6510026B4A7 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 27FDFF721819A6500026B4A7 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 27FDFF791819A6500026B4A7; 35 | remoteInfo = CustomTransitionExample; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 27FDFF7A1819A6500026B4A7 /* CustomTransitionExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CustomTransitionExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 27FDFF7D1819A6500026B4A7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42 | 27FDFF7F1819A6500026B4A7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 43 | 27FDFF811819A6500026B4A7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 44 | 27FDFF851819A6500026B4A7 /* CustomTransitionExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CustomTransitionExample-Info.plist"; sourceTree = ""; }; 45 | 27FDFF871819A6500026B4A7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 46 | 27FDFF891819A6500026B4A7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 27FDFF8B1819A6500026B4A7 /* CustomTransitionExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CustomTransitionExample-Prefix.pch"; sourceTree = ""; }; 48 | 27FDFF8C1819A6500026B4A7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 27FDFF8D1819A6500026B4A7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 27FDFF901819A6510026B4A7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 51 | 27FDFF951819A6510026B4A7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 52 | 27FDFF9B1819A6510026B4A7 /* CustomTransitionExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CustomTransitionExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 27FDFF9C1819A6510026B4A7 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 54 | 27FDFFA41819A6510026B4A7 /* CustomTransitionExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CustomTransitionExampleTests-Info.plist"; sourceTree = ""; }; 55 | 27FDFFA61819A6510026B4A7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 56 | 27FDFFA81819A6510026B4A7 /* CustomTransitionExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomTransitionExampleTests.m; sourceTree = ""; }; 57 | 27FDFFB21819AE420026B4A7 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 58 | 27FDFFB31819AE420026B4A7 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 59 | 27FDFFB51819B1D90026B4A7 /* SecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; 60 | 27FDFFB61819B1D90026B4A7 /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; 61 | 27FDFFB91819B6960026B4A7 /* TransitionDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransitionDelegate.h; sourceTree = ""; }; 62 | 27FDFFBA1819B6960026B4A7 /* TransitionDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TransitionDelegate.m; sourceTree = ""; }; 63 | 27FDFFBF1819B7B60026B4A7 /* AnimatedTransitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimatedTransitioning.h; sourceTree = ""; }; 64 | 27FDFFC01819B7B60026B4A7 /* AnimatedTransitioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnimatedTransitioning.m; sourceTree = ""; }; 65 | /* End PBXFileReference section */ 66 | 67 | /* Begin PBXFrameworksBuildPhase section */ 68 | 27FDFF771819A6500026B4A7 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | 27FDFF801819A6500026B4A7 /* CoreGraphics.framework in Frameworks */, 73 | 27FDFF821819A6500026B4A7 /* UIKit.framework in Frameworks */, 74 | 27FDFF7E1819A6500026B4A7 /* Foundation.framework in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | 27FDFF981819A6510026B4A7 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | 27FDFF9D1819A6510026B4A7 /* XCTest.framework in Frameworks */, 83 | 27FDFF9F1819A6510026B4A7 /* UIKit.framework in Frameworks */, 84 | 27FDFF9E1819A6510026B4A7 /* Foundation.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | 27FDFF711819A6500026B4A7 = { 92 | isa = PBXGroup; 93 | children = ( 94 | 27FDFF831819A6500026B4A7 /* CustomTransitionExample */, 95 | 27FDFFA21819A6510026B4A7 /* CustomTransitionExampleTests */, 96 | 27FDFF7C1819A6500026B4A7 /* Frameworks */, 97 | 27FDFF7B1819A6500026B4A7 /* Products */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | 27FDFF7B1819A6500026B4A7 /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 27FDFF7A1819A6500026B4A7 /* CustomTransitionExample.app */, 105 | 27FDFF9B1819A6510026B4A7 /* CustomTransitionExampleTests.xctest */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 27FDFF7C1819A6500026B4A7 /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 27FDFF7D1819A6500026B4A7 /* Foundation.framework */, 114 | 27FDFF7F1819A6500026B4A7 /* CoreGraphics.framework */, 115 | 27FDFF811819A6500026B4A7 /* UIKit.framework */, 116 | 27FDFF9C1819A6510026B4A7 /* XCTest.framework */, 117 | ); 118 | name = Frameworks; 119 | sourceTree = ""; 120 | }; 121 | 27FDFF831819A6500026B4A7 /* CustomTransitionExample */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 27FDFF8C1819A6500026B4A7 /* AppDelegate.h */, 125 | 27FDFF8D1819A6500026B4A7 /* AppDelegate.m */, 126 | 27FDFF8F1819A6510026B4A7 /* MainStoryboard.storyboard */, 127 | 27FDFFB21819AE420026B4A7 /* MainViewController.h */, 128 | 27FDFFB31819AE420026B4A7 /* MainViewController.m */, 129 | 27FDFFB51819B1D90026B4A7 /* SecondViewController.h */, 130 | 27FDFFB61819B1D90026B4A7 /* SecondViewController.m */, 131 | 27FDFFB81819B1F60026B4A7 /* Transition Delegate */, 132 | 27FDFF951819A6510026B4A7 /* Images.xcassets */, 133 | 27FDFF841819A6500026B4A7 /* Supporting Files */, 134 | ); 135 | path = CustomTransitionExample; 136 | sourceTree = ""; 137 | }; 138 | 27FDFF841819A6500026B4A7 /* Supporting Files */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 27FDFF851819A6500026B4A7 /* CustomTransitionExample-Info.plist */, 142 | 27FDFF861819A6500026B4A7 /* InfoPlist.strings */, 143 | 27FDFF891819A6500026B4A7 /* main.m */, 144 | 27FDFF8B1819A6500026B4A7 /* CustomTransitionExample-Prefix.pch */, 145 | ); 146 | name = "Supporting Files"; 147 | sourceTree = ""; 148 | }; 149 | 27FDFFA21819A6510026B4A7 /* CustomTransitionExampleTests */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 27FDFFA81819A6510026B4A7 /* CustomTransitionExampleTests.m */, 153 | 27FDFFA31819A6510026B4A7 /* Supporting Files */, 154 | ); 155 | path = CustomTransitionExampleTests; 156 | sourceTree = ""; 157 | }; 158 | 27FDFFA31819A6510026B4A7 /* Supporting Files */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 27FDFFA41819A6510026B4A7 /* CustomTransitionExampleTests-Info.plist */, 162 | 27FDFFA51819A6510026B4A7 /* InfoPlist.strings */, 163 | ); 164 | name = "Supporting Files"; 165 | sourceTree = ""; 166 | }; 167 | 27FDFFB81819B1F60026B4A7 /* Transition Delegate */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 27FDFFB91819B6960026B4A7 /* TransitionDelegate.h */, 171 | 27FDFFBA1819B6960026B4A7 /* TransitionDelegate.m */, 172 | 27FDFFBF1819B7B60026B4A7 /* AnimatedTransitioning.h */, 173 | 27FDFFC01819B7B60026B4A7 /* AnimatedTransitioning.m */, 174 | ); 175 | name = "Transition Delegate"; 176 | sourceTree = ""; 177 | }; 178 | /* End PBXGroup section */ 179 | 180 | /* Begin PBXNativeTarget section */ 181 | 27FDFF791819A6500026B4A7 /* CustomTransitionExample */ = { 182 | isa = PBXNativeTarget; 183 | buildConfigurationList = 27FDFFAC1819A6510026B4A7 /* Build configuration list for PBXNativeTarget "CustomTransitionExample" */; 184 | buildPhases = ( 185 | 27FDFF761819A6500026B4A7 /* Sources */, 186 | 27FDFF771819A6500026B4A7 /* Frameworks */, 187 | 27FDFF781819A6500026B4A7 /* Resources */, 188 | ); 189 | buildRules = ( 190 | ); 191 | dependencies = ( 192 | ); 193 | name = CustomTransitionExample; 194 | productName = CustomTransitionExample; 195 | productReference = 27FDFF7A1819A6500026B4A7 /* CustomTransitionExample.app */; 196 | productType = "com.apple.product-type.application"; 197 | }; 198 | 27FDFF9A1819A6510026B4A7 /* CustomTransitionExampleTests */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = 27FDFFAF1819A6510026B4A7 /* Build configuration list for PBXNativeTarget "CustomTransitionExampleTests" */; 201 | buildPhases = ( 202 | 27FDFF971819A6510026B4A7 /* Sources */, 203 | 27FDFF981819A6510026B4A7 /* Frameworks */, 204 | 27FDFF991819A6510026B4A7 /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | 27FDFFA11819A6510026B4A7 /* PBXTargetDependency */, 210 | ); 211 | name = CustomTransitionExampleTests; 212 | productName = CustomTransitionExampleTests; 213 | productReference = 27FDFF9B1819A6510026B4A7 /* CustomTransitionExampleTests.xctest */; 214 | productType = "com.apple.product-type.bundle.unit-test"; 215 | }; 216 | /* End PBXNativeTarget section */ 217 | 218 | /* Begin PBXProject section */ 219 | 27FDFF721819A6500026B4A7 /* Project object */ = { 220 | isa = PBXProject; 221 | attributes = { 222 | LastUpgradeCheck = 0500; 223 | ORGANIZATIONNAME = "Blanche Faur"; 224 | TargetAttributes = { 225 | 27FDFF9A1819A6510026B4A7 = { 226 | TestTargetID = 27FDFF791819A6500026B4A7; 227 | }; 228 | }; 229 | }; 230 | buildConfigurationList = 27FDFF751819A6500026B4A7 /* Build configuration list for PBXProject "CustomTransitionExample" */; 231 | compatibilityVersion = "Xcode 3.2"; 232 | developmentRegion = English; 233 | hasScannedForEncodings = 0; 234 | knownRegions = ( 235 | en, 236 | Base, 237 | ); 238 | mainGroup = 27FDFF711819A6500026B4A7; 239 | productRefGroup = 27FDFF7B1819A6500026B4A7 /* Products */; 240 | projectDirPath = ""; 241 | projectRoot = ""; 242 | targets = ( 243 | 27FDFF791819A6500026B4A7 /* CustomTransitionExample */, 244 | 27FDFF9A1819A6510026B4A7 /* CustomTransitionExampleTests */, 245 | ); 246 | }; 247 | /* End PBXProject section */ 248 | 249 | /* Begin PBXResourcesBuildPhase section */ 250 | 27FDFF781819A6500026B4A7 /* Resources */ = { 251 | isa = PBXResourcesBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | 27FDFF961819A6510026B4A7 /* Images.xcassets in Resources */, 255 | 27FDFF881819A6500026B4A7 /* InfoPlist.strings in Resources */, 256 | 27FDFF911819A6510026B4A7 /* MainStoryboard.storyboard in Resources */, 257 | ); 258 | runOnlyForDeploymentPostprocessing = 0; 259 | }; 260 | 27FDFF991819A6510026B4A7 /* Resources */ = { 261 | isa = PBXResourcesBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | 27FDFFA71819A6510026B4A7 /* InfoPlist.strings in Resources */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | /* End PBXResourcesBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | 27FDFF761819A6500026B4A7 /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 27FDFFB71819B1D90026B4A7 /* SecondViewController.m in Sources */, 276 | 27FDFF8E1819A6500026B4A7 /* AppDelegate.m in Sources */, 277 | 27FDFFBB1819B6960026B4A7 /* TransitionDelegate.m in Sources */, 278 | 27FDFF8A1819A6500026B4A7 /* main.m in Sources */, 279 | 27FDFFC11819B7B60026B4A7 /* AnimatedTransitioning.m in Sources */, 280 | 27FDFFB41819AE420026B4A7 /* MainViewController.m in Sources */, 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | 27FDFF971819A6510026B4A7 /* Sources */ = { 285 | isa = PBXSourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | 27FDFFA91819A6510026B4A7 /* CustomTransitionExampleTests.m in Sources */, 289 | ); 290 | runOnlyForDeploymentPostprocessing = 0; 291 | }; 292 | /* End PBXSourcesBuildPhase section */ 293 | 294 | /* Begin PBXTargetDependency section */ 295 | 27FDFFA11819A6510026B4A7 /* PBXTargetDependency */ = { 296 | isa = PBXTargetDependency; 297 | target = 27FDFF791819A6500026B4A7 /* CustomTransitionExample */; 298 | targetProxy = 27FDFFA01819A6510026B4A7 /* PBXContainerItemProxy */; 299 | }; 300 | /* End PBXTargetDependency section */ 301 | 302 | /* Begin PBXVariantGroup section */ 303 | 27FDFF861819A6500026B4A7 /* InfoPlist.strings */ = { 304 | isa = PBXVariantGroup; 305 | children = ( 306 | 27FDFF871819A6500026B4A7 /* en */, 307 | ); 308 | name = InfoPlist.strings; 309 | sourceTree = ""; 310 | }; 311 | 27FDFF8F1819A6510026B4A7 /* MainStoryboard.storyboard */ = { 312 | isa = PBXVariantGroup; 313 | children = ( 314 | 27FDFF901819A6510026B4A7 /* Base */, 315 | ); 316 | name = MainStoryboard.storyboard; 317 | sourceTree = ""; 318 | }; 319 | 27FDFFA51819A6510026B4A7 /* InfoPlist.strings */ = { 320 | isa = PBXVariantGroup; 321 | children = ( 322 | 27FDFFA61819A6510026B4A7 /* en */, 323 | ); 324 | name = InfoPlist.strings; 325 | sourceTree = ""; 326 | }; 327 | /* End PBXVariantGroup section */ 328 | 329 | /* Begin XCBuildConfiguration section */ 330 | 27FDFFAA1819A6510026B4A7 /* Debug */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 335 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 336 | CLANG_CXX_LIBRARY = "libc++"; 337 | CLANG_ENABLE_MODULES = YES; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_WARN_BOOL_CONVERSION = YES; 340 | CLANG_WARN_CONSTANT_CONVERSION = YES; 341 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 342 | CLANG_WARN_EMPTY_BODY = YES; 343 | CLANG_WARN_ENUM_CONVERSION = YES; 344 | CLANG_WARN_INT_CONVERSION = YES; 345 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | GCC_C_LANGUAGE_STANDARD = gnu99; 350 | GCC_DYNAMIC_NO_PIC = NO; 351 | GCC_OPTIMIZATION_LEVEL = 0; 352 | GCC_PREPROCESSOR_DEFINITIONS = ( 353 | "DEBUG=1", 354 | "$(inherited)", 355 | ); 356 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 357 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 358 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 359 | GCC_WARN_UNDECLARED_SELECTOR = YES; 360 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 361 | GCC_WARN_UNUSED_FUNCTION = YES; 362 | GCC_WARN_UNUSED_VARIABLE = YES; 363 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 364 | ONLY_ACTIVE_ARCH = YES; 365 | SDKROOT = iphoneos; 366 | }; 367 | name = Debug; 368 | }; 369 | 27FDFFAB1819A6510026B4A7 /* Release */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 374 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 375 | CLANG_CXX_LIBRARY = "libc++"; 376 | CLANG_ENABLE_MODULES = YES; 377 | CLANG_ENABLE_OBJC_ARC = YES; 378 | CLANG_WARN_BOOL_CONVERSION = YES; 379 | CLANG_WARN_CONSTANT_CONVERSION = YES; 380 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 381 | CLANG_WARN_EMPTY_BODY = YES; 382 | CLANG_WARN_ENUM_CONVERSION = YES; 383 | CLANG_WARN_INT_CONVERSION = YES; 384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 385 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 387 | COPY_PHASE_STRIP = YES; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | GCC_C_LANGUAGE_STANDARD = gnu99; 390 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 391 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 392 | GCC_WARN_UNDECLARED_SELECTOR = YES; 393 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 394 | GCC_WARN_UNUSED_FUNCTION = YES; 395 | GCC_WARN_UNUSED_VARIABLE = YES; 396 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 397 | SDKROOT = iphoneos; 398 | VALIDATE_PRODUCT = YES; 399 | }; 400 | name = Release; 401 | }; 402 | 27FDFFAD1819A6510026B4A7 /* Debug */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 406 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 407 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 408 | GCC_PREFIX_HEADER = "CustomTransitionExample/CustomTransitionExample-Prefix.pch"; 409 | INFOPLIST_FILE = "CustomTransitionExample/CustomTransitionExample-Info.plist"; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | WRAPPER_EXTENSION = app; 412 | }; 413 | name = Debug; 414 | }; 415 | 27FDFFAE1819A6510026B4A7 /* Release */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 419 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 420 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 421 | GCC_PREFIX_HEADER = "CustomTransitionExample/CustomTransitionExample-Prefix.pch"; 422 | INFOPLIST_FILE = "CustomTransitionExample/CustomTransitionExample-Info.plist"; 423 | PRODUCT_NAME = "$(TARGET_NAME)"; 424 | WRAPPER_EXTENSION = app; 425 | }; 426 | name = Release; 427 | }; 428 | 27FDFFB01819A6510026B4A7 /* Debug */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 432 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CustomTransitionExample.app/CustomTransitionExample"; 433 | FRAMEWORK_SEARCH_PATHS = ( 434 | "$(SDKROOT)/Developer/Library/Frameworks", 435 | "$(inherited)", 436 | "$(DEVELOPER_FRAMEWORKS_DIR)", 437 | ); 438 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 439 | GCC_PREFIX_HEADER = "CustomTransitionExample/CustomTransitionExample-Prefix.pch"; 440 | GCC_PREPROCESSOR_DEFINITIONS = ( 441 | "DEBUG=1", 442 | "$(inherited)", 443 | ); 444 | INFOPLIST_FILE = "CustomTransitionExampleTests/CustomTransitionExampleTests-Info.plist"; 445 | PRODUCT_NAME = "$(TARGET_NAME)"; 446 | TEST_HOST = "$(BUNDLE_LOADER)"; 447 | WRAPPER_EXTENSION = xctest; 448 | }; 449 | name = Debug; 450 | }; 451 | 27FDFFB11819A6510026B4A7 /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 455 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CustomTransitionExample.app/CustomTransitionExample"; 456 | FRAMEWORK_SEARCH_PATHS = ( 457 | "$(SDKROOT)/Developer/Library/Frameworks", 458 | "$(inherited)", 459 | "$(DEVELOPER_FRAMEWORKS_DIR)", 460 | ); 461 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 462 | GCC_PREFIX_HEADER = "CustomTransitionExample/CustomTransitionExample-Prefix.pch"; 463 | INFOPLIST_FILE = "CustomTransitionExampleTests/CustomTransitionExampleTests-Info.plist"; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | TEST_HOST = "$(BUNDLE_LOADER)"; 466 | WRAPPER_EXTENSION = xctest; 467 | }; 468 | name = Release; 469 | }; 470 | /* End XCBuildConfiguration section */ 471 | 472 | /* Begin XCConfigurationList section */ 473 | 27FDFF751819A6500026B4A7 /* Build configuration list for PBXProject "CustomTransitionExample" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | 27FDFFAA1819A6510026B4A7 /* Debug */, 477 | 27FDFFAB1819A6510026B4A7 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | 27FDFFAC1819A6510026B4A7 /* Build configuration list for PBXNativeTarget "CustomTransitionExample" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | 27FDFFAD1819A6510026B4A7 /* Debug */, 486 | 27FDFFAE1819A6510026B4A7 /* Release */, 487 | ); 488 | defaultConfigurationIsVisible = 0; 489 | }; 490 | 27FDFFAF1819A6510026B4A7 /* Build configuration list for PBXNativeTarget "CustomTransitionExampleTests" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | 27FDFFB01819A6510026B4A7 /* Debug */, 494 | 27FDFFB11819A6510026B4A7 /* Release */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | }; 498 | /* End XCConfigurationList section */ 499 | }; 500 | rootObject = 27FDFF721819A6500026B4A7 /* Project object */; 501 | } 502 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample.xcodeproj/project.xcworkspace/xcuserdata/blanchefaur.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hightech/iOS-7-Custom-ModalViewController-Transitions/95dc09bfe0965929d740f4da1b353dbc54fee113/CustomTransitionExample/CustomTransitionExample.xcodeproj/project.xcworkspace/xcuserdata/blanchefaur.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample.xcodeproj/xcuserdata/blanchefaur.xcuserdatad/xcschemes/CustomTransitionExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample.xcodeproj/xcuserdata/blanchefaur.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CustomTransitionExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 27FDFF791819A6500026B4A7 16 | 17 | primary 18 | 19 | 20 | 27FDFF9A1819A6510026B4A7 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/AnimatedTransitioning.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimatedTransitioning.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimatedTransitioning : NSObject 12 | 13 | @property (nonatomic, assign) BOOL isPresenting; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/AnimatedTransitioning.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimatedTransitioning.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "AnimatedTransitioning.h" 10 | #import "MainViewController.h" 11 | #import "SecondViewController.h" 12 | 13 | @implementation AnimatedTransitioning 14 | 15 | //=================================================================== 16 | // - UIViewControllerAnimatedTransitioning 17 | //=================================================================== 18 | 19 | - (NSTimeInterval)transitionDuration:(id )transitionContext { 20 | return 0.25f; 21 | } 22 | 23 | - (void)animateTransition:(id )transitionContext { 24 | 25 | UIView *inView = [transitionContext containerView]; 26 | SecondViewController *toVC = (SecondViewController *)[transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 27 | MainViewController *fromVC = (MainViewController *)[transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 28 | 29 | [inView addSubview:toVC.view]; 30 | 31 | CGRect screenRect = [[UIScreen mainScreen] bounds]; 32 | [toVC.view setFrame:CGRectMake(0, screenRect.size.height, fromVC.view.frame.size.width, fromVC.view.frame.size.height)]; 33 | 34 | [UIView animateWithDuration:0.25f 35 | animations:^{ 36 | 37 | [toVC.view setFrame:CGRectMake(0, 0, fromVC.view.frame.size.width, fromVC.view.frame.size.height)]; 38 | } 39 | completion:^(BOOL finished) { 40 | [transitionContext completeTransition:YES]; 41 | }]; 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 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 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/Base.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 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 | 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 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/CustomTransitionExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.bfaur.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/CustomTransitionExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/Images.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" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/MainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "MainViewController.h" 10 | #import "TransitionDelegate.h" 11 | 12 | @interface MainViewController () 13 | 14 | @property (nonatomic, strong) TransitionDelegate *transitionController; 15 | 16 | @end 17 | 18 | @implementation MainViewController 19 | @synthesize transitionController; 20 | 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | // Do any additional setup after loading the view. 26 | self.transitionController = [[TransitionDelegate alloc] init]; 27 | 28 | } 29 | 30 | - (IBAction)displaySecondVC:(id)sender { 31 | 32 | UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; 33 | UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"SecondViewController"]; 34 | vc.view.backgroundColor = [UIColor clearColor]; 35 | [vc setTransitioningDelegate:transitionController]; 36 | vc.modalPresentationStyle= UIModalPresentationCustom; 37 | [self presentViewController:vc animated:YES completion:nil]; 38 | 39 | } 40 | 41 | - (void)didReceiveMemoryWarning 42 | { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/SecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SecondViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/SecondViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "SecondViewController.h" 10 | 11 | @interface SecondViewController () 12 | 13 | @end 14 | 15 | @implementation SecondViewController 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view. 30 | } 31 | 32 | - (IBAction)dismissSecondVC:(id)sender { 33 | 34 | [self dismissViewControllerAnimated:YES completion:nil]; 35 | 36 | } 37 | 38 | - (void)didReceiveMemoryWarning 39 | { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/TransitionDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionDelegate.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TransitionDelegate : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/TransitionDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionDelegate.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "TransitionDelegate.h" 10 | #import "AnimatedTransitioning.h" 11 | 12 | 13 | @implementation TransitionDelegate 14 | 15 | //=================================================================== 16 | // - UIViewControllerTransitioningDelegate 17 | //=================================================================== 18 | 19 | - (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { 20 | AnimatedTransitioning *controller = [[AnimatedTransitioning alloc]init]; 21 | controller.isPresenting = YES; 22 | return controller; 23 | } 24 | 25 | - (id )animationControllerForDismissedController:(UIViewController *)dismissed { 26 | //I will fix it later. 27 | // AnimatedTransitioning *controller = [[AnimatedTransitioning alloc]init]; 28 | // controller.isPresenting = NO; 29 | // return controller; 30 | return nil; 31 | } 32 | 33 | - (id )interactionControllerForPresentation:(id )animator { 34 | return nil; 35 | } 36 | 37 | - (id )interactionControllerForDismissal:(id )animator { 38 | return nil; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExampleTests/CustomTransitionExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.bfaur.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExampleTests/CustomTransitionExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTransitionExampleTests.m 3 | // CustomTransitionExampleTests 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CustomTransitionExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CustomTransitionExampleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 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 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /CustomTransitionExample/CustomTransitionExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Blanche Faur 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iOS-7-Custom-ModalViewController-Transitions 2 | ============================================ 3 | 4 | Sample project implementing new custom ModalViewController Transitions on iOS 7. We have a UIViewController view as a subview/modal on top of another UIViewController view, such as that the subview/modal should be transparent and whatever components are added to the subview should be visible. We decided not to use a segue in our Storyboard. 5 | 6 | ![RootViewController](https://raw.github.com/hightech/iOS-7-Custom-ModalViewController-Transitions/master/Screenshots/screenshot1.png "RootViewController") 7 | ![RootViewController](https://raw.github.com/hightech/iOS-7-Custom-ModalViewController-Transitions/master/Screenshots/screenshot2.png "RootViewController") 8 | 9 | Requirements 10 | ============================================ 11 | Our sample requires iOS 7 and above. 12 | 13 | Installation 14 | ============================================ 15 | 16 | * Add `TransitionDelegate.h/m` and `AnimatedTransitioning.h/m` to your project (4 files total). Or to drag a folder called `Transition Delegate` with files inside to your project. 17 | * In your `RootViewController.m` file, include with `#import "TransitionDelegate"` and do the following to instantiate and to present a modal view controller with a **clearColor** in background. 18 | 19 | ``` 20 | #import "RootViewController.h" 21 | #import "TransitionDelegate.h" 22 | 23 | @interface RootViewController () 24 | @property (nonatomic, strong) TransitionDelegate *transitionController; 25 | @end 26 | 27 | @implementation RootViewController 28 | @synthesize transitionController; 29 | 30 | - (void)viewDidLoad 31 | { 32 | [super viewDidLoad]; 33 | // Do any additional setup after loading the view. 34 | self.transitionController = [[TransitionDelegate alloc] init]; 35 | } 36 | 37 | - (IBAction)displaySecondVC:(id)sender { 38 | UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; 39 | UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"SecondViewController"]; 40 | vc.view.backgroundColor = [UIColor clearColor]; 41 | [vc setTransitioningDelegate:transitionController]; 42 | vc.modalPresentationStyle= UIModalPresentationCustom; 43 | [self presentViewController:vc animated:YES completion:nil]; 44 | } 45 | 46 | @end 47 | ``` 48 | Usage 49 | ============================================ 50 | Check out the sample Xcode project in `CustomTransitionExample`. 51 | 52 | Recommendations 53 | ============================================ 54 | This is outlined in the ['Custom Transitions Using View Controllers'](https://developer.apple.com/wwdc/videos/?id=218) talk from WWDC 2013, which also covers how to implement your own transition delegate. 55 | 56 | Contact 57 | ============================================ 58 | [@sharpimedia](https://www.twitter.com/sharpimedia) or [@hightechartist](https://www.twitter.com/hightechartist) on Twitter 59 | 60 | License 61 | ============================================ 62 | Copyright © 2013 Blanche Faur. 63 | 64 | This code is distributed under the terms and conditions of the [MIT License](https://github.com/hightech/iOS-7-Custom-ModalViewController-Transitions/blob/master/LICENSE). 65 | 66 | -------------------------------------------------------------------------------- /Screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hightech/iOS-7-Custom-ModalViewController-Transitions/95dc09bfe0965929d740f4da1b353dbc54fee113/Screenshots/screenshot1.png -------------------------------------------------------------------------------- /Screenshots/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hightech/iOS-7-Custom-ModalViewController-Transitions/95dc09bfe0965929d740f4da1b353dbc54fee113/Screenshots/screenshot2.png -------------------------------------------------------------------------------- /Transition Delegate/AnimatedTransitioning.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimatedTransitioning.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimatedTransitioning : NSObject 12 | 13 | @property (nonatomic, assign) BOOL isPresenting; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Transition Delegate/AnimatedTransitioning.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimatedTransitioning.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "AnimatedTransitioning.h" 10 | #import "MainViewController.h" 11 | #import "SecondViewController.h" 12 | 13 | @implementation AnimatedTransitioning 14 | 15 | //=================================================================== 16 | // - UIViewControllerAnimatedTransitioning 17 | //=================================================================== 18 | 19 | - (NSTimeInterval)transitionDuration:(id )transitionContext { 20 | return 0.25f; 21 | } 22 | 23 | - (void)animateTransition:(id )transitionContext { 24 | 25 | UIView *inView = [transitionContext containerView]; 26 | SecondViewController *toVC = (SecondViewController *)[transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 27 | MainViewController *fromVC = (MainViewController *)[transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 28 | 29 | [inView addSubview:toVC.view]; 30 | 31 | CGRect screenRect = [[UIScreen mainScreen] bounds]; 32 | [toVC.view setFrame:CGRectMake(0, screenRect.size.height, fromVC.view.frame.size.width, fromVC.view.frame.size.height)]; 33 | 34 | [UIView animateWithDuration:0.25f 35 | animations:^{ 36 | 37 | [toVC.view setFrame:CGRectMake(0, 0, fromVC.view.frame.size.width, fromVC.view.frame.size.height)]; 38 | } 39 | completion:^(BOOL finished) { 40 | [transitionContext completeTransition:YES]; 41 | }]; 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Transition Delegate/TransitionDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionDelegate.h 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TransitionDelegate : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Transition Delegate/TransitionDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TransitionDelegate.m 3 | // CustomTransitionExample 4 | // 5 | // Created by Blanche Faur on 10/24/13. 6 | // Copyright (c) 2013 Blanche Faur. All rights reserved. 7 | // 8 | 9 | #import "TransitionDelegate.h" 10 | #import "AnimatedTransitioning.h" 11 | 12 | 13 | @implementation TransitionDelegate 14 | 15 | //=================================================================== 16 | // - UIViewControllerTransitioningDelegate 17 | //=================================================================== 18 | 19 | - (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { 20 | AnimatedTransitioning *controller = [[AnimatedTransitioning alloc]init]; 21 | controller.isPresenting = YES; 22 | return controller; 23 | } 24 | 25 | - (id )animationControllerForDismissedController:(UIViewController *)dismissed { 26 | //I will fix it later. 27 | // AnimatedTransitioning *controller = [[AnimatedTransitioning alloc]init]; 28 | // controller.isPresenting = NO; 29 | // return controller; 30 | return nil; 31 | } 32 | 33 | - (id )interactionControllerForPresentation:(id )animator { 34 | return nil; 35 | } 36 | 37 | - (id )interactionControllerForDismissal:(id )animator { 38 | return nil; 39 | } 40 | 41 | @end 42 | --------------------------------------------------------------------------------