├── .gitignore ├── LICENSE ├── README.md ├── Reveal.framework ├── Headers ├── Reveal └── Versions │ ├── A │ ├── Headers │ │ ├── IBARevealLoader.h │ │ ├── IBARevealLogger.h │ │ └── Reveal.h │ └── Reveal │ └── Current ├── UIViewController-Transitions-Example.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── ash.xcuserdatad │ └── xcschemes │ ├── UIViewController-Transitions-Example.xcscheme │ └── xcschememanagement.plist ├── UIViewController-Transitions-Example ├── Base.lproj │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── TLAppDelegate.h ├── TLAppDelegate.m ├── TLDetailViewController.h ├── TLDetailViewController.m ├── TLMasterViewController.h ├── TLMasterViewController.m ├── TLMenuDynamicInteractor.h ├── TLMenuDynamicInteractor.m ├── TLMenuInteractor.h ├── TLMenuInteractor.m ├── TLMenuViewController.h ├── TLMenuViewController.m ├── TLTransitionAnimator.h ├── TLTransitionAnimator.m ├── UIViewController-Transitions-Example-Info.plist ├── UIViewController-Transitions-Example-Prefix.pch ├── en.lproj │ └── InfoPlist.strings └── main.m └── UIViewController-Transitions-ExampleTests ├── UIViewController-Transitions-ExampleTests-Info.plist ├── UIViewController_Transitions_ExampleTests.m └── en.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Teehan+Lax 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UIViewController-Transitions-Example 2 | ==================================== 3 | 4 | An example of how to use the new iOS 7 APIs to create custom view controller transitions. For more details, [read the tutorial](http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/). 5 | 6 | How to Use 7 | ---------------- 8 | 9 | There are three custom transitions: 10 | 11 | - `TLTransitionAnimator` is a non-interactive transition that presents a new view controller while keeping the presenting view controller on screen (impossible in iOS 6). 12 | - `TLMenuInteractor` is an transition that shows how to use interactive and non-interactive transitions together using traditional UIKit animations. 13 | - `TLMenuDynamicInteractor` is a transition that shows how to use interactive and non-interactive transitions together using *UIKit Dynamics*. 14 | 15 | Tapping a row in the table view will present a new view controller using the `TLTransitionAnimator`. Swiping from the left edge of the screen will present an orange menu view controller. Change the `USE_UIKIT_DYNAMICS` macro in `TLMasterViewController.m` to switch between `TLMenuInteractor` and `TLMenuDynamicInteractor`. 16 | 17 | ![Faux Modal](http://f.cl.ly/items/2p2Y0n252l0c2z2b3G2D/Faux-Modal.gif) 18 | 19 | ![Menu](http://f.cl.ly/items/200T2b1O0A1D2u3k2W3h/Menu.gif) 20 | 21 | License 22 | ---------------- 23 | 24 | This software is released under the MIT license. 25 | -------------------------------------------------------------------------------- /Reveal.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Reveal.framework/Reveal: -------------------------------------------------------------------------------- 1 | Versions/Current/Reveal -------------------------------------------------------------------------------- /Reveal.framework/Versions/A/Headers/IBARevealLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013 Itty Bitty Apps. All rights reserved. 3 | 4 | #import 5 | 6 | extern NSString * const IBARevealLoaderRequestStartNotification; 7 | extern NSString * const IBARevealLoaderRequestStopNotification; 8 | 9 | extern NSString * const IBARevealLoaderSetOptionsNotification; 10 | extern NSString * const IBARevealLoaderOptionsLogLevelMaskKey; 11 | 12 | @interface IBARevealLoader : NSObject 13 | 14 | + (void)startServer; 15 | + (void)stopServer; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Reveal.framework/Versions/A/Headers/IBARevealLogger.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Itty Bitty Apps Pty Ltd. All rights reserved. 2 | // 3 | 4 | #import 5 | 6 | /*! 7 | \brief The Reveal Log level bit flags. 8 | \discussion These flags are addative. Ie, you should bitwise OR them together. 9 | 10 | \seealso IBARevealLoggerSetLevelMask 11 | \seealso IBARevealLoggerGetLevelMask 12 | 13 | Example: 14 | 15 | // Enable Error, Warning and Info logger levels. 16 | IBARevealLoggerSetLevelMask(IBARevealLogLevelError|IBARevealLogLevelWarn|IBARevealLogLevelInfo); 17 | 18 | */ 19 | typedef NS_OPTIONS(int32_t, IBARevealLogLevel) 20 | { 21 | IBARevealLogLevelNone = 0, 22 | IBARevealLogLevelDebug = (1 << 0), 23 | IBARevealLogLevelInfo = (1 << 1), 24 | IBARevealLogLevelWarn = (1 << 2), 25 | IBARevealLogLevelError = (1 << 3) 26 | }; 27 | 28 | /*! 29 | \brief Set the Reveal logger level mask. 30 | \param mask A bit mask which is a combination of the IBARevealLogLevel enum options. 31 | 32 | \discussion If you do not wish to see log messages from Reveal you should call this function with an appropriate level mask as early in your application's lifecycle as possible. For example in your application's main() function. 33 | 34 | Example: 35 | 36 | // Enable Error, Warning and Info logger levels. 37 | IBARevealLoggerSetLevelMask(IBARevealLogLevelError|IBARevealLogLevelWarn|IBARevealLogLevelInfo); 38 | 39 | */ 40 | extern void IBARevealLoggerSetLevelMask(int32_t mask); 41 | 42 | /*! 43 | \brief Get the current Reveal logger level mask. 44 | \return A bit mask representing the levels at which Reveal is currently logging. 45 | \discussion The default Reveal Logger level mask is IBARevealLogLevelError|IBARevealLogLevelWarn|IBARevealLogLevelInfo. 46 | 47 | Example: 48 | 49 | // Turn off the Info log level. 50 | IBARevealLoggerSetLevelMask(IBARevealLoggerGetLevelMask() & ~IBARevealLogLevelInfo); 51 | 52 | */ 53 | extern int32_t IBARevealLoggerGetLevelMask(void); 54 | -------------------------------------------------------------------------------- /Reveal.framework/Versions/A/Headers/Reveal.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Itty Bitty Apps Pty Ltd. All rights reserved. 2 | // 3 | 4 | #import "IBARevealLogger.h" 5 | #import "IBARevealLoader.h" -------------------------------------------------------------------------------- /Reveal.framework/Versions/A/Reveal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeehanLax/UIViewController-Transitions-Example/b70137907a1e39021b176275fa73c24b7f6788e3/Reveal.framework/Versions/A/Reveal -------------------------------------------------------------------------------- /Reveal.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /UIViewController-Transitions-Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5E6543B2179DAD4100ED0C76 /* Reveal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E6543B1179DAD4100ED0C76 /* Reveal.framework */; }; 11 | 5E6543B4179DAD6400ED0C76 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E6543B3179DAD6400ED0C76 /* CFNetwork.framework */; }; 12 | 5E6543B6179DAD6900ED0C76 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E6543B5179DAD6900ED0C76 /* QuartzCore.framework */; }; 13 | 5E6543BB179EB77000ED0C76 /* TLMenuDynamicInteractor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E6543BA179EB77000ED0C76 /* TLMenuDynamicInteractor.m */; }; 14 | 5E6752691798570100601F42 /* TLTransitionAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E6752681798570100601F42 /* TLTransitionAnimator.m */; }; 15 | 5E67527317985B6D00601F42 /* TLMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E67527217985B6D00601F42 /* TLMenuViewController.m */; }; 16 | 5E67527617985FE400601F42 /* TLMenuInteractor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E67527517985FE400601F42 /* TLMenuInteractor.m */; }; 17 | 5E8B4B6F1790454A006BFAB2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8B4B6E1790454A006BFAB2 /* Foundation.framework */; }; 18 | 5E8B4B711790454A006BFAB2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8B4B701790454A006BFAB2 /* CoreGraphics.framework */; }; 19 | 5E8B4B731790454A006BFAB2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8B4B721790454A006BFAB2 /* UIKit.framework */; }; 20 | 5E8B4B791790454A006BFAB2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5E8B4B771790454A006BFAB2 /* InfoPlist.strings */; }; 21 | 5E8B4B7B1790454A006BFAB2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E8B4B7A1790454A006BFAB2 /* main.m */; }; 22 | 5E8B4B7F1790454A006BFAB2 /* TLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E8B4B7E1790454A006BFAB2 /* TLAppDelegate.m */; }; 23 | 5E8B4B821790454A006BFAB2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E8B4B801790454A006BFAB2 /* Main.storyboard */; }; 24 | 5E8B4B851790454A006BFAB2 /* TLMasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E8B4B841790454A006BFAB2 /* TLMasterViewController.m */; }; 25 | 5E8B4B881790454A006BFAB2 /* TLDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E8B4B871790454A006BFAB2 /* TLDetailViewController.m */; }; 26 | 5E8B4B8A1790454A006BFAB2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E8B4B891790454A006BFAB2 /* Images.xcassets */; }; 27 | 5E8B4B911790454A006BFAB2 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8B4B901790454A006BFAB2 /* XCTest.framework */; }; 28 | 5E8B4B921790454A006BFAB2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8B4B6E1790454A006BFAB2 /* Foundation.framework */; }; 29 | 5E8B4B931790454A006BFAB2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8B4B721790454A006BFAB2 /* UIKit.framework */; }; 30 | 5E8B4B9B1790454A006BFAB2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5E8B4B991790454A006BFAB2 /* InfoPlist.strings */; }; 31 | 5E8B4B9D1790454A006BFAB2 /* UIViewController_Transitions_ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E8B4B9C1790454A006BFAB2 /* UIViewController_Transitions_ExampleTests.m */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXContainerItemProxy section */ 35 | 5E8B4B941790454A006BFAB2 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 5E8B4B631790454A006BFAB2 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 5E8B4B6A1790454A006BFAB2; 40 | remoteInfo = "UIViewController-Transitions-Example"; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 5E6543B1179DAD4100ED0C76 /* Reveal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Reveal.framework; sourceTree = ""; }; 46 | 5E6543B3179DAD6400ED0C76 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 47 | 5E6543B5179DAD6900ED0C76 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 48 | 5E6543B9179EB77000ED0C76 /* TLMenuDynamicInteractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLMenuDynamicInteractor.h; sourceTree = ""; }; 49 | 5E6543BA179EB77000ED0C76 /* TLMenuDynamicInteractor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLMenuDynamicInteractor.m; sourceTree = ""; }; 50 | 5E6752671798570100601F42 /* TLTransitionAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLTransitionAnimator.h; sourceTree = ""; }; 51 | 5E6752681798570100601F42 /* TLTransitionAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLTransitionAnimator.m; sourceTree = ""; }; 52 | 5E67527117985B6D00601F42 /* TLMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLMenuViewController.h; sourceTree = ""; }; 53 | 5E67527217985B6D00601F42 /* TLMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLMenuViewController.m; sourceTree = ""; }; 54 | 5E67527417985FE400601F42 /* TLMenuInteractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLMenuInteractor.h; sourceTree = ""; }; 55 | 5E67527517985FE400601F42 /* TLMenuInteractor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLMenuInteractor.m; sourceTree = ""; }; 56 | 5E8B4B6B1790454A006BFAB2 /* UIViewController-Transitions-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "UIViewController-Transitions-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 5E8B4B6E1790454A006BFAB2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 58 | 5E8B4B701790454A006BFAB2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 59 | 5E8B4B721790454A006BFAB2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 60 | 5E8B4B761790454A006BFAB2 /* UIViewController-Transitions-Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIViewController-Transitions-Example-Info.plist"; sourceTree = ""; }; 61 | 5E8B4B781790454A006BFAB2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 62 | 5E8B4B7A1790454A006BFAB2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 63 | 5E8B4B7C1790454A006BFAB2 /* UIViewController-Transitions-Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController-Transitions-Example-Prefix.pch"; sourceTree = ""; }; 64 | 5E8B4B7D1790454A006BFAB2 /* TLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLAppDelegate.h; sourceTree = ""; }; 65 | 5E8B4B7E1790454A006BFAB2 /* TLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TLAppDelegate.m; sourceTree = ""; }; 66 | 5E8B4B811790454A006BFAB2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 67 | 5E8B4B831790454A006BFAB2 /* TLMasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLMasterViewController.h; sourceTree = ""; }; 68 | 5E8B4B841790454A006BFAB2 /* TLMasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TLMasterViewController.m; sourceTree = ""; }; 69 | 5E8B4B861790454A006BFAB2 /* TLDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TLDetailViewController.h; sourceTree = ""; }; 70 | 5E8B4B871790454A006BFAB2 /* TLDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TLDetailViewController.m; sourceTree = ""; }; 71 | 5E8B4B891790454A006BFAB2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 72 | 5E8B4B8F1790454A006BFAB2 /* UIViewController-Transitions-ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UIViewController-Transitions-ExampleTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | 5E8B4B901790454A006BFAB2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 74 | 5E8B4B981790454A006BFAB2 /* UIViewController-Transitions-ExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIViewController-Transitions-ExampleTests-Info.plist"; sourceTree = ""; }; 75 | 5E8B4B9A1790454A006BFAB2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 76 | 5E8B4B9C1790454A006BFAB2 /* UIViewController_Transitions_ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIViewController_Transitions_ExampleTests.m; sourceTree = ""; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | 5E8B4B681790454A006BFAB2 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | 5E6543B6179DAD6900ED0C76 /* QuartzCore.framework in Frameworks */, 85 | 5E6543B4179DAD6400ED0C76 /* CFNetwork.framework in Frameworks */, 86 | 5E8B4B711790454A006BFAB2 /* CoreGraphics.framework in Frameworks */, 87 | 5E8B4B731790454A006BFAB2 /* UIKit.framework in Frameworks */, 88 | 5E8B4B6F1790454A006BFAB2 /* Foundation.framework in Frameworks */, 89 | 5E6543B2179DAD4100ED0C76 /* Reveal.framework in Frameworks */, 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | 5E8B4B8C1790454A006BFAB2 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | 5E8B4B911790454A006BFAB2 /* XCTest.framework in Frameworks */, 98 | 5E8B4B931790454A006BFAB2 /* UIKit.framework in Frameworks */, 99 | 5E8B4B921790454A006BFAB2 /* Foundation.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | /* End PBXFrameworksBuildPhase section */ 104 | 105 | /* Begin PBXGroup section */ 106 | 5E6543B7179DC1DB00ED0C76 /* View Controllers */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 5E8B4B831790454A006BFAB2 /* TLMasterViewController.h */, 110 | 5E8B4B841790454A006BFAB2 /* TLMasterViewController.m */, 111 | 5E8B4B861790454A006BFAB2 /* TLDetailViewController.h */, 112 | 5E8B4B871790454A006BFAB2 /* TLDetailViewController.m */, 113 | 5E67527117985B6D00601F42 /* TLMenuViewController.h */, 114 | 5E67527217985B6D00601F42 /* TLMenuViewController.m */, 115 | ); 116 | name = "View Controllers"; 117 | sourceTree = ""; 118 | }; 119 | 5E6543B8179DC1E600ED0C76 /* UIViewController Presentation Extensions */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 5E6752671798570100601F42 /* TLTransitionAnimator.h */, 123 | 5E6752681798570100601F42 /* TLTransitionAnimator.m */, 124 | 5E67527417985FE400601F42 /* TLMenuInteractor.h */, 125 | 5E67527517985FE400601F42 /* TLMenuInteractor.m */, 126 | 5E6543B9179EB77000ED0C76 /* TLMenuDynamicInteractor.h */, 127 | 5E6543BA179EB77000ED0C76 /* TLMenuDynamicInteractor.m */, 128 | ); 129 | name = "UIViewController Presentation Extensions"; 130 | sourceTree = ""; 131 | }; 132 | 5E8B4B621790454A006BFAB2 = { 133 | isa = PBXGroup; 134 | children = ( 135 | 5E8B4B741790454A006BFAB2 /* UIViewController-Transitions-Example */, 136 | 5E8B4B961790454A006BFAB2 /* UIViewController-Transitions-ExampleTests */, 137 | 5E8B4B6D1790454A006BFAB2 /* Frameworks */, 138 | 5E8B4B6C1790454A006BFAB2 /* Products */, 139 | ); 140 | sourceTree = ""; 141 | }; 142 | 5E8B4B6C1790454A006BFAB2 /* Products */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 5E8B4B6B1790454A006BFAB2 /* UIViewController-Transitions-Example.app */, 146 | 5E8B4B8F1790454A006BFAB2 /* UIViewController-Transitions-ExampleTests.xctest */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | 5E8B4B6D1790454A006BFAB2 /* Frameworks */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 5E6543B5179DAD6900ED0C76 /* QuartzCore.framework */, 155 | 5E6543B3179DAD6400ED0C76 /* CFNetwork.framework */, 156 | 5E6543B1179DAD4100ED0C76 /* Reveal.framework */, 157 | 5E8B4B6E1790454A006BFAB2 /* Foundation.framework */, 158 | 5E8B4B701790454A006BFAB2 /* CoreGraphics.framework */, 159 | 5E8B4B721790454A006BFAB2 /* UIKit.framework */, 160 | 5E8B4B901790454A006BFAB2 /* XCTest.framework */, 161 | ); 162 | name = Frameworks; 163 | sourceTree = ""; 164 | }; 165 | 5E8B4B741790454A006BFAB2 /* UIViewController-Transitions-Example */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 5E8B4B7D1790454A006BFAB2 /* TLAppDelegate.h */, 169 | 5E8B4B7E1790454A006BFAB2 /* TLAppDelegate.m */, 170 | 5E8B4B801790454A006BFAB2 /* Main.storyboard */, 171 | 5E6543B7179DC1DB00ED0C76 /* View Controllers */, 172 | 5E6543B8179DC1E600ED0C76 /* UIViewController Presentation Extensions */, 173 | 5E8B4B891790454A006BFAB2 /* Images.xcassets */, 174 | 5E8B4B751790454A006BFAB2 /* Supporting Files */, 175 | ); 176 | path = "UIViewController-Transitions-Example"; 177 | sourceTree = ""; 178 | }; 179 | 5E8B4B751790454A006BFAB2 /* Supporting Files */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 5E8B4B761790454A006BFAB2 /* UIViewController-Transitions-Example-Info.plist */, 183 | 5E8B4B771790454A006BFAB2 /* InfoPlist.strings */, 184 | 5E8B4B7A1790454A006BFAB2 /* main.m */, 185 | 5E8B4B7C1790454A006BFAB2 /* UIViewController-Transitions-Example-Prefix.pch */, 186 | ); 187 | name = "Supporting Files"; 188 | sourceTree = ""; 189 | }; 190 | 5E8B4B961790454A006BFAB2 /* UIViewController-Transitions-ExampleTests */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 5E8B4B9C1790454A006BFAB2 /* UIViewController_Transitions_ExampleTests.m */, 194 | 5E8B4B971790454A006BFAB2 /* Supporting Files */, 195 | ); 196 | path = "UIViewController-Transitions-ExampleTests"; 197 | sourceTree = ""; 198 | }; 199 | 5E8B4B971790454A006BFAB2 /* Supporting Files */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 5E8B4B981790454A006BFAB2 /* UIViewController-Transitions-ExampleTests-Info.plist */, 203 | 5E8B4B991790454A006BFAB2 /* InfoPlist.strings */, 204 | ); 205 | name = "Supporting Files"; 206 | sourceTree = ""; 207 | }; 208 | /* End PBXGroup section */ 209 | 210 | /* Begin PBXNativeTarget section */ 211 | 5E8B4B6A1790454A006BFAB2 /* UIViewController-Transitions-Example */ = { 212 | isa = PBXNativeTarget; 213 | buildConfigurationList = 5E8B4BA01790454A006BFAB2 /* Build configuration list for PBXNativeTarget "UIViewController-Transitions-Example" */; 214 | buildPhases = ( 215 | 5E8B4B671790454A006BFAB2 /* Sources */, 216 | 5E8B4B681790454A006BFAB2 /* Frameworks */, 217 | 5E8B4B691790454A006BFAB2 /* Resources */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | ); 223 | name = "UIViewController-Transitions-Example"; 224 | productName = "UIViewController-Transitions-Example"; 225 | productReference = 5E8B4B6B1790454A006BFAB2 /* UIViewController-Transitions-Example.app */; 226 | productType = "com.apple.product-type.application"; 227 | }; 228 | 5E8B4B8E1790454A006BFAB2 /* UIViewController-Transitions-ExampleTests */ = { 229 | isa = PBXNativeTarget; 230 | buildConfigurationList = 5E8B4BA31790454A006BFAB2 /* Build configuration list for PBXNativeTarget "UIViewController-Transitions-ExampleTests" */; 231 | buildPhases = ( 232 | 5E8B4B8B1790454A006BFAB2 /* Sources */, 233 | 5E8B4B8C1790454A006BFAB2 /* Frameworks */, 234 | 5E8B4B8D1790454A006BFAB2 /* Resources */, 235 | ); 236 | buildRules = ( 237 | ); 238 | dependencies = ( 239 | 5E8B4B951790454A006BFAB2 /* PBXTargetDependency */, 240 | ); 241 | name = "UIViewController-Transitions-ExampleTests"; 242 | productName = "UIViewController-Transitions-ExampleTests"; 243 | productReference = 5E8B4B8F1790454A006BFAB2 /* UIViewController-Transitions-ExampleTests.xctest */; 244 | productType = "com.apple.product-type.bundle.unit-test"; 245 | }; 246 | /* End PBXNativeTarget section */ 247 | 248 | /* Begin PBXProject section */ 249 | 5E8B4B631790454A006BFAB2 /* Project object */ = { 250 | isa = PBXProject; 251 | attributes = { 252 | CLASSPREFIX = TL; 253 | LastUpgradeCheck = 0500; 254 | ORGANIZATIONNAME = "Teehan+Lax"; 255 | TargetAttributes = { 256 | 5E8B4B8E1790454A006BFAB2 = { 257 | TestTargetID = 5E8B4B6A1790454A006BFAB2; 258 | }; 259 | }; 260 | }; 261 | buildConfigurationList = 5E8B4B661790454A006BFAB2 /* Build configuration list for PBXProject "UIViewController-Transitions-Example" */; 262 | compatibilityVersion = "Xcode 3.2"; 263 | developmentRegion = English; 264 | hasScannedForEncodings = 0; 265 | knownRegions = ( 266 | en, 267 | Base, 268 | ); 269 | mainGroup = 5E8B4B621790454A006BFAB2; 270 | productRefGroup = 5E8B4B6C1790454A006BFAB2 /* Products */; 271 | projectDirPath = ""; 272 | projectRoot = ""; 273 | targets = ( 274 | 5E8B4B6A1790454A006BFAB2 /* UIViewController-Transitions-Example */, 275 | 5E8B4B8E1790454A006BFAB2 /* UIViewController-Transitions-ExampleTests */, 276 | ); 277 | }; 278 | /* End PBXProject section */ 279 | 280 | /* Begin PBXResourcesBuildPhase section */ 281 | 5E8B4B691790454A006BFAB2 /* Resources */ = { 282 | isa = PBXResourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | 5E8B4B8A1790454A006BFAB2 /* Images.xcassets in Resources */, 286 | 5E8B4B791790454A006BFAB2 /* InfoPlist.strings in Resources */, 287 | 5E8B4B821790454A006BFAB2 /* Main.storyboard in Resources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | 5E8B4B8D1790454A006BFAB2 /* Resources */ = { 292 | isa = PBXResourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 5E8B4B9B1790454A006BFAB2 /* InfoPlist.strings in Resources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | /* End PBXResourcesBuildPhase section */ 300 | 301 | /* Begin PBXSourcesBuildPhase section */ 302 | 5E8B4B671790454A006BFAB2 /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 5E8B4B851790454A006BFAB2 /* TLMasterViewController.m in Sources */, 307 | 5E6543BB179EB77000ED0C76 /* TLMenuDynamicInteractor.m in Sources */, 308 | 5E6752691798570100601F42 /* TLTransitionAnimator.m in Sources */, 309 | 5E8B4B881790454A006BFAB2 /* TLDetailViewController.m in Sources */, 310 | 5E8B4B7F1790454A006BFAB2 /* TLAppDelegate.m in Sources */, 311 | 5E67527617985FE400601F42 /* TLMenuInteractor.m in Sources */, 312 | 5E8B4B7B1790454A006BFAB2 /* main.m in Sources */, 313 | 5E67527317985B6D00601F42 /* TLMenuViewController.m in Sources */, 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | 5E8B4B8B1790454A006BFAB2 /* Sources */ = { 318 | isa = PBXSourcesBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | 5E8B4B9D1790454A006BFAB2 /* UIViewController_Transitions_ExampleTests.m in Sources */, 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | /* End PBXSourcesBuildPhase section */ 326 | 327 | /* Begin PBXTargetDependency section */ 328 | 5E8B4B951790454A006BFAB2 /* PBXTargetDependency */ = { 329 | isa = PBXTargetDependency; 330 | target = 5E8B4B6A1790454A006BFAB2 /* UIViewController-Transitions-Example */; 331 | targetProxy = 5E8B4B941790454A006BFAB2 /* PBXContainerItemProxy */; 332 | }; 333 | /* End PBXTargetDependency section */ 334 | 335 | /* Begin PBXVariantGroup section */ 336 | 5E8B4B771790454A006BFAB2 /* InfoPlist.strings */ = { 337 | isa = PBXVariantGroup; 338 | children = ( 339 | 5E8B4B781790454A006BFAB2 /* en */, 340 | ); 341 | name = InfoPlist.strings; 342 | sourceTree = ""; 343 | }; 344 | 5E8B4B801790454A006BFAB2 /* Main.storyboard */ = { 345 | isa = PBXVariantGroup; 346 | children = ( 347 | 5E8B4B811790454A006BFAB2 /* Base */, 348 | ); 349 | name = Main.storyboard; 350 | sourceTree = ""; 351 | }; 352 | 5E8B4B991790454A006BFAB2 /* InfoPlist.strings */ = { 353 | isa = PBXVariantGroup; 354 | children = ( 355 | 5E8B4B9A1790454A006BFAB2 /* en */, 356 | ); 357 | name = InfoPlist.strings; 358 | sourceTree = ""; 359 | }; 360 | /* End PBXVariantGroup section */ 361 | 362 | /* Begin XCBuildConfiguration section */ 363 | 5E8B4B9E1790454A006BFAB2 /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 368 | CLANG_CXX_LIBRARY = "libc++"; 369 | CLANG_ENABLE_MODULES = YES; 370 | CLANG_ENABLE_OBJC_ARC = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 374 | CLANG_WARN_EMPTY_BODY = YES; 375 | CLANG_WARN_ENUM_CONVERSION = YES; 376 | CLANG_WARN_INT_CONVERSION = YES; 377 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 378 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 379 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 380 | COPY_PHASE_STRIP = NO; 381 | GCC_C_LANGUAGE_STANDARD = gnu99; 382 | GCC_DYNAMIC_NO_PIC = NO; 383 | GCC_OPTIMIZATION_LEVEL = 0; 384 | GCC_PREPROCESSOR_DEFINITIONS = ( 385 | "DEBUG=1", 386 | "$(inherited)", 387 | ); 388 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 389 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 390 | GCC_WARN_UNDECLARED_SELECTOR = YES; 391 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 392 | GCC_WARN_UNUSED_FUNCTION = YES; 393 | GCC_WARN_UNUSED_VARIABLE = YES; 394 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 395 | ONLY_ACTIVE_ARCH = YES; 396 | SDKROOT = iphoneos; 397 | }; 398 | name = Debug; 399 | }; 400 | 5E8B4B9F1790454A006BFAB2 /* Release */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | ALWAYS_SEARCH_USER_PATHS = NO; 404 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 405 | CLANG_CXX_LIBRARY = "libc++"; 406 | CLANG_ENABLE_MODULES = YES; 407 | CLANG_ENABLE_OBJC_ARC = YES; 408 | CLANG_WARN_BOOL_CONVERSION = YES; 409 | CLANG_WARN_CONSTANT_CONVERSION = YES; 410 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 411 | CLANG_WARN_EMPTY_BODY = YES; 412 | CLANG_WARN_ENUM_CONVERSION = YES; 413 | CLANG_WARN_INT_CONVERSION = YES; 414 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = YES; 418 | ENABLE_NS_ASSERTIONS = NO; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 421 | GCC_WARN_UNDECLARED_SELECTOR = YES; 422 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 423 | GCC_WARN_UNUSED_FUNCTION = YES; 424 | GCC_WARN_UNUSED_VARIABLE = YES; 425 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 426 | SDKROOT = iphoneos; 427 | VALIDATE_PRODUCT = YES; 428 | }; 429 | name = Release; 430 | }; 431 | 5E8B4BA11790454A006BFAB2 /* Debug */ = { 432 | isa = XCBuildConfiguration; 433 | buildSettings = { 434 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 435 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 436 | FRAMEWORK_SEARCH_PATHS = ( 437 | "$(inherited)", 438 | "$(SRCROOT)", 439 | ); 440 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 441 | GCC_PREFIX_HEADER = "UIViewController-Transitions-Example/UIViewController-Transitions-Example-Prefix.pch"; 442 | INFOPLIST_FILE = "UIViewController-Transitions-Example/UIViewController-Transitions-Example-Info.plist"; 443 | OTHER_LDFLAGS = "-ObjC "; 444 | PRODUCT_NAME = "$(TARGET_NAME)"; 445 | WRAPPER_EXTENSION = app; 446 | }; 447 | name = Debug; 448 | }; 449 | 5E8B4BA21790454A006BFAB2 /* Release */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 453 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 454 | FRAMEWORK_SEARCH_PATHS = ( 455 | "$(inherited)", 456 | "$(SRCROOT)", 457 | ); 458 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 459 | GCC_PREFIX_HEADER = "UIViewController-Transitions-Example/UIViewController-Transitions-Example-Prefix.pch"; 460 | INFOPLIST_FILE = "UIViewController-Transitions-Example/UIViewController-Transitions-Example-Info.plist"; 461 | OTHER_LDFLAGS = "-ObjC "; 462 | PRODUCT_NAME = "$(TARGET_NAME)"; 463 | WRAPPER_EXTENSION = app; 464 | }; 465 | name = Release; 466 | }; 467 | 5E8B4BA41790454A006BFAB2 /* Debug */ = { 468 | isa = XCBuildConfiguration; 469 | buildSettings = { 470 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIViewController-Transitions-Example.app/UIViewController-Transitions-Example"; 471 | FRAMEWORK_SEARCH_PATHS = ( 472 | "$(SDKROOT)/Developer/Library/Frameworks", 473 | "$(inherited)", 474 | "$(SYSTEM_APPS_DIR)/Xcode5-DP3.app/Contents/Developer/Library/Frameworks", 475 | ); 476 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 477 | GCC_PREFIX_HEADER = "UIViewController-Transitions-Example/UIViewController-Transitions-Example-Prefix.pch"; 478 | GCC_PREPROCESSOR_DEFINITIONS = ( 479 | "DEBUG=1", 480 | "$(inherited)", 481 | ); 482 | INFOPLIST_FILE = "UIViewController-Transitions-ExampleTests/UIViewController-Transitions-ExampleTests-Info.plist"; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | TEST_HOST = "$(BUNDLE_LOADER)"; 485 | WRAPPER_EXTENSION = xctest; 486 | }; 487 | name = Debug; 488 | }; 489 | 5E8B4BA51790454A006BFAB2 /* Release */ = { 490 | isa = XCBuildConfiguration; 491 | buildSettings = { 492 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/UIViewController-Transitions-Example.app/UIViewController-Transitions-Example"; 493 | FRAMEWORK_SEARCH_PATHS = ( 494 | "$(SDKROOT)/Developer/Library/Frameworks", 495 | "$(inherited)", 496 | "$(SYSTEM_APPS_DIR)/Xcode5-DP3.app/Contents/Developer/Library/Frameworks", 497 | ); 498 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 499 | GCC_PREFIX_HEADER = "UIViewController-Transitions-Example/UIViewController-Transitions-Example-Prefix.pch"; 500 | INFOPLIST_FILE = "UIViewController-Transitions-ExampleTests/UIViewController-Transitions-ExampleTests-Info.plist"; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | TEST_HOST = "$(BUNDLE_LOADER)"; 503 | WRAPPER_EXTENSION = xctest; 504 | }; 505 | name = Release; 506 | }; 507 | /* End XCBuildConfiguration section */ 508 | 509 | /* Begin XCConfigurationList section */ 510 | 5E8B4B661790454A006BFAB2 /* Build configuration list for PBXProject "UIViewController-Transitions-Example" */ = { 511 | isa = XCConfigurationList; 512 | buildConfigurations = ( 513 | 5E8B4B9E1790454A006BFAB2 /* Debug */, 514 | 5E8B4B9F1790454A006BFAB2 /* Release */, 515 | ); 516 | defaultConfigurationIsVisible = 0; 517 | defaultConfigurationName = Release; 518 | }; 519 | 5E8B4BA01790454A006BFAB2 /* Build configuration list for PBXNativeTarget "UIViewController-Transitions-Example" */ = { 520 | isa = XCConfigurationList; 521 | buildConfigurations = ( 522 | 5E8B4BA11790454A006BFAB2 /* Debug */, 523 | 5E8B4BA21790454A006BFAB2 /* Release */, 524 | ); 525 | defaultConfigurationIsVisible = 0; 526 | defaultConfigurationName = Release; 527 | }; 528 | 5E8B4BA31790454A006BFAB2 /* Build configuration list for PBXNativeTarget "UIViewController-Transitions-ExampleTests" */ = { 529 | isa = XCConfigurationList; 530 | buildConfigurations = ( 531 | 5E8B4BA41790454A006BFAB2 /* Debug */, 532 | 5E8B4BA51790454A006BFAB2 /* Release */, 533 | ); 534 | defaultConfigurationIsVisible = 0; 535 | defaultConfigurationName = Release; 536 | }; 537 | /* End XCConfigurationList section */ 538 | }; 539 | rootObject = 5E8B4B631790454A006BFAB2 /* Project object */; 540 | } 541 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/UIViewController-Transitions-Example.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 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example.xcodeproj/xcuserdata/ash.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIViewController-Transitions-Example.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5E8B4B6A1790454A006BFAB2 16 | 17 | primary 18 | 19 | 20 | 5E8B4B8E1790454A006BFAB2 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/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" : "60x60", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/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 | } -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLAppDelegate.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TLAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLAppDelegate.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLAppDelegate.h" 10 | 11 | @interface TLAppDelegate () 12 | 13 | @end 14 | 15 | @implementation TLAppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | UINavigationController *navigationController = (UINavigationController *)(self.window.rootViewController); 20 | navigationController.delegate = self; 21 | 22 | return YES; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLDetailViewController.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TLDetailViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLDetailViewController.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLDetailViewController.h" 10 | 11 | @interface TLDetailViewController () 12 | 13 | @end 14 | 15 | @implementation TLDetailViewController 16 | 17 | -(IBAction)doneWasPressed:(id)sender { 18 | [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMasterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLMasterViewController.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TLMasterViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMasterViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLMasterViewController.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLMasterViewController.h" 10 | #import "TLMenuViewController.h" 11 | 12 | #import "TLDetailViewController.h" 13 | 14 | #import "TLTransitionAnimator.h" 15 | #import "TLMenuInteractor.h" 16 | #import "TLMenuDynamicInteractor.h" 17 | 18 | 19 | 20 | 21 | #define USE_UIKIT_DYNAMICS NO 22 | 23 | 24 | 25 | 26 | 27 | @interface TLMasterViewController () 28 | 29 | @property (nonatomic, strong) id menuInteractor; 30 | 31 | @end 32 | 33 | @implementation TLMasterViewController 34 | 35 | - (void)awakeFromNib 36 | { 37 | [super awakeFromNib]; 38 | } 39 | 40 | - (void)viewDidLoad 41 | { 42 | [super viewDidLoad]; 43 | // Do any additional setup after loading the view, typically from a nib. 44 | 45 | if (USE_UIKIT_DYNAMICS) { 46 | self.menuInteractor = [[TLMenuDynamicInteractor alloc] initWithParentViewController:self]; 47 | } 48 | else { 49 | self.menuInteractor = [[TLMenuInteractor alloc] initWithParentViewController:self]; 50 | } 51 | 52 | UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithTitle:@"Menu" style:UIBarButtonItemStylePlain target:self.menuInteractor action:@selector(presentMenu)]; 53 | self.navigationItem.leftBarButtonItem = menuButton; 54 | 55 | UIScreenEdgePanGestureRecognizer *gestureRecognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self.menuInteractor action:@selector(userDidPan:)]; 56 | gestureRecognizer.edges = UIRectEdgeLeft; 57 | [self.view addGestureRecognizer:gestureRecognizer]; 58 | } 59 | 60 | -(void)viewDidAppear:(BOOL)animated { 61 | [super viewDidAppear:animated]; 62 | } 63 | 64 | 65 | -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 66 | [super prepareForSegue:segue sender:sender]; 67 | 68 | UIViewController *detailViewController = segue.destinationViewController; 69 | 70 | detailViewController.transitioningDelegate = self; 71 | detailViewController.modalPresentationStyle = UIModalPresentationCustom; 72 | } 73 | 74 | #pragma mark - Table View 75 | 76 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 77 | return 1; 78 | } 79 | 80 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 81 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; 82 | 83 | cell.textLabel.text = @"Present view controller"; 84 | return cell; 85 | } 86 | 87 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 88 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 89 | // Note: The Storyboard segue will take care of presenting the view controller 90 | } 91 | 92 | #pragma mark - UIViewControllerTransitioningDelegate Methods 93 | 94 | - (id)animationControllerForPresentedController:(UIViewController *)presented 95 | presentingController:(UIViewController *)presenting 96 | sourceController:(UIViewController *)source { 97 | 98 | TLTransitionAnimator *animator = [TLTransitionAnimator new]; 99 | //Configure the animator 100 | animator.presenting = YES; 101 | return animator; 102 | } 103 | 104 | - (id)animationControllerForDismissedController:(UIViewController *)dismissed { 105 | TLTransitionAnimator *animator = [TLTransitionAnimator new]; 106 | return animator; 107 | } 108 | 109 | @end 110 | 111 | 112 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMenuDynamicInteractor.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLMenuDynamicInteractor.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-23. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TLMenuViewController.h" 11 | 12 | @interface TLMenuDynamicInteractor : UIPercentDrivenInteractiveTransition 13 | 14 | -(id)initWithParentViewController:(UIViewController *)viewController; 15 | 16 | @property (nonatomic, readonly) UIViewController *parentViewController; 17 | 18 | -(void)presentMenu; // Presents the menu non-interactively 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMenuDynamicInteractor.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLMenuDynamicInteractor.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-23. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLMenuDynamicInteractor.h" 10 | 11 | @interface TLMenuDynamicInteractor () 12 | 13 | @property (nonatomic, assign, getter = isInteractive) BOOL interactive; 14 | @property (nonatomic, assign, getter = isPresenting) BOOL presenting; 15 | @property (nonatomic, assign, getter = isCompleting) BOOL completing; 16 | @property (nonatomic, assign, getter = isInteractiveTransitionInteracting) BOOL interactiveTransitionInteracting; 17 | @property (nonatomic, assign, getter = isInteractiveTransitionUnderway) BOOL interactiveTransitionUnderway; 18 | @property (nonatomic, strong) id transitionContext; 19 | 20 | @property (nonatomic, strong) UIDynamicAnimator *animator; 21 | @property (nonatomic, strong) UIAttachmentBehavior *attachmentBehaviour; 22 | @property (nonatomic, assign) CGPoint lastKnownVelocity; 23 | 24 | @end 25 | 26 | @implementation TLMenuDynamicInteractor 27 | 28 | #pragma mark - Public Methods 29 | 30 | -(id)initWithParentViewController:(UIViewController *)viewController { 31 | if (!(self = [super init])) return nil; 32 | 33 | _parentViewController = viewController; 34 | 35 | return self; 36 | } 37 | 38 | /* 39 | Note: Unlike when we connect a gesture recognizer to a view via an attachment behaviour, 40 | our recognizer is going to remain agnostic to how the view controller is presented. This 41 | implementation is identical to the TLMenuInteractor. 42 | */ 43 | -(void)userDidPan:(UIScreenEdgePanGestureRecognizer *)recognizer { 44 | CGPoint location = [recognizer locationInView:self.parentViewController.view]; 45 | CGPoint velocity = [recognizer velocityInView:self.parentViewController.view]; 46 | 47 | self.lastKnownVelocity = velocity; 48 | 49 | // Note: Only one presentation may occur at a time, as per usual 50 | 51 | if (recognizer.state == UIGestureRecognizerStateBegan) { 52 | // We *must* check if we already have an interactive transition underway 53 | 54 | // TODO: Still need this? 55 | if (self.interactiveTransitionUnderway == NO) { 56 | // We're being invoked via a gesture recognizer – we are necessarily interactive 57 | self.interactive = YES; 58 | 59 | // The side of the screen we're panning from determines whether this is a presentation (left) or dismissal (right) 60 | if (location.x < CGRectGetMidX(recognizer.view.bounds)) { 61 | self.presenting = YES; 62 | TLMenuViewController *viewController = [[TLMenuViewController alloc] initWithPanTarget:self]; 63 | viewController.modalPresentationStyle = UIModalPresentationCustom; 64 | viewController.transitioningDelegate = self; 65 | [self.parentViewController presentViewController:viewController animated:YES completion:nil]; 66 | } 67 | else { 68 | [self.parentViewController dismissViewControllerAnimated:YES completion:nil]; 69 | } 70 | } 71 | } 72 | else if (recognizer.state == UIGestureRecognizerStateChanged) { 73 | // Determine our ratio between the left edge and the right edge. This means our dismissal will go from 1...0. 74 | CGFloat ratio = location.x / CGRectGetWidth(self.parentViewController.view.bounds); 75 | [self updateInteractiveTransition:ratio]; 76 | } 77 | else if (recognizer.state == UIGestureRecognizerStateEnded) { 78 | // Depending on our state and the velocity, determine whether to cancel or complete the transition. 79 | 80 | if (self.interactiveTransitionInteracting) { 81 | if (self.presenting) { 82 | if (velocity.x > 0) { 83 | [self finishInteractiveTransition]; 84 | } 85 | else { 86 | [self cancelInteractiveTransition]; 87 | } 88 | } 89 | else { 90 | if (velocity.x < 0) { 91 | [self finishInteractiveTransition]; 92 | } 93 | else { 94 | [self cancelInteractiveTransition]; 95 | } 96 | } 97 | } 98 | } 99 | } 100 | 101 | -(void)presentMenu { 102 | self.presenting = YES; 103 | 104 | TLMenuViewController *viewController = [[TLMenuViewController alloc] initWithPanTarget:self]; 105 | viewController.modalPresentationStyle = UIModalPresentationCustom; 106 | viewController.transitioningDelegate = self; 107 | 108 | [self.parentViewController presentViewController:viewController animated:YES completion:nil]; 109 | } 110 | 111 | #pragma mark - Private Methods 112 | 113 | -(void)ensureSimulationCompletesWithDesiredEndFrame:(CGRect)endFrame { 114 | // Take a "snapshot" of the transitionContext when this method is first invoked. We'll compare it to self.transitionContext 115 | // When the dispatch_after block is invoked. 116 | id transitionContext = self.transitionContext; 117 | 118 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 119 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 120 | 121 | // We need to *guarantee* that our transition completes at some point. 122 | double delayInSeconds = [self transitionDuration:self.transitionContext]; 123 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 124 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 125 | // If we still have an animator, we're still animating, so we need to complete our transition immediately. 126 | id blockContext = self.transitionContext; 127 | UIDynamicAnimator *blockAnimator = self.animator; 128 | 129 | if (blockAnimator && blockContext == transitionContext) { 130 | BOOL presenting = self.presenting; 131 | 132 | [transitionContext completeTransition:YES]; 133 | 134 | if (presenting) { 135 | toViewController.view.frame = endFrame; 136 | } 137 | else { 138 | fromViewController.view.frame = endFrame; 139 | } 140 | } 141 | }); 142 | } 143 | 144 | #pragma mark - UIViewControllerTransitioningDelegate Methods 145 | 146 | - (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { 147 | return self; 148 | } 149 | 150 | - (id )animationControllerForDismissedController:(UIViewController *)dismissed { 151 | return self; 152 | } 153 | 154 | - (id )interactionControllerForPresentation:(id )animator { 155 | // Return nil if we are not interactive 156 | if (self.interactive) { 157 | return self; 158 | } 159 | 160 | return nil; 161 | } 162 | 163 | - (id )interactionControllerForDismissal:(id )animator { 164 | // Return nil if we are not interactive 165 | if (self.interactive) { 166 | return self; 167 | } 168 | 169 | return nil; 170 | } 171 | 172 | #pragma mark - UIViewControllerAnimatedTransitioning Methods 173 | 174 | - (void)animationEnded:(BOOL)transitionCompleted { 175 | 176 | id transitionContext = self.transitionContext; 177 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 178 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 179 | 180 | fromViewController.view.userInteractionEnabled = YES; 181 | toViewController.view.userInteractionEnabled = YES; 182 | 183 | // Reset to our default state 184 | self.interactive = NO; 185 | self.presenting = NO; 186 | self.transitionContext = nil; 187 | self.completing = NO; 188 | self.interactiveTransitionInteracting = NO; 189 | self.interactiveTransitionUnderway = NO; 190 | 191 | [self.animator removeAllBehaviors], self.animator.delegate = nil, self.animator = nil; 192 | } 193 | 194 | - (NSTimeInterval)transitionDuration:(id )transitionContext { 195 | // Instead of using this to animate a transition, we'll use it as an upper-bounds to the UIKit Dynamics simulation elapsedTime. 196 | // We'll use 2 seconds. 197 | return 2.0f; 198 | } 199 | 200 | - (void)animateTransition:(id )transitionContext { 201 | self.transitionContext = transitionContext; 202 | 203 | if (self.interactive) { 204 | // nop as per documentation 205 | } 206 | else { 207 | // Guaranteed to complete since this is a non-interactive transition 208 | self.completing = YES; 209 | 210 | // This code is lifted wholesale from the TLTransitionAnimator class 211 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 212 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 213 | 214 | CGRect startFrame = [[transitionContext containerView] bounds]; 215 | CGRect endFrame = [[transitionContext containerView] bounds]; 216 | 217 | self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:transitionContext.containerView]; 218 | self.animator.delegate = self; 219 | 220 | if (self.presenting) { 221 | // The order of these matters – determines the view hierarchy order. 222 | [transitionContext.containerView addSubview:fromViewController.view]; 223 | [transitionContext.containerView addSubview:toViewController.view]; 224 | 225 | startFrame.origin.x -= CGRectGetWidth([[transitionContext containerView] bounds]); 226 | 227 | toViewController.view.frame = startFrame; 228 | 229 | UICollisionBehavior *collisionBehaviour = [[UICollisionBehavior alloc] initWithItems:@[toViewController.view]]; 230 | [collisionBehaviour setTranslatesReferenceBoundsIntoBoundaryWithInsets:UIEdgeInsetsMake(0, -CGRectGetWidth(transitionContext.containerView.bounds), 0, 0)]; 231 | 232 | UIGravityBehavior *gravityBehaviour = [[UIGravityBehavior alloc] initWithItems:@[toViewController.view]]; 233 | gravityBehaviour.gravityDirection = CGVectorMake(5.0f, 0.0f); 234 | 235 | UIDynamicItemBehavior *itemBehaviour = [[UIDynamicItemBehavior alloc] initWithItems:@[toViewController.view]]; 236 | itemBehaviour.elasticity = 0.5f; 237 | 238 | [self.animator addBehavior:collisionBehaviour]; 239 | [self.animator addBehavior:gravityBehaviour]; 240 | [self.animator addBehavior:itemBehaviour]; 241 | } 242 | else { 243 | [transitionContext.containerView addSubview:toViewController.view]; 244 | [transitionContext.containerView addSubview:fromViewController.view]; 245 | 246 | endFrame.origin.x -= CGRectGetWidth(self.transitionContext.containerView.bounds); 247 | 248 | fromViewController.view.frame = startFrame; 249 | 250 | UICollisionBehavior *collisionBehaviour = [[UICollisionBehavior alloc] initWithItems:@[fromViewController.view]]; 251 | [collisionBehaviour setTranslatesReferenceBoundsIntoBoundaryWithInsets:UIEdgeInsetsMake(0, -CGRectGetWidth(transitionContext.containerView.bounds), 0, 0)]; 252 | 253 | UIGravityBehavior *gravityBehaviour = [[UIGravityBehavior alloc] initWithItems:@[fromViewController.view]]; 254 | gravityBehaviour.gravityDirection = CGVectorMake(-5.0f, 0.0f); 255 | 256 | UIDynamicItemBehavior *itemBehaviour = [[UIDynamicItemBehavior alloc] initWithItems:@[fromViewController.view]]; 257 | itemBehaviour.elasticity = 0.5f; 258 | 259 | [self.animator addBehavior:collisionBehaviour]; 260 | [self.animator addBehavior:gravityBehaviour]; 261 | [self.animator addBehavior:itemBehaviour]; 262 | } 263 | 264 | [self ensureSimulationCompletesWithDesiredEndFrame:endFrame]; 265 | } 266 | } 267 | 268 | #pragma mark - UIViewControllerInteractiveTransitioning Methods 269 | 270 | -(void)startInteractiveTransition:(id)transitionContext { 271 | NSAssert(self.animator == nil, @"Duplicating animators – likely two presentations running concurrently."); 272 | 273 | self.transitionContext = transitionContext; 274 | self.interactiveTransitionInteracting = YES; 275 | self.interactiveTransitionUnderway = YES; 276 | 277 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 278 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 279 | 280 | fromViewController.view.userInteractionEnabled = NO; 281 | 282 | CGRect frame = [[transitionContext containerView] bounds]; 283 | 284 | if (self.presenting) 285 | { 286 | // The order of these matters – determines the view hierarchy order. 287 | [transitionContext.containerView addSubview:fromViewController.view]; 288 | [transitionContext.containerView addSubview:toViewController.view]; 289 | 290 | frame.origin.x -= CGRectGetWidth([[transitionContext containerView] bounds]); 291 | } 292 | else { 293 | [transitionContext.containerView addSubview:toViewController.view]; 294 | [transitionContext.containerView addSubview:fromViewController.view]; 295 | } 296 | 297 | toViewController.view.frame = frame; 298 | 299 | self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:transitionContext.containerView]; 300 | self.animator.delegate = self; 301 | 302 | id dynamicItem; 303 | 304 | if (self.presenting) { 305 | dynamicItem = toViewController.view; 306 | self.attachmentBehaviour = [[UIAttachmentBehavior alloc] initWithItem:dynamicItem attachedToAnchor:CGPointMake(0.0f, CGRectGetMidY(transitionContext.containerView.bounds))]; 307 | } 308 | else { 309 | dynamicItem = fromViewController.view; 310 | self.attachmentBehaviour = [[UIAttachmentBehavior alloc] initWithItem:dynamicItem attachedToAnchor:CGPointMake(CGRectGetWidth(transitionContext.containerView.bounds), CGRectGetMidY(transitionContext.containerView.bounds))]; 311 | } 312 | 313 | UICollisionBehavior *collisionBehaviour = [[UICollisionBehavior alloc] initWithItems:@[dynamicItem]]; 314 | [collisionBehaviour setTranslatesReferenceBoundsIntoBoundaryWithInsets:UIEdgeInsetsMake(0, -CGRectGetWidth(transitionContext.containerView.bounds), 0, 0)]; 315 | 316 | UIDynamicItemBehavior *itemBehaviour = [[UIDynamicItemBehavior alloc] initWithItems:@[dynamicItem]]; 317 | itemBehaviour.elasticity = 0.5f; 318 | 319 | [self.animator addBehavior:collisionBehaviour]; 320 | [self.animator addBehavior:itemBehaviour]; 321 | [self.animator addBehavior:self.attachmentBehaviour]; 322 | } 323 | 324 | #pragma mark - UIPercentDrivenInteractiveTransition Overridden Methods 325 | 326 | - (void)updateInteractiveTransition:(CGFloat)percentComplete { 327 | self.attachmentBehaviour.anchorPoint = CGPointMake(CGRectGetWidth(self.transitionContext.containerView.bounds) * percentComplete, CGRectGetMidY(self.transitionContext.containerView.bounds)); 328 | } 329 | 330 | - (void)finishInteractiveTransition { 331 | self.interactiveTransitionInteracting = NO; 332 | self.completing = YES; 333 | id transitionContext = self.transitionContext; 334 | 335 | [self.animator removeBehavior:self.attachmentBehaviour]; 336 | 337 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 338 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 339 | 340 | CGRect endFrame = transitionContext.containerView.bounds; 341 | 342 | id dynamicItem; 343 | CGFloat gravityXComponent = 0.0f; 344 | 345 | if (self.presenting) 346 | { 347 | dynamicItem = toViewController.view; 348 | gravityXComponent = 5.0f; 349 | } 350 | else { 351 | dynamicItem = fromViewController.view; 352 | gravityXComponent = -5.0f; 353 | 354 | endFrame.origin.x -= CGRectGetWidth(endFrame); 355 | } 356 | 357 | UIGravityBehavior *gravityBehaviour = [[UIGravityBehavior alloc] initWithItems:@[dynamicItem]]; 358 | gravityBehaviour.gravityDirection = CGVectorMake(gravityXComponent, 0.0f); 359 | 360 | UIPushBehavior *pushBehaviour = [[UIPushBehavior alloc] initWithItems:@[dynamicItem] mode:UIPushBehaviorModeInstantaneous]; 361 | pushBehaviour.pushDirection = CGVectorMake(self.lastKnownVelocity.x / 10.0f, 0.0f); 362 | 363 | [self.animator addBehavior:gravityBehaviour]; 364 | [self.animator addBehavior:pushBehaviour]; 365 | 366 | [self ensureSimulationCompletesWithDesiredEndFrame:endFrame]; 367 | } 368 | 369 | - (void)cancelInteractiveTransition { 370 | self.interactiveTransitionInteracting = NO; 371 | id transitionContext = self.transitionContext; 372 | 373 | [self.animator removeBehavior:self.attachmentBehaviour]; 374 | 375 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 376 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 377 | 378 | CGRect endFrame = transitionContext.containerView.bounds; 379 | 380 | id dynamicItem; 381 | CGFloat gravityXComponent = 0.0f; 382 | 383 | if (self.presenting) 384 | { 385 | dynamicItem = toViewController.view; 386 | gravityXComponent = -5.0f; 387 | 388 | endFrame.origin.x -= CGRectGetWidth(endFrame); 389 | } 390 | else { 391 | dynamicItem = fromViewController.view; 392 | gravityXComponent = 5.0f; 393 | } 394 | 395 | UIGravityBehavior *gravityBehaviour = [[UIGravityBehavior alloc] initWithItems:@[dynamicItem]]; 396 | gravityBehaviour.gravityDirection = CGVectorMake(gravityXComponent, 0.0f); 397 | 398 | UIPushBehavior *pushBehaviour = [[UIPushBehavior alloc] initWithItems:@[dynamicItem] mode:UIPushBehaviorModeInstantaneous]; 399 | pushBehaviour.pushDirection = CGVectorMake(self.lastKnownVelocity.x / 10.0f, 0.0f); 400 | 401 | [self.animator addBehavior:gravityBehaviour]; 402 | [self.animator addBehavior:pushBehaviour]; 403 | 404 | [self ensureSimulationCompletesWithDesiredEndFrame:endFrame]; 405 | } 406 | 407 | #pragma mark - UIDynamicAnimatorDelegate Methods 408 | 409 | - (void)dynamicAnimatorDidPause:(UIDynamicAnimator*)animator { 410 | // We need this check to determine if the user is still interacting with the transition (ie: they stopped moving their finger) 411 | if (!self.interactiveTransitionInteracting) { 412 | [self.transitionContext completeTransition:self.completing]; 413 | } 414 | } 415 | 416 | @end 417 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMenuInteractor.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLMenuInteractor.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-18. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TLMenuViewController.h" 11 | 12 | @interface TLMenuInteractor : UIPercentDrivenInteractiveTransition 13 | 14 | -(id)initWithParentViewController:(UIViewController *)viewController; 15 | 16 | @property (nonatomic, readonly) UIViewController *parentViewController; 17 | 18 | -(void)presentMenu; // Presents the menu non-interactively 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMenuInteractor.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLMenuInteractor.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-18. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLMenuInteractor.h" 10 | 11 | @interface TLMenuInteractor () 12 | 13 | @property (nonatomic, assign, getter = isInteractive) BOOL interactive; 14 | @property (nonatomic, assign, getter = isPresenting) BOOL presenting; 15 | @property (nonatomic, strong) id transitionContext; 16 | 17 | @end 18 | 19 | @implementation TLMenuInteractor 20 | 21 | #pragma mark - Public Methods 22 | 23 | -(id)initWithParentViewController:(UIViewController *)viewController { 24 | if (!(self = [super init])) return nil; 25 | 26 | _parentViewController = viewController; 27 | 28 | return self; 29 | } 30 | 31 | -(void)userDidPan:(UIScreenEdgePanGestureRecognizer *)recognizer { 32 | CGPoint location = [recognizer locationInView:self.parentViewController.view]; 33 | CGPoint velocity = [recognizer velocityInView:self.parentViewController.view]; 34 | 35 | // Note: Only one presentation may occur at a time, as per usual 36 | 37 | if (recognizer.state == UIGestureRecognizerStateBegan) { 38 | // We're being invoked via a gesture recognizer – we are necessarily interactive 39 | self.interactive = YES; 40 | 41 | // The side of the screen we're panning from determines whether this is a presentation (left) or dismissal (right) 42 | if (location.x < CGRectGetMidX(recognizer.view.bounds)) { 43 | self.presenting = YES; 44 | TLMenuViewController *viewController = [[TLMenuViewController alloc] initWithPanTarget:self]; 45 | viewController.modalPresentationStyle = UIModalPresentationCustom; 46 | viewController.transitioningDelegate = self; 47 | [self.parentViewController presentViewController:viewController animated:YES completion:nil]; 48 | } 49 | else { 50 | [self.parentViewController dismissViewControllerAnimated:YES completion:nil]; 51 | } 52 | } 53 | else if (recognizer.state == UIGestureRecognizerStateChanged) { 54 | // Determine our ratio between the left edge and the right edge. This means our dismissal will go from 1...0. 55 | CGFloat ratio = location.x / CGRectGetWidth(self.parentViewController.view.bounds); 56 | [self updateInteractiveTransition:ratio]; 57 | } 58 | else if (recognizer.state == UIGestureRecognizerStateEnded) { 59 | // Depending on our state and the velocity, determine whether to cancel or complete the transition. 60 | if (self.presenting) { 61 | if (velocity.x > 0) { 62 | [self finishInteractiveTransition]; 63 | } 64 | else { 65 | [self cancelInteractiveTransition]; 66 | } 67 | } 68 | else { 69 | if (velocity.x < 0) { 70 | [self finishInteractiveTransition]; 71 | } 72 | else { 73 | [self cancelInteractiveTransition]; 74 | } 75 | } 76 | } 77 | } 78 | 79 | -(void)presentMenu { 80 | self.presenting = YES; 81 | 82 | TLMenuViewController *viewController = [[TLMenuViewController alloc] initWithPanTarget:self]; 83 | viewController.modalPresentationStyle = UIModalPresentationCustom; 84 | viewController.transitioningDelegate = self; 85 | [self.parentViewController presentViewController:viewController animated:YES completion:nil]; 86 | } 87 | 88 | #pragma mark - UIViewControllerTransitioningDelegate Methods 89 | 90 | - (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { 91 | return self; 92 | } 93 | 94 | - (id )animationControllerForDismissedController:(UIViewController *)dismissed { 95 | return self; 96 | } 97 | 98 | - (id )interactionControllerForPresentation:(id )animator { 99 | // Return nil if we are not interactive 100 | if (self.interactive) { 101 | return self; 102 | } 103 | 104 | return nil; 105 | } 106 | 107 | - (id )interactionControllerForDismissal:(id )animator { 108 | // Return nil if we are not interactive 109 | if (self.interactive) { 110 | return self; 111 | } 112 | 113 | return nil; 114 | } 115 | 116 | #pragma mark - UIViewControllerAnimatedTransitioning Methods 117 | 118 | - (void)animationEnded:(BOOL)transitionCompleted { 119 | // Reset to our default state 120 | self.interactive = NO; 121 | self.presenting = NO; 122 | self.transitionContext = nil; 123 | } 124 | 125 | - (NSTimeInterval)transitionDuration:(id )transitionContext { 126 | // Used only in non-interactive transitions, despite the documentation 127 | return 0.3f; 128 | } 129 | 130 | - (void)animateTransition:(id )transitionContext { 131 | if (self.interactive) { 132 | // nop as per documentation 133 | } 134 | else { 135 | // This code is lifted wholesale from the TLTransitionAnimator class 136 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 137 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 138 | 139 | CGRect endFrame = [[transitionContext containerView] bounds]; 140 | 141 | if (self.presenting) { 142 | // The order of these matters – determines the view hierarchy order. 143 | [transitionContext.containerView addSubview:fromViewController.view]; 144 | [transitionContext.containerView addSubview:toViewController.view]; 145 | 146 | CGRect startFrame = endFrame; 147 | startFrame.origin.x -= CGRectGetWidth([[transitionContext containerView] bounds]); 148 | 149 | toViewController.view.frame = startFrame; 150 | 151 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 152 | toViewController.view.frame = endFrame; 153 | } completion:^(BOOL finished) { 154 | [transitionContext completeTransition:YES]; 155 | }]; 156 | } 157 | else { 158 | [transitionContext.containerView addSubview:toViewController.view]; 159 | [transitionContext.containerView addSubview:fromViewController.view]; 160 | 161 | endFrame.origin.x -= CGRectGetWidth([[transitionContext containerView] bounds]); 162 | 163 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 164 | fromViewController.view.frame = endFrame; 165 | } completion:^(BOOL finished) { 166 | [transitionContext completeTransition:YES]; 167 | }]; 168 | } 169 | } 170 | } 171 | 172 | #pragma mark - UIViewControllerInteractiveTransitioning Methods 173 | 174 | -(void)startInteractiveTransition:(id)transitionContext { 175 | self.transitionContext = transitionContext; 176 | 177 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 178 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 179 | 180 | CGRect endFrame = [[transitionContext containerView] bounds]; 181 | 182 | if (self.presenting) 183 | { 184 | // The order of these matters – determines the view hierarchy order. 185 | [transitionContext.containerView addSubview:fromViewController.view]; 186 | [transitionContext.containerView addSubview:toViewController.view]; 187 | 188 | endFrame.origin.x -= CGRectGetWidth([[transitionContext containerView] bounds]); 189 | } 190 | else { 191 | [transitionContext.containerView addSubview:toViewController.view]; 192 | [transitionContext.containerView addSubview:fromViewController.view]; 193 | } 194 | 195 | toViewController.view.frame = endFrame; 196 | 197 | } 198 | 199 | #pragma mark - UIPercentDrivenInteractiveTransition Overridden Methods 200 | 201 | - (void)updateInteractiveTransition:(CGFloat)percentComplete { 202 | id transitionContext = self.transitionContext; 203 | 204 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 205 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 206 | 207 | // Presenting goes from 0...1 and dismissing goes from 1...0 208 | CGRect frame = CGRectOffset([[transitionContext containerView] bounds], -CGRectGetWidth([[transitionContext containerView] bounds]) * (1.0f - percentComplete), 0); 209 | 210 | if (self.presenting) 211 | { 212 | toViewController.view.frame = frame; 213 | } 214 | else { 215 | fromViewController.view.frame = frame; 216 | } 217 | } 218 | 219 | - (void)finishInteractiveTransition { 220 | id transitionContext = self.transitionContext; 221 | 222 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 223 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 224 | 225 | if (self.presenting) 226 | { 227 | CGRect endFrame = [[transitionContext containerView] bounds]; 228 | 229 | [UIView animateWithDuration:0.5f animations:^{ 230 | toViewController.view.frame = endFrame; 231 | } completion:^(BOOL finished) { 232 | [transitionContext completeTransition:YES]; 233 | }]; 234 | } 235 | else { 236 | CGRect endFrame = CGRectOffset([[transitionContext containerView] bounds], -CGRectGetWidth([[self.transitionContext containerView] bounds]), 0); 237 | 238 | [UIView animateWithDuration:0.5f animations:^{ 239 | fromViewController.view.frame = endFrame; 240 | } completion:^(BOOL finished) { 241 | [transitionContext completeTransition:YES]; 242 | }]; 243 | } 244 | 245 | } 246 | 247 | - (void)cancelInteractiveTransition { 248 | id transitionContext = self.transitionContext; 249 | 250 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 251 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 252 | 253 | if (self.presenting) 254 | { 255 | CGRect endFrame = CGRectOffset([[transitionContext containerView] bounds], -CGRectGetWidth([[transitionContext containerView] bounds]), 0); 256 | 257 | [UIView animateWithDuration:0.5f animations:^{ 258 | toViewController.view.frame = endFrame; 259 | } completion:^(BOOL finished) { 260 | [transitionContext completeTransition:NO]; 261 | }]; 262 | } 263 | else { 264 | CGRect endFrame = [[transitionContext containerView] bounds]; 265 | 266 | [UIView animateWithDuration:0.5f animations:^{ 267 | fromViewController.view.frame = endFrame; 268 | } completion:^(BOOL finished) { 269 | [transitionContext completeTransition:NO]; 270 | }]; 271 | } 272 | } 273 | 274 | @end 275 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLMenuViewController.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-18. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TLMenuViewController; 12 | 13 | // This protocol is only to silence the compiler since we're using one of two different classes. 14 | @protocol TLMenuViewControllerPanTarget 15 | 16 | -(void)userDidPan:(UIScreenEdgePanGestureRecognizer *)gestureRecognizer; 17 | 18 | @end 19 | 20 | @interface TLMenuViewController : UIViewController 21 | 22 | -(id)initWithPanTarget:(id)panTarget; 23 | 24 | @property (nonatomic, readonly) id panTarget; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLMenuViewController.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-18. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLMenuViewController.h" 10 | 11 | #import "TLMenuInteractor.h" 12 | 13 | @interface TLMenuViewController () 14 | 15 | @end 16 | 17 | @implementation TLMenuViewController 18 | 19 | -(id)initWithPanTarget:(id)panTarget 20 | { 21 | self = [super initWithNibName:nil bundle:nil]; 22 | if (self) { 23 | _panTarget = panTarget; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)viewDidLoad 29 | { 30 | [super viewDidLoad]; 31 | // Do any additional setup after loading the view. 32 | 33 | // Just to differentiate use visually 34 | self.view.backgroundColor = [UIColor orangeColor]; 35 | 36 | // Set up our done button 37 | UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeSystem]; 38 | [doneButton setTitle:@"Dismiss" forState:UIControlStateNormal]; 39 | [doneButton addTarget:self action:@selector(doneWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 40 | doneButton.frame = CGRectMake(0, 0, 100, 44); 41 | doneButton.center = self.view.center; 42 | [self.view addSubview:doneButton]; 43 | 44 | UIScreenEdgePanGestureRecognizer *gestureRecognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self.panTarget action:@selector(userDidPan:)]; 45 | gestureRecognizer.edges = UIRectEdgeRight; 46 | [self.view addGestureRecognizer:gestureRecognizer]; 47 | } 48 | 49 | -(void)doneWasPressed:(id)sender { 50 | [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; 51 | } 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLTransitionAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // TLTransitionAnimator.h 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-18. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TLTransitionAnimator : NSObject 12 | 13 | @property (nonatomic, assign, getter = isPresenting) BOOL presenting; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/TLTransitionAnimator.m: -------------------------------------------------------------------------------- 1 | // 2 | // TLTransitionAnimator.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-18. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import "TLTransitionAnimator.h" 10 | 11 | @implementation TLTransitionAnimator 12 | 13 | - (NSTimeInterval)transitionDuration:(id )transitionContext { 14 | return 0.5f; 15 | } 16 | 17 | - (void)animateTransition:(id )transitionContext { 18 | // Grab the from and to view controllers from the context 19 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 20 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 21 | 22 | // Set our ending frame. We'll modify this later if we have to 23 | CGRect endFrame = CGRectMake(80, 280, 160, 100); 24 | 25 | if (self.presenting) { 26 | fromViewController.view.userInteractionEnabled = NO; 27 | 28 | [transitionContext.containerView addSubview:fromViewController.view]; 29 | [transitionContext.containerView addSubview:toViewController.view]; 30 | 31 | CGRect startFrame = endFrame; 32 | startFrame.origin.x += 320; 33 | 34 | toViewController.view.frame = startFrame; 35 | 36 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 37 | fromViewController.view.tintAdjustmentMode = UIViewTintAdjustmentModeDimmed; 38 | toViewController.view.frame = endFrame; 39 | } completion:^(BOOL finished) { 40 | [transitionContext completeTransition:YES]; 41 | }]; 42 | } 43 | else { 44 | toViewController.view.userInteractionEnabled = YES; 45 | 46 | [transitionContext.containerView addSubview:toViewController.view]; 47 | [transitionContext.containerView addSubview:fromViewController.view]; 48 | 49 | endFrame.origin.x += 320; 50 | 51 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 52 | toViewController.view.tintAdjustmentMode = UIViewTintAdjustmentModeAutomatic; 53 | fromViewController.view.frame = endFrame; 54 | } completion:^(BOOL finished) { 55 | [transitionContext completeTransition:YES]; 56 | }]; 57 | } 58 | } 59 | 60 | @end -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/UIViewController-Transitions-Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.teehanlax.${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 | UIApplicationIsOpaque 28 | 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UIStatusBarTintParameters 36 | 37 | UINavigationBar 38 | 39 | Style 40 | UIBarStyleDefault 41 | Translucent 42 | 43 | 44 | 45 | UISupportedInterfaceOrientations 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/UIViewController-Transitions-Example-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 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /UIViewController-Transitions-Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UIViewController-Transitions-Example 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "TLAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([TLAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /UIViewController-Transitions-ExampleTests/UIViewController-Transitions-ExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.teehanlax.${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 | -------------------------------------------------------------------------------- /UIViewController-Transitions-ExampleTests/UIViewController_Transitions_ExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController_Transitions_ExampleTests.m 3 | // UIViewController-Transitions-ExampleTests 4 | // 5 | // Created by Ash Furrow on 2013-07-12. 6 | // Copyright (c) 2013 Teehan+Lax. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController_Transitions_ExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation UIViewController_Transitions_ExampleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | 21 | // Set-up code here. 22 | } 23 | 24 | - (void)tearDown 25 | { 26 | // Tear-down code here. 27 | 28 | [super tearDown]; 29 | } 30 | 31 | - (void)testExample 32 | { 33 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /UIViewController-Transitions-ExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------