├── .gitignore ├── .swift-version ├── .travis.yml ├── CHANGELOG.md ├── Demo ├── Demo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Demo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── image0.imageset │ │ ├── Contents.json │ │ ├── image0.jpg │ │ ├── image0@2x.jpg │ │ └── image0@3x.jpg │ ├── image1.imageset │ │ ├── Contents.json │ │ ├── image1.jpg │ │ ├── image1@2x.jpg │ │ └── image1@3x.jpg │ ├── image2.imageset │ │ ├── Contents.json │ │ ├── image2.jpg │ │ ├── image2@2x.jpg │ │ └── image2@3x.jpg │ ├── image3.imageset │ │ ├── Contents.json │ │ ├── image3.jpg │ │ ├── image3@2x.jpg │ │ └── image3@3x.jpg │ ├── image4.imageset │ │ ├── Contents.json │ │ ├── image4.jpg │ │ ├── image4@2x.jpg │ │ └── image4@3x.jpg │ ├── image5.imageset │ │ ├── Contents.json │ │ ├── image5.jpg │ │ ├── image5@2x.jpg │ │ └── image5@3x.jpg │ ├── image6.imageset │ │ ├── Contents.json │ │ ├── image6.jpg │ │ ├── image6@2x.jpg │ │ └── image6@3x.jpg │ ├── image7.imageset │ │ ├── Contents.json │ │ ├── image7.jpg │ │ ├── image7@2x.jpg │ │ └── image7@3x.jpg │ ├── image8.imageset │ │ ├── Contents.json │ │ ├── image8.jpg │ │ ├── image8@2x.jpg │ │ └── image8@3x.jpg │ └── image9.imageset │ │ ├── Contents.json │ │ ├── image9.jpg │ │ ├── image9@2x.jpg │ │ └── image9@3x.jpg │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── ImageDetailViewController.swift │ ├── ImageListCell.swift │ ├── ImageListViewController.swift │ ├── ImageOnlyViewController.swift │ ├── Info.plist │ └── NavigationController.swift ├── LICENSE ├── README.md ├── ZoomTransitioning.podspec ├── ZoomTransitioning.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── ZoomTransitioning.xcscheme ├── ZoomTransitioning ├── Info.plist ├── UIImageView+extension.swift ├── ZoomInteractiveTransition.swift ├── ZoomNavigationControllerDelegate.swift ├── ZoomTransitionDestinationDelegate.swift ├── ZoomTransitionSourceDelegate.swift ├── ZoomTransitioning.h └── ZoomTransitioning.swift └── images └── demo.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.1.2 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -workspace Example/ZoomTransitioning.xcworkspace -scheme ZoomTransitioning-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 1.1.3 Release notes (2016-08-26) 2 | 3 | ## Refactoring 4 | 5 | - remove waste file 6 | 7 | # 1.1.2 Release notes (2016-07-19) 8 | 9 | ## Enhancements 10 | 11 | - carthage compatible 12 | 13 | # 1.0.1 Release notes (2016-07-17) 14 | 15 | ## Enhancements 16 | 17 | - update initializer of `ZoomTransitioning` 18 | 19 | # 1.0.0 Release notes (2016-07-18) 20 | 21 | ## Enhancements 22 | 23 | - initial version 24 | 25 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CE3612031D3DA73000E8A268 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612021D3DA73000E8A268 /* AppDelegate.swift */; }; 11 | CE3612081D3DA73000E8A268 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE3612061D3DA73000E8A268 /* Main.storyboard */; }; 12 | CE36120A1D3DA73000E8A268 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE3612091D3DA73000E8A268 /* Assets.xcassets */; }; 13 | CE36120D1D3DA73000E8A268 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE36120B1D3DA73000E8A268 /* LaunchScreen.storyboard */; }; 14 | CE3612191D3DA8AF00E8A268 /* ImageDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612141D3DA8AF00E8A268 /* ImageDetailViewController.swift */; }; 15 | CE36121A1D3DA8AF00E8A268 /* ImageListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612151D3DA8AF00E8A268 /* ImageListCell.swift */; }; 16 | CE36121B1D3DA8AF00E8A268 /* ImageListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612161D3DA8AF00E8A268 /* ImageListViewController.swift */; }; 17 | CE36121C1D3DA8AF00E8A268 /* ImageOnlyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612171D3DA8AF00E8A268 /* ImageOnlyViewController.swift */; }; 18 | CE36121D1D3DA8AF00E8A268 /* NavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612181D3DA8AF00E8A268 /* NavigationController.swift */; }; 19 | CE3612251D3DA99500E8A268 /* UIImageView+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE36121F1D3DA99500E8A268 /* UIImageView+extension.swift */; }; 20 | CE3612261D3DA99500E8A268 /* ZoomInteractiveTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612201D3DA99500E8A268 /* ZoomInteractiveTransition.swift */; }; 21 | CE3612271D3DA99500E8A268 /* ZoomNavigationControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612211D3DA99500E8A268 /* ZoomNavigationControllerDelegate.swift */; }; 22 | CE3612281D3DA99500E8A268 /* ZoomTransitionDestinationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612221D3DA99500E8A268 /* ZoomTransitionDestinationDelegate.swift */; }; 23 | CE3612291D3DA99500E8A268 /* ZoomTransitioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612231D3DA99500E8A268 /* ZoomTransitioning.swift */; }; 24 | CE36122A1D3DA99500E8A268 /* ZoomTransitionSourceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3612241D3DA99500E8A268 /* ZoomTransitionSourceDelegate.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | CE3611FF1D3DA73000E8A268 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | CE3612021D3DA73000E8A268 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 30 | CE3612071D3DA73000E8A268 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 31 | CE3612091D3DA73000E8A268 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 32 | CE36120C1D3DA73000E8A268 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 33 | CE36120E1D3DA73000E8A268 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | CE3612141D3DA8AF00E8A268 /* ImageDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageDetailViewController.swift; sourceTree = ""; }; 35 | CE3612151D3DA8AF00E8A268 /* ImageListCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageListCell.swift; sourceTree = ""; }; 36 | CE3612161D3DA8AF00E8A268 /* ImageListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageListViewController.swift; sourceTree = ""; }; 37 | CE3612171D3DA8AF00E8A268 /* ImageOnlyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageOnlyViewController.swift; sourceTree = ""; }; 38 | CE3612181D3DA8AF00E8A268 /* NavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationController.swift; sourceTree = ""; }; 39 | CE36121F1D3DA99500E8A268 /* UIImageView+extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIImageView+extension.swift"; path = "../ZoomTransitioning/UIImageView+extension.swift"; sourceTree = ""; }; 40 | CE3612201D3DA99500E8A268 /* ZoomInteractiveTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ZoomInteractiveTransition.swift; path = ../ZoomTransitioning/ZoomInteractiveTransition.swift; sourceTree = ""; }; 41 | CE3612211D3DA99500E8A268 /* ZoomNavigationControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ZoomNavigationControllerDelegate.swift; path = ../ZoomTransitioning/ZoomNavigationControllerDelegate.swift; sourceTree = ""; }; 42 | CE3612221D3DA99500E8A268 /* ZoomTransitionDestinationDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ZoomTransitionDestinationDelegate.swift; path = ../ZoomTransitioning/ZoomTransitionDestinationDelegate.swift; sourceTree = ""; }; 43 | CE3612231D3DA99500E8A268 /* ZoomTransitioning.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ZoomTransitioning.swift; path = ../ZoomTransitioning/ZoomTransitioning.swift; sourceTree = ""; }; 44 | CE3612241D3DA99500E8A268 /* ZoomTransitionSourceDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ZoomTransitionSourceDelegate.swift; path = ../ZoomTransitioning/ZoomTransitionSourceDelegate.swift; sourceTree = ""; }; 45 | CE36122B1D3DAB4400E8A268 /* ZoomTransitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZoomTransitioning.h; path = ../ZoomTransitioning/ZoomTransitioning.h; sourceTree = ""; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | CE3611FC1D3DA73000E8A268 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | CE3611F61D3DA73000E8A268 = { 60 | isa = PBXGroup; 61 | children = ( 62 | CE36121E1D3DA97300E8A268 /* ZoomTransitioning */, 63 | CE3612011D3DA73000E8A268 /* Demo */, 64 | CE3612001D3DA73000E8A268 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | CE3612001D3DA73000E8A268 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | CE3611FF1D3DA73000E8A268 /* Demo.app */, 72 | ); 73 | name = Products; 74 | sourceTree = ""; 75 | }; 76 | CE3612011D3DA73000E8A268 /* Demo */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | CE3612141D3DA8AF00E8A268 /* ImageDetailViewController.swift */, 80 | CE3612151D3DA8AF00E8A268 /* ImageListCell.swift */, 81 | CE3612161D3DA8AF00E8A268 /* ImageListViewController.swift */, 82 | CE3612171D3DA8AF00E8A268 /* ImageOnlyViewController.swift */, 83 | CE3612181D3DA8AF00E8A268 /* NavigationController.swift */, 84 | CE3612021D3DA73000E8A268 /* AppDelegate.swift */, 85 | CE3612061D3DA73000E8A268 /* Main.storyboard */, 86 | CE3612091D3DA73000E8A268 /* Assets.xcassets */, 87 | CE36120B1D3DA73000E8A268 /* LaunchScreen.storyboard */, 88 | CE36120E1D3DA73000E8A268 /* Info.plist */, 89 | ); 90 | path = Demo; 91 | sourceTree = ""; 92 | }; 93 | CE36121E1D3DA97300E8A268 /* ZoomTransitioning */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | CE36122B1D3DAB4400E8A268 /* ZoomTransitioning.h */, 97 | CE36121F1D3DA99500E8A268 /* UIImageView+extension.swift */, 98 | CE3612201D3DA99500E8A268 /* ZoomInteractiveTransition.swift */, 99 | CE3612211D3DA99500E8A268 /* ZoomNavigationControllerDelegate.swift */, 100 | CE3612221D3DA99500E8A268 /* ZoomTransitionDestinationDelegate.swift */, 101 | CE3612231D3DA99500E8A268 /* ZoomTransitioning.swift */, 102 | CE3612241D3DA99500E8A268 /* ZoomTransitionSourceDelegate.swift */, 103 | ); 104 | name = ZoomTransitioning; 105 | sourceTree = ""; 106 | }; 107 | /* End PBXGroup section */ 108 | 109 | /* Begin PBXNativeTarget section */ 110 | CE3611FE1D3DA73000E8A268 /* Demo */ = { 111 | isa = PBXNativeTarget; 112 | buildConfigurationList = CE3612111D3DA73000E8A268 /* Build configuration list for PBXNativeTarget "Demo" */; 113 | buildPhases = ( 114 | CE3611FB1D3DA73000E8A268 /* Sources */, 115 | CE3611FC1D3DA73000E8A268 /* Frameworks */, 116 | CE3611FD1D3DA73000E8A268 /* Resources */, 117 | ); 118 | buildRules = ( 119 | ); 120 | dependencies = ( 121 | ); 122 | name = Demo; 123 | productName = Demo; 124 | productReference = CE3611FF1D3DA73000E8A268 /* Demo.app */; 125 | productType = "com.apple.product-type.application"; 126 | }; 127 | /* End PBXNativeTarget section */ 128 | 129 | /* Begin PBXProject section */ 130 | CE3611F71D3DA73000E8A268 /* Project object */ = { 131 | isa = PBXProject; 132 | attributes = { 133 | LastSwiftUpdateCheck = 0730; 134 | LastUpgradeCheck = 0940; 135 | ORGANIZATIONNAME = com.shoji; 136 | TargetAttributes = { 137 | CE3611FE1D3DA73000E8A268 = { 138 | CreatedOnToolsVersion = 7.3.1; 139 | DevelopmentTeam = S3LY459S86; 140 | LastSwiftMigration = 0940; 141 | }; 142 | }; 143 | }; 144 | buildConfigurationList = CE3611FA1D3DA73000E8A268 /* Build configuration list for PBXProject "Demo" */; 145 | compatibilityVersion = "Xcode 3.2"; 146 | developmentRegion = English; 147 | hasScannedForEncodings = 0; 148 | knownRegions = ( 149 | en, 150 | Base, 151 | ); 152 | mainGroup = CE3611F61D3DA73000E8A268; 153 | productRefGroup = CE3612001D3DA73000E8A268 /* Products */; 154 | projectDirPath = ""; 155 | projectRoot = ""; 156 | targets = ( 157 | CE3611FE1D3DA73000E8A268 /* Demo */, 158 | ); 159 | }; 160 | /* End PBXProject section */ 161 | 162 | /* Begin PBXResourcesBuildPhase section */ 163 | CE3611FD1D3DA73000E8A268 /* Resources */ = { 164 | isa = PBXResourcesBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | CE36120D1D3DA73000E8A268 /* LaunchScreen.storyboard in Resources */, 168 | CE36120A1D3DA73000E8A268 /* Assets.xcassets in Resources */, 169 | CE3612081D3DA73000E8A268 /* Main.storyboard in Resources */, 170 | ); 171 | runOnlyForDeploymentPostprocessing = 0; 172 | }; 173 | /* End PBXResourcesBuildPhase section */ 174 | 175 | /* Begin PBXSourcesBuildPhase section */ 176 | CE3611FB1D3DA73000E8A268 /* Sources */ = { 177 | isa = PBXSourcesBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | CE3612261D3DA99500E8A268 /* ZoomInteractiveTransition.swift in Sources */, 181 | CE36121C1D3DA8AF00E8A268 /* ImageOnlyViewController.swift in Sources */, 182 | CE3612291D3DA99500E8A268 /* ZoomTransitioning.swift in Sources */, 183 | CE36121D1D3DA8AF00E8A268 /* NavigationController.swift in Sources */, 184 | CE3612271D3DA99500E8A268 /* ZoomNavigationControllerDelegate.swift in Sources */, 185 | CE3612031D3DA73000E8A268 /* AppDelegate.swift in Sources */, 186 | CE36121A1D3DA8AF00E8A268 /* ImageListCell.swift in Sources */, 187 | CE36121B1D3DA8AF00E8A268 /* ImageListViewController.swift in Sources */, 188 | CE3612281D3DA99500E8A268 /* ZoomTransitionDestinationDelegate.swift in Sources */, 189 | CE36122A1D3DA99500E8A268 /* ZoomTransitionSourceDelegate.swift in Sources */, 190 | CE3612251D3DA99500E8A268 /* UIImageView+extension.swift in Sources */, 191 | CE3612191D3DA8AF00E8A268 /* ImageDetailViewController.swift in Sources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXSourcesBuildPhase section */ 196 | 197 | /* Begin PBXVariantGroup section */ 198 | CE3612061D3DA73000E8A268 /* Main.storyboard */ = { 199 | isa = PBXVariantGroup; 200 | children = ( 201 | CE3612071D3DA73000E8A268 /* Base */, 202 | ); 203 | name = Main.storyboard; 204 | sourceTree = ""; 205 | }; 206 | CE36120B1D3DA73000E8A268 /* LaunchScreen.storyboard */ = { 207 | isa = PBXVariantGroup; 208 | children = ( 209 | CE36120C1D3DA73000E8A268 /* Base */, 210 | ); 211 | name = LaunchScreen.storyboard; 212 | sourceTree = ""; 213 | }; 214 | /* End PBXVariantGroup section */ 215 | 216 | /* Begin XCBuildConfiguration section */ 217 | CE36120F1D3DA73000E8A268 /* Debug */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | CLANG_ANALYZER_NONNULL = YES; 222 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 223 | CLANG_CXX_LIBRARY = "libc++"; 224 | CLANG_ENABLE_MODULES = YES; 225 | CLANG_ENABLE_OBJC_ARC = YES; 226 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 227 | CLANG_WARN_BOOL_CONVERSION = YES; 228 | CLANG_WARN_COMMA = YES; 229 | CLANG_WARN_CONSTANT_CONVERSION = YES; 230 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 231 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 232 | CLANG_WARN_EMPTY_BODY = YES; 233 | CLANG_WARN_ENUM_CONVERSION = YES; 234 | CLANG_WARN_INFINITE_RECURSION = YES; 235 | CLANG_WARN_INT_CONVERSION = YES; 236 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 237 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 238 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 239 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNREACHABLE_CODE = YES; 244 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 245 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 246 | COPY_PHASE_STRIP = NO; 247 | DEBUG_INFORMATION_FORMAT = dwarf; 248 | ENABLE_STRICT_OBJC_MSGSEND = YES; 249 | ENABLE_TESTABILITY = YES; 250 | GCC_C_LANGUAGE_STANDARD = gnu99; 251 | GCC_DYNAMIC_NO_PIC = NO; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_OPTIMIZATION_LEVEL = 0; 254 | GCC_PREPROCESSOR_DEFINITIONS = ( 255 | "DEBUG=1", 256 | "$(inherited)", 257 | ); 258 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 259 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 260 | GCC_WARN_UNDECLARED_SELECTOR = YES; 261 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 262 | GCC_WARN_UNUSED_FUNCTION = YES; 263 | GCC_WARN_UNUSED_VARIABLE = YES; 264 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 265 | MTL_ENABLE_DEBUG_INFO = YES; 266 | ONLY_ACTIVE_ARCH = YES; 267 | SDKROOT = iphoneos; 268 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 269 | TARGETED_DEVICE_FAMILY = "1,2"; 270 | }; 271 | name = Debug; 272 | }; 273 | CE3612101D3DA73000E8A268 /* Release */ = { 274 | isa = XCBuildConfiguration; 275 | buildSettings = { 276 | ALWAYS_SEARCH_USER_PATHS = NO; 277 | CLANG_ANALYZER_NONNULL = YES; 278 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 279 | CLANG_CXX_LIBRARY = "libc++"; 280 | CLANG_ENABLE_MODULES = YES; 281 | CLANG_ENABLE_OBJC_ARC = YES; 282 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 283 | CLANG_WARN_BOOL_CONVERSION = YES; 284 | CLANG_WARN_COMMA = YES; 285 | CLANG_WARN_CONSTANT_CONVERSION = YES; 286 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 288 | CLANG_WARN_EMPTY_BODY = YES; 289 | CLANG_WARN_ENUM_CONVERSION = YES; 290 | CLANG_WARN_INFINITE_RECURSION = YES; 291 | CLANG_WARN_INT_CONVERSION = YES; 292 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 293 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 294 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 296 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 297 | CLANG_WARN_STRICT_PROTOTYPES = YES; 298 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 299 | CLANG_WARN_UNREACHABLE_CODE = YES; 300 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 301 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 302 | COPY_PHASE_STRIP = NO; 303 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 304 | ENABLE_NS_ASSERTIONS = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_NO_COMMON_BLOCKS = YES; 308 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 309 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 310 | GCC_WARN_UNDECLARED_SELECTOR = YES; 311 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 312 | GCC_WARN_UNUSED_FUNCTION = YES; 313 | GCC_WARN_UNUSED_VARIABLE = YES; 314 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 315 | MTL_ENABLE_DEBUG_INFO = NO; 316 | SDKROOT = iphoneos; 317 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 318 | TARGETED_DEVICE_FAMILY = "1,2"; 319 | VALIDATE_PRODUCT = YES; 320 | }; 321 | name = Release; 322 | }; 323 | CE3612121D3DA73000E8A268 /* Debug */ = { 324 | isa = XCBuildConfiguration; 325 | buildSettings = { 326 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 327 | INFOPLIST_FILE = Demo/Info.plist; 328 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 329 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.Demo; 330 | PRODUCT_NAME = "$(TARGET_NAME)"; 331 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 332 | SWIFT_VERSION = 4.0; 333 | }; 334 | name = Debug; 335 | }; 336 | CE3612131D3DA73000E8A268 /* Release */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 340 | INFOPLIST_FILE = Demo/Info.plist; 341 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 342 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.Demo; 343 | PRODUCT_NAME = "$(TARGET_NAME)"; 344 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 345 | SWIFT_VERSION = 4.0; 346 | }; 347 | name = Release; 348 | }; 349 | /* End XCBuildConfiguration section */ 350 | 351 | /* Begin XCConfigurationList section */ 352 | CE3611FA1D3DA73000E8A268 /* Build configuration list for PBXProject "Demo" */ = { 353 | isa = XCConfigurationList; 354 | buildConfigurations = ( 355 | CE36120F1D3DA73000E8A268 /* Debug */, 356 | CE3612101D3DA73000E8A268 /* Release */, 357 | ); 358 | defaultConfigurationIsVisible = 0; 359 | defaultConfigurationName = Release; 360 | }; 361 | CE3612111D3DA73000E8A268 /* Build configuration list for PBXNativeTarget "Demo" */ = { 362 | isa = XCConfigurationList; 363 | buildConfigurations = ( 364 | CE3612121D3DA73000E8A268 /* Debug */, 365 | CE3612131D3DA73000E8A268 /* Release */, 366 | ); 367 | defaultConfigurationIsVisible = 0; 368 | defaultConfigurationName = Release; 369 | }; 370 | /* End XCConfigurationList section */ 371 | }; 372 | rootObject = CE3611F71D3DA73000E8A268 /* Project object */; 373 | } 374 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Demo 4 | // 5 | // Created by shoji on 7/19/16. 6 | // Copyright © 2016 com.shoji. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | final class AppDelegate: UIResponder, UIApplicationDelegate { 13 | var window: UIWindow? 14 | } 15 | -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image0.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image0@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image0@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image0.imageset/image0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image0.imageset/image0.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image0.imageset/image0@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image0.imageset/image0@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image0.imageset/image0@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image0.imageset/image0@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image1@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image1@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image1.imageset/image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image1.imageset/image1.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image1.imageset/image1@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image1.imageset/image1@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image1.imageset/image1@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image1.imageset/image1@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image2@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image2@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image2.imageset/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image2.imageset/image2.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image2.imageset/image2@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image2.imageset/image2@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image2.imageset/image2@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image2.imageset/image2@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image3@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image3@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image3.imageset/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image3.imageset/image3.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image3.imageset/image3@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image3.imageset/image3@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image3.imageset/image3@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image3.imageset/image3@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image4@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image4@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image4.imageset/image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image4.imageset/image4.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image4.imageset/image4@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image4.imageset/image4@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image4.imageset/image4@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image4.imageset/image4@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image5.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image5@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image5@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image5.imageset/image5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image5.imageset/image5.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image5.imageset/image5@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image5.imageset/image5@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image5.imageset/image5@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image5.imageset/image5@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image6.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image6@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image6@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image6.imageset/image6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image6.imageset/image6.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image6.imageset/image6@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image6.imageset/image6@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image6.imageset/image6@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image6.imageset/image6@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image7.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image7@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image7@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image7.imageset/image7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image7.imageset/image7.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image7.imageset/image7@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image7.imageset/image7@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image7.imageset/image7@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image7.imageset/image7@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image8.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image8@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image8@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image8.imageset/image8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image8.imageset/image8.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image8.imageset/image8@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image8.imageset/image8@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image8.imageset/image8@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image8.imageset/image8@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "image9.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "image9@2x.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "image9@3x.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image9.imageset/image9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image9.imageset/image9.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image9.imageset/image9@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image9.imageset/image9@2x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Assets.xcassets/image9.imageset/image9@3x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/Demo/Demo/Assets.xcassets/image9.imageset/image9@3x.jpg -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Demo/Demo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 100 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 120 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 140 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | -------------------------------------------------------------------------------- /Demo/Demo/ImageDetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageDetailViewController.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/08/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class ImageDetailViewController: UIViewController { 12 | @IBOutlet private weak var largeImageView: UIImageView! 13 | @IBOutlet private weak var smallImageView1: UIImageView! 14 | @IBOutlet private weak var smallImageView2: UIImageView! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | smallImageView1.image = randomImage 20 | smallImageView2.image = randomImage 21 | } 22 | 23 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 24 | super.prepare(for: segue, sender: sender) 25 | 26 | guard let vc = segue.destination as? ImageOnlyViewController else { return } 27 | vc.image = smallImageView2.image 28 | } 29 | 30 | private var randomImage: UIImage { 31 | let num: Int = Int(arc4random() % 10) 32 | return UIImage(named: "image\(num)")! 33 | } 34 | } 35 | 36 | 37 | // MARK: - ZoomTransitionSourceDelegate 38 | 39 | extension ImageDetailViewController: ZoomTransitionSourceDelegate { 40 | func transitionSourceImageView() -> UIImageView { 41 | return smallImageView1 42 | } 43 | 44 | func transitionSourceImageViewFrame(forward: Bool) -> CGRect { 45 | return smallImageView1.convert(smallImageView1.bounds, to: view) 46 | } 47 | 48 | func transitionSourceWillBegin() { 49 | smallImageView1.isHidden = true 50 | } 51 | 52 | func transitionSourceDidEnd() { 53 | smallImageView1.isHidden = false 54 | } 55 | 56 | func transitionSourceDidCancel() { 57 | smallImageView1.isHidden = false 58 | } 59 | } 60 | 61 | 62 | // MARK: - ZoomTransitionDestinationDelegate 63 | 64 | extension ImageDetailViewController: ZoomTransitionDestinationDelegate { 65 | func transitionDestinationImageViewFrame(forward: Bool) -> CGRect { 66 | if forward { 67 | let x: CGFloat = 0 68 | let y: CGFloat = topLayoutGuide.length 69 | let width: CGFloat = view.frame.width 70 | let height: CGFloat = width * 2 / 3 71 | return CGRect(x: x, y: y, width: width, height: height) 72 | } else { 73 | return largeImageView.convert(largeImageView.bounds, to: view) 74 | } 75 | } 76 | 77 | func transitionDestinationWillBegin() { 78 | largeImageView.isHidden = true 79 | } 80 | 81 | func transitionDestinationDidEnd(transitioningImageView imageView: UIImageView) { 82 | largeImageView.isHidden = false 83 | largeImageView.image = imageView.image 84 | } 85 | 86 | func transitionDestinationDidCancel() { 87 | largeImageView.isHidden = false 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Demo/Demo/ImageListCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageListCell.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/08/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class ImageListCell: UICollectionViewCell { 12 | @IBOutlet weak var imageView: UIImageView! 13 | } 14 | -------------------------------------------------------------------------------- /Demo/Demo/ImageListViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageListViewController.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/08/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class ImageListViewController: UICollectionViewController { 12 | private var selectedImageView: UIImageView? 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | title = "List" 17 | clearsSelectionOnViewWillAppear = false 18 | } 19 | } 20 | 21 | 22 | // MARK: - UICollectionViewDataSource 23 | 24 | extension ImageListViewController { 25 | override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 26 | return 10 27 | } 28 | 29 | override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 30 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: ImageListCell.self), for: indexPath) as! ImageListCell 31 | cell.imageView.image = UIImage(named: "image\(indexPath.item)") 32 | return cell 33 | } 34 | } 35 | 36 | 37 | // MARK: - UICollectionViewDelegate 38 | 39 | extension ImageListViewController { 40 | override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 41 | let cell = collectionView.cellForItem(at: indexPath) as! ImageListCell 42 | selectedImageView = cell.imageView 43 | } 44 | } 45 | 46 | 47 | // MARK: - UICollectionViewDelegateFlowLayout 48 | 49 | extension ImageListViewController: UICollectionViewDelegateFlowLayout { 50 | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 51 | let space: CGFloat = 8 52 | let columns: CGFloat = 2 53 | let length: CGFloat = (collectionView.frame.width - space * (columns + 1)) / columns 54 | return CGSize(width: length, height: length) 55 | } 56 | } 57 | 58 | 59 | // MARK: - ZoomTransitionSourceDelegate 60 | 61 | extension ImageListViewController: ZoomTransitionSourceDelegate { 62 | var animationDuration: TimeInterval { 63 | return 0.4 64 | } 65 | 66 | func transitionSourceImageView() -> UIImageView { 67 | return selectedImageView ?? UIImageView() 68 | } 69 | 70 | func transitionSourceImageViewFrame(forward: Bool) -> CGRect { 71 | guard let selectedImageView = selectedImageView else { return .zero } 72 | return selectedImageView.convert(selectedImageView.bounds, to: view) 73 | } 74 | 75 | func transitionSourceWillBegin() { 76 | selectedImageView?.isHidden = true 77 | } 78 | 79 | func transitionSourceDidEnd() { 80 | selectedImageView?.isHidden = false 81 | } 82 | 83 | func transitionSourceDidCancel() { 84 | selectedImageView?.isHidden = false 85 | } 86 | 87 | // Uncomment method below if you customize the animation. 88 | /* 89 | func zoomAnimation(animations: @escaping () -> Void, completion: ((Bool) -> Void)? = nil) { 90 | UIView.animate( 91 | withDuration: animationDuration, 92 | delay: 0, 93 | usingSpringWithDamping: 0.8, 94 | initialSpringVelocity: 2, 95 | options: .curveEaseInOut, 96 | animations: animations, 97 | completion: completion) 98 | } 99 | */ 100 | } 101 | -------------------------------------------------------------------------------- /Demo/Demo/ImageOnlyViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageOnlyViewController.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/13/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class ImageOnlyViewController: UIViewController { 12 | var image: UIImage? 13 | @IBOutlet private var imageView: UIImageView! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | imageView.image = image 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Demo/Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ZoomTransitioning 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Demo/Demo/NavigationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NavigationController.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/09/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class NavigationController: UINavigationController { 12 | private let zoomNavigationControllerDelegate: ZoomNavigationControllerDelegate = .init() 13 | 14 | required init?(coder aDecoder: NSCoder) { 15 | super.init(coder: aDecoder) 16 | 17 | delegate = zoomNavigationControllerDelegate 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 WorldDownTown 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 | # ZoomTransitioning 2 | 3 | [![Join the chat at https://gitter.im/WorldDownTown/ZoomTransitioning](https://badges.gitter.im/WorldDownTown/ZoomTransitioning.svg)](https://gitter.im/WorldDownTown/ZoomTransitioning?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | [![License](https://img.shields.io/:license-mit-blue.svg)](https://doge.mit-license.org) 6 | [![Swift](https://img.shields.io/badge/Swift-4.1-orange.svg?style=flat)](https://developer.apple.com/swift) 7 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 8 | [![CocoaPods compatible](https://img.shields.io/cocoapods/v/ZoomTransitioning.svg?style=flat)](http://cocoadocs.org/docsets/ZoomTransitioning/) 9 | [![CocoaPods](https://img.shields.io/cocoapods/dt/ZoomTransitioning.svg)](http://cocoadocs.org/docsets/ZoomTransitioning/) 10 | [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/matteocrippa/awesome-swift#animation) 11 | 12 | ## Overview 13 | `ZoomTransitioning` provides a custom transition with image zooming animation. 14 | When you use this library with `UINavigationController`, you can pop view controller with edge swiping. 15 | 16 | 17 | 18 | ## Demo 19 | Run the demo project in the Demo directory without `carthage update` or `pod install`. 20 | 21 | ## Usage 22 | Refer to the example project for details. 23 | 24 | ### `import ZoomTransitioning` 25 | ### Adopt `ZoomTransitionSourceDelegate` to source view controller 26 | 27 | ```swift 28 | extension ImageListViewController: ZoomTransitionSourceDelegate { 29 | 30 | func transitionSourceImageView() -> UIImageView { 31 | return selectedImageView 32 | } 33 | 34 | func transitionSourceImageViewFrame(forward forward: Bool) -> CGRect { 35 | return selectedImageView.convertRect(selectedImageView.bounds, toView: view) 36 | } 37 | 38 | func transitionSourceWillBegin() { 39 | selectedImageView.hidden = true 40 | } 41 | 42 | func transitionSourceDidEnd() { 43 | selectedImageView.hidden = false 44 | } 45 | 46 | func transitionSourceDidCancel() { 47 | selectedImageView.hidden = false 48 | } 49 | } 50 | ``` 51 | 52 | ### Adopt `ZoomTransitionDestinationDelegate` to destination view controller 53 | 54 | ```swift 55 | extension ImageDetailViewController: ZoomTransitionDestinationDelegate { 56 | 57 | func transitionDestinationImageViewFrame(forward forward: Bool) -> CGRect { 58 | if forward { 59 | let x: CGFloat = 0.0 60 | let y = topLayoutGuide.length 61 | let width = view.frame.width 62 | let height = width * 2.0 / 3.0 63 | return CGRect(x: x, y: y, width: width, height: height) 64 | } else { 65 | return largeImageView.convertRect(largeImageView.bounds, toView: view) 66 | } 67 | } 68 | 69 | func transitionDestinationWillBegin() { 70 | largeImageView.hidden = true 71 | } 72 | 73 | func transitionDestinationDidEnd(transitioningImageView imageView: UIImageView) { 74 | largeImageView.hidden = false 75 | largeImageView.image = imageView.image 76 | } 77 | 78 | func transitionDestinationDidCancel() { 79 | largeImageView.hidden = false 80 | } 81 | } 82 | ``` 83 | 84 | ### set `delegate` property of `UINavigationController` 85 | 86 | ```swift 87 | import ZoomTransitioning 88 | 89 | class NavigationController: UINavigationController { 90 | 91 | private let zoomNavigationControllerDelegate = ZoomNavigationControllerDelegate() 92 | 93 | required init?(coder aDecoder: NSCoder) { 94 | super.init(coder: aDecoder) 95 | 96 | delegate = zoomNavigationControllerDelegate 97 | } 98 | } 99 | ``` 100 | 101 | ## Requirements 102 | - Swift 4.0 103 | - iOS 9.0 or later 104 | 105 | If you use Swift 2.2, use [1.3.0](https://github.com/WorldDownTown/ZoomTransitioning/releases/tag/1.3.0) 106 | 107 | ## Installation 108 | 109 | ### Carthage 110 | ZoomTransitioning is available through [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your Cartfile: 111 | 112 | ``` 113 | github "WorldDownTown/ZoomTransitioning" 114 | ``` 115 | 116 | ### CocoaPods 117 | ZoomTransitioning is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: 118 | 119 | ```ruby 120 | pod 'ZoomTransitioning' 121 | ``` 122 | 123 | ### Manually 124 | 1. Download and drop ```/ZoomTransitioning```folder in your project. 125 | 2. Congratulations! 126 | 127 | ## Author 128 | WorldDownTown, WorldDownTown@gmail.com 129 | 130 | ## License 131 | ZoomTransitioning is available under the MIT license. See the LICENSE file for more info. 132 | 133 | -------------------------------------------------------------------------------- /ZoomTransitioning.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'ZoomTransitioning' 3 | s.version = '1.6.0' 4 | s.summary = 'ZoomTransitioning provides a custom transition with image zooming animation.' 5 | s.description = <<-DESC 6 | ZoomTransitioning provides a custom transition with image zooming animation. 7 | When you use this library with UINavigationController, you can pop view controller with edge swiping. 8 | DESC 9 | s.homepage = 'https://github.com/WorldDownTown/ZoomTransitioning' 10 | s.screenshots = 'http://i.giphy.com/l0HlGSD26DXKSqWBi.gif' 11 | s.license = { type: 'MIT', file: 'LICENSE' } 12 | s.author = { 'WorldDownTown' => 'WorldDownTown@gmail.com' } 13 | s.source = { git: 'https://github.com/WorldDownTown/ZoomTransitioning.git', tag: s.version.to_s } 14 | s.social_media_url = 'https://twitter.com/WorldDownTown' 15 | s.ios.deployment_target = '9.3' 16 | s.source_files = 'ZoomTransitioning/*.swift' 17 | s.frameworks = 'UIKit' 18 | end 19 | -------------------------------------------------------------------------------- /ZoomTransitioning.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CE3611EF1D3DA70500E8A268 /* ZoomTransitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = CE3611EE1D3DA70500E8A268 /* ZoomTransitioning.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | CECC5736211FD40900D9A1F6 /* ZoomInteractiveTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED3EEF1D3DB0830083383E /* ZoomInteractiveTransition.swift */; }; 12 | CEED3EF41D3DB0830083383E /* UIImageView+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED3EEE1D3DB0830083383E /* UIImageView+extension.swift */; }; 13 | CEED3EF61D3DB0830083383E /* ZoomNavigationControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED3EF01D3DB0830083383E /* ZoomNavigationControllerDelegate.swift */; }; 14 | CEED3EF71D3DB0830083383E /* ZoomTransitionDestinationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED3EF11D3DB0830083383E /* ZoomTransitionDestinationDelegate.swift */; }; 15 | CEED3EF81D3DB0830083383E /* ZoomTransitioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED3EF21D3DB0830083383E /* ZoomTransitioning.swift */; }; 16 | CEED3EF91D3DB0830083383E /* ZoomTransitionSourceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED3EF31D3DB0830083383E /* ZoomTransitionSourceDelegate.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | CE3611EB1D3DA70500E8A268 /* ZoomTransitioning.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZoomTransitioning.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | CE3611EE1D3DA70500E8A268 /* ZoomTransitioning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZoomTransitioning.h; sourceTree = ""; }; 22 | CE3611F01D3DA70500E8A268 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | CEED3EEE1D3DB0830083383E /* UIImageView+extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImageView+extension.swift"; sourceTree = ""; }; 24 | CEED3EEF1D3DB0830083383E /* ZoomInteractiveTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomInteractiveTransition.swift; sourceTree = ""; }; 25 | CEED3EF01D3DB0830083383E /* ZoomNavigationControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomNavigationControllerDelegate.swift; sourceTree = ""; }; 26 | CEED3EF11D3DB0830083383E /* ZoomTransitionDestinationDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomTransitionDestinationDelegate.swift; sourceTree = ""; }; 27 | CEED3EF21D3DB0830083383E /* ZoomTransitioning.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomTransitioning.swift; sourceTree = ""; }; 28 | CEED3EF31D3DB0830083383E /* ZoomTransitionSourceDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZoomTransitionSourceDelegate.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | CE3611E71D3DA70500E8A268 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | CE3611E11D3DA70500E8A268 = { 43 | isa = PBXGroup; 44 | children = ( 45 | CE3611ED1D3DA70500E8A268 /* ZoomTransitioning */, 46 | CE3611EC1D3DA70500E8A268 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | CE3611EC1D3DA70500E8A268 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | CE3611EB1D3DA70500E8A268 /* ZoomTransitioning.framework */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | CE3611ED1D3DA70500E8A268 /* ZoomTransitioning */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | CE3611EE1D3DA70500E8A268 /* ZoomTransitioning.h */, 62 | CE3611F01D3DA70500E8A268 /* Info.plist */, 63 | CEED3EEE1D3DB0830083383E /* UIImageView+extension.swift */, 64 | CEED3EEF1D3DB0830083383E /* ZoomInteractiveTransition.swift */, 65 | CEED3EF01D3DB0830083383E /* ZoomNavigationControllerDelegate.swift */, 66 | CEED3EF11D3DB0830083383E /* ZoomTransitionDestinationDelegate.swift */, 67 | CEED3EF21D3DB0830083383E /* ZoomTransitioning.swift */, 68 | CEED3EF31D3DB0830083383E /* ZoomTransitionSourceDelegate.swift */, 69 | ); 70 | path = ZoomTransitioning; 71 | sourceTree = ""; 72 | }; 73 | /* End PBXGroup section */ 74 | 75 | /* Begin PBXHeadersBuildPhase section */ 76 | CE3611E81D3DA70500E8A268 /* Headers */ = { 77 | isa = PBXHeadersBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | CE3611EF1D3DA70500E8A268 /* ZoomTransitioning.h in Headers */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXHeadersBuildPhase section */ 85 | 86 | /* Begin PBXNativeTarget section */ 87 | CE3611EA1D3DA70500E8A268 /* ZoomTransitioning */ = { 88 | isa = PBXNativeTarget; 89 | buildConfigurationList = CE3611F31D3DA70500E8A268 /* Build configuration list for PBXNativeTarget "ZoomTransitioning" */; 90 | buildPhases = ( 91 | CE3611E61D3DA70500E8A268 /* Sources */, 92 | CE3611E71D3DA70500E8A268 /* Frameworks */, 93 | CE3611E81D3DA70500E8A268 /* Headers */, 94 | CE3611E91D3DA70500E8A268 /* Resources */, 95 | ); 96 | buildRules = ( 97 | ); 98 | dependencies = ( 99 | ); 100 | name = ZoomTransitioning; 101 | productName = ZoomTransitioning; 102 | productReference = CE3611EB1D3DA70500E8A268 /* ZoomTransitioning.framework */; 103 | productType = "com.apple.product-type.framework"; 104 | }; 105 | /* End PBXNativeTarget section */ 106 | 107 | /* Begin PBXProject section */ 108 | CE3611E21D3DA70500E8A268 /* Project object */ = { 109 | isa = PBXProject; 110 | attributes = { 111 | LastUpgradeCheck = 0940; 112 | ORGANIZATIONNAME = com.shoji; 113 | TargetAttributes = { 114 | CE3611EA1D3DA70500E8A268 = { 115 | CreatedOnToolsVersion = 7.3.1; 116 | LastSwiftMigration = 0940; 117 | }; 118 | }; 119 | }; 120 | buildConfigurationList = CE3611E51D3DA70500E8A268 /* Build configuration list for PBXProject "ZoomTransitioning" */; 121 | compatibilityVersion = "Xcode 3.2"; 122 | developmentRegion = English; 123 | hasScannedForEncodings = 0; 124 | knownRegions = ( 125 | en, 126 | ); 127 | mainGroup = CE3611E11D3DA70500E8A268; 128 | productRefGroup = CE3611EC1D3DA70500E8A268 /* Products */; 129 | projectDirPath = ""; 130 | projectRoot = ""; 131 | targets = ( 132 | CE3611EA1D3DA70500E8A268 /* ZoomTransitioning */, 133 | ); 134 | }; 135 | /* End PBXProject section */ 136 | 137 | /* Begin PBXResourcesBuildPhase section */ 138 | CE3611E91D3DA70500E8A268 /* Resources */ = { 139 | isa = PBXResourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | ); 143 | runOnlyForDeploymentPostprocessing = 0; 144 | }; 145 | /* End PBXResourcesBuildPhase section */ 146 | 147 | /* Begin PBXSourcesBuildPhase section */ 148 | CE3611E61D3DA70500E8A268 /* Sources */ = { 149 | isa = PBXSourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | CECC5736211FD40900D9A1F6 /* ZoomInteractiveTransition.swift in Sources */, 153 | CEED3EF61D3DB0830083383E /* ZoomNavigationControllerDelegate.swift in Sources */, 154 | CEED3EF41D3DB0830083383E /* UIImageView+extension.swift in Sources */, 155 | CEED3EF91D3DB0830083383E /* ZoomTransitionSourceDelegate.swift in Sources */, 156 | CEED3EF81D3DB0830083383E /* ZoomTransitioning.swift in Sources */, 157 | CEED3EF71D3DB0830083383E /* ZoomTransitionDestinationDelegate.swift in Sources */, 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | /* End PBXSourcesBuildPhase section */ 162 | 163 | /* Begin XCBuildConfiguration section */ 164 | CE3611F11D3DA70500E8A268 /* Debug */ = { 165 | isa = XCBuildConfiguration; 166 | buildSettings = { 167 | ALWAYS_SEARCH_USER_PATHS = NO; 168 | CLANG_ANALYZER_NONNULL = YES; 169 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 170 | CLANG_CXX_LIBRARY = "libc++"; 171 | CLANG_ENABLE_MODULES = YES; 172 | CLANG_ENABLE_OBJC_ARC = YES; 173 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 174 | CLANG_WARN_BOOL_CONVERSION = YES; 175 | CLANG_WARN_COMMA = YES; 176 | CLANG_WARN_CONSTANT_CONVERSION = YES; 177 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 178 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 179 | CLANG_WARN_EMPTY_BODY = YES; 180 | CLANG_WARN_ENUM_CONVERSION = YES; 181 | CLANG_WARN_INFINITE_RECURSION = YES; 182 | CLANG_WARN_INT_CONVERSION = YES; 183 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 184 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 185 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 186 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 187 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 188 | CLANG_WARN_STRICT_PROTOTYPES = YES; 189 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 190 | CLANG_WARN_UNREACHABLE_CODE = YES; 191 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 192 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 193 | COPY_PHASE_STRIP = NO; 194 | CURRENT_PROJECT_VERSION = 1; 195 | DEBUG_INFORMATION_FORMAT = dwarf; 196 | ENABLE_STRICT_OBJC_MSGSEND = YES; 197 | ENABLE_TESTABILITY = YES; 198 | GCC_C_LANGUAGE_STANDARD = gnu99; 199 | GCC_DYNAMIC_NO_PIC = NO; 200 | GCC_NO_COMMON_BLOCKS = YES; 201 | GCC_OPTIMIZATION_LEVEL = 0; 202 | GCC_PREPROCESSOR_DEFINITIONS = ( 203 | "DEBUG=1", 204 | "$(inherited)", 205 | ); 206 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 207 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 208 | GCC_WARN_UNDECLARED_SELECTOR = YES; 209 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 210 | GCC_WARN_UNUSED_FUNCTION = YES; 211 | GCC_WARN_UNUSED_VARIABLE = YES; 212 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 213 | MTL_ENABLE_DEBUG_INFO = YES; 214 | ONLY_ACTIVE_ARCH = YES; 215 | SDKROOT = iphoneos; 216 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 217 | TARGETED_DEVICE_FAMILY = "1,2"; 218 | VERSIONING_SYSTEM = "apple-generic"; 219 | VERSION_INFO_PREFIX = ""; 220 | }; 221 | name = Debug; 222 | }; 223 | CE3611F21D3DA70500E8A268 /* Release */ = { 224 | isa = XCBuildConfiguration; 225 | buildSettings = { 226 | ALWAYS_SEARCH_USER_PATHS = NO; 227 | CLANG_ANALYZER_NONNULL = YES; 228 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 229 | CLANG_CXX_LIBRARY = "libc++"; 230 | CLANG_ENABLE_MODULES = YES; 231 | CLANG_ENABLE_OBJC_ARC = YES; 232 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 233 | CLANG_WARN_BOOL_CONVERSION = YES; 234 | CLANG_WARN_COMMA = YES; 235 | CLANG_WARN_CONSTANT_CONVERSION = YES; 236 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 237 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 238 | CLANG_WARN_EMPTY_BODY = YES; 239 | CLANG_WARN_ENUM_CONVERSION = YES; 240 | CLANG_WARN_INFINITE_RECURSION = YES; 241 | CLANG_WARN_INT_CONVERSION = YES; 242 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 243 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 244 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 245 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 246 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 247 | CLANG_WARN_STRICT_PROTOTYPES = YES; 248 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 249 | CLANG_WARN_UNREACHABLE_CODE = YES; 250 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 251 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 252 | COPY_PHASE_STRIP = NO; 253 | CURRENT_PROJECT_VERSION = 1; 254 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 255 | ENABLE_NS_ASSERTIONS = NO; 256 | ENABLE_STRICT_OBJC_MSGSEND = YES; 257 | GCC_C_LANGUAGE_STANDARD = gnu99; 258 | GCC_NO_COMMON_BLOCKS = YES; 259 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 260 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 261 | GCC_WARN_UNDECLARED_SELECTOR = YES; 262 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 263 | GCC_WARN_UNUSED_FUNCTION = YES; 264 | GCC_WARN_UNUSED_VARIABLE = YES; 265 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 266 | MTL_ENABLE_DEBUG_INFO = NO; 267 | SDKROOT = iphoneos; 268 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 269 | TARGETED_DEVICE_FAMILY = "1,2"; 270 | VALIDATE_PRODUCT = YES; 271 | VERSIONING_SYSTEM = "apple-generic"; 272 | VERSION_INFO_PREFIX = ""; 273 | }; 274 | name = Release; 275 | }; 276 | CE3611F41D3DA70500E8A268 /* Debug */ = { 277 | isa = XCBuildConfiguration; 278 | buildSettings = { 279 | CLANG_ENABLE_MODULES = YES; 280 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 281 | DEFINES_MODULE = YES; 282 | DYLIB_COMPATIBILITY_VERSION = 1; 283 | DYLIB_CURRENT_VERSION = 1; 284 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 285 | INFOPLIST_FILE = ZoomTransitioning/Info.plist; 286 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 287 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 288 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.ZoomTransitioning; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | SKIP_INSTALL = YES; 291 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 292 | SWIFT_VERSION = 4.0; 293 | }; 294 | name = Debug; 295 | }; 296 | CE3611F51D3DA70500E8A268 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | CLANG_ENABLE_MODULES = YES; 300 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 301 | DEFINES_MODULE = YES; 302 | DYLIB_COMPATIBILITY_VERSION = 1; 303 | DYLIB_CURRENT_VERSION = 1; 304 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 305 | INFOPLIST_FILE = ZoomTransitioning/Info.plist; 306 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 307 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 308 | PRODUCT_BUNDLE_IDENTIFIER = com.shoji.ZoomTransitioning; 309 | PRODUCT_NAME = "$(TARGET_NAME)"; 310 | SKIP_INSTALL = YES; 311 | SWIFT_VERSION = 4.0; 312 | }; 313 | name = Release; 314 | }; 315 | /* End XCBuildConfiguration section */ 316 | 317 | /* Begin XCConfigurationList section */ 318 | CE3611E51D3DA70500E8A268 /* Build configuration list for PBXProject "ZoomTransitioning" */ = { 319 | isa = XCConfigurationList; 320 | buildConfigurations = ( 321 | CE3611F11D3DA70500E8A268 /* Debug */, 322 | CE3611F21D3DA70500E8A268 /* Release */, 323 | ); 324 | defaultConfigurationIsVisible = 0; 325 | defaultConfigurationName = Release; 326 | }; 327 | CE3611F31D3DA70500E8A268 /* Build configuration list for PBXNativeTarget "ZoomTransitioning" */ = { 328 | isa = XCConfigurationList; 329 | buildConfigurations = ( 330 | CE3611F41D3DA70500E8A268 /* Debug */, 331 | CE3611F51D3DA70500E8A268 /* Release */, 332 | ); 333 | defaultConfigurationIsVisible = 0; 334 | defaultConfigurationName = Release; 335 | }; 336 | /* End XCConfigurationList section */ 337 | }; 338 | rootObject = CE3611E21D3DA70500E8A268 /* Project object */; 339 | } 340 | -------------------------------------------------------------------------------- /ZoomTransitioning.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZoomTransitioning.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ZoomTransitioning.xcodeproj/xcshareddata/xcschemes/ZoomTransitioning.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ZoomTransitioning/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ZoomTransitioning/UIImageView+extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+extension.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/16/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIImageView { 12 | convenience init(baseImageView: UIImageView, frame: CGRect) { 13 | self.init(frame: .zero) 14 | 15 | image = baseImageView.image 16 | contentMode = baseImageView.contentMode 17 | clipsToBounds = true 18 | self.frame = frame 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ZoomTransitioning/ZoomInteractiveTransition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomInteractiveTransition.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/16/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public final class ZoomInteractiveTransition: UIPercentDrivenInteractiveTransition { 12 | weak var navigationController: UINavigationController? 13 | weak var zoomPopGestureRecognizer: UIScreenEdgePanGestureRecognizer? 14 | private weak var viewController: UIViewController? 15 | private var interactive: Bool = false 16 | 17 | var interactionController: ZoomInteractiveTransition? { 18 | return interactive ? self : nil 19 | } 20 | 21 | @objc func handle(recognizer: UIScreenEdgePanGestureRecognizer) { 22 | switch recognizer.state { 23 | case .changed: 24 | guard let view = recognizer.view else { return } 25 | let progress = recognizer.translation(in: view).x / view.bounds.width 26 | update(progress) 27 | case .cancelled, .ended: 28 | guard let view = recognizer.view else { return } 29 | let progress = recognizer.translation(in: view).x / view.bounds.width 30 | let velocity = recognizer.velocity(in: view).x 31 | if progress > 0.33 || velocity > 1000 { 32 | finish() 33 | } else { 34 | if #available(iOS 10.0, *), let viewController = viewController { 35 | navigationController?.viewControllers.append(viewController) 36 | update(0) 37 | } 38 | cancel() 39 | 40 | if let viewController = viewController as? ZoomTransitionDestinationDelegate { 41 | viewController.transitionDestinationDidCancel() 42 | } 43 | if let viewController = navigationController?.viewControllers.last as? ZoomTransitionSourceDelegate { 44 | viewController.transitionSourceDidCancel() 45 | } 46 | } 47 | interactive = false 48 | default: 49 | break 50 | } 51 | } 52 | } 53 | 54 | 55 | // MARK: - UIGestureRecognizerDelegate 56 | 57 | extension ZoomInteractiveTransition: UIGestureRecognizerDelegate { 58 | public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { 59 | let isDestinationController: Bool = navigationController?.viewControllers.last is ZoomTransitionDestinationDelegate 60 | if gestureRecognizer === navigationController?.interactivePopGestureRecognizer { 61 | return !isDestinationController 62 | } else if gestureRecognizer === zoomPopGestureRecognizer { 63 | if isDestinationController { 64 | interactive = true 65 | if #available(iOS 10.0, *) { 66 | viewController = navigationController?.popViewController(animated: true) 67 | } 68 | return true 69 | } 70 | } 71 | return false 72 | } 73 | 74 | public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool { 75 | return otherGestureRecognizer === navigationController?.interactivePopGestureRecognizer 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /ZoomTransitioning/ZoomNavigationControllerDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomNavigationControllerDelegate.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/16/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public final class ZoomNavigationControllerDelegate: NSObject { 12 | private let zoomInteractiveTransition: ZoomInteractiveTransition = .init() 13 | private let zoomPopGestureRecognizer: UIScreenEdgePanGestureRecognizer = .init() 14 | } 15 | 16 | 17 | // MARK: - UINavigationControllerDelegate 18 | 19 | extension ZoomNavigationControllerDelegate: UINavigationControllerDelegate { 20 | public func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) { 21 | if zoomPopGestureRecognizer.delegate !== zoomInteractiveTransition { 22 | zoomPopGestureRecognizer.delegate = zoomInteractiveTransition 23 | zoomPopGestureRecognizer.addTarget(zoomInteractiveTransition, action: #selector(ZoomInteractiveTransition.handle(recognizer:))) 24 | zoomPopGestureRecognizer.edges = .left 25 | navigationController.view.addGestureRecognizer(zoomPopGestureRecognizer) 26 | zoomInteractiveTransition.zoomPopGestureRecognizer = zoomPopGestureRecognizer 27 | } 28 | 29 | if let interactivePopGestureRecognizer = navigationController.interactivePopGestureRecognizer, interactivePopGestureRecognizer.delegate !== zoomInteractiveTransition { 30 | zoomInteractiveTransition.navigationController = navigationController 31 | interactivePopGestureRecognizer.delegate = zoomInteractiveTransition 32 | } 33 | } 34 | 35 | public func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 36 | return zoomInteractiveTransition.interactionController 37 | } 38 | 39 | public func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 40 | 41 | if let source = fromVC as? ZoomTransitionSourceDelegate, let destination = toVC as? ZoomTransitionDestinationDelegate, operation == .push { 42 | return ZoomTransitioning(source: source, destination: destination, forward: true) 43 | } else if let source = toVC as? ZoomTransitionSourceDelegate, let destination = fromVC as? ZoomTransitionDestinationDelegate, operation == .pop { 44 | return ZoomTransitioning(source: source, destination: destination, forward: false) 45 | } 46 | return nil 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ZoomTransitioning/ZoomTransitionDestinationDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomTransitionDestinationDelegate.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/12/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol ZoomTransitionDestinationDelegate { 12 | func transitionDestinationImageViewFrame(forward: Bool) -> CGRect 13 | func transitionDestinationWillBegin() 14 | func transitionDestinationDidEnd(transitioningImageView imageView: UIImageView) 15 | func transitionDestinationDidCancel() 16 | } 17 | 18 | public extension ZoomTransitionDestinationDelegate { 19 | func transitionDestinationWillBegin() {} 20 | func transitionDestinationDidEnd(transitioningImageView imageView: UIImageView) {} 21 | func transitionDestinationDidCancel() {} 22 | } 23 | -------------------------------------------------------------------------------- /ZoomTransitioning/ZoomTransitionSourceDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomTransitionSourceDelegate.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/12/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol ZoomTransitionSourceDelegate { 12 | var animationDuration: TimeInterval { get } 13 | func transitionSourceImageView() -> UIImageView 14 | func transitionSourceImageViewFrame(forward: Bool) -> CGRect 15 | func transitionSourceWillBegin() 16 | func transitionSourceDidEnd() 17 | func transitionSourceDidCancel() 18 | func zoomAnimation(animations: @escaping () -> Void, completion: ((Bool) -> Void)?) 19 | } 20 | 21 | extension ZoomTransitionSourceDelegate { 22 | var animationDuration: TimeInterval { return 0.3 } 23 | func transitionSourceWillBegin() {} 24 | func transitionSourceDidEnd() {} 25 | func transitionSourceDidCancel() {} 26 | func zoomAnimation(animations: @escaping () -> Void, completion: ((Bool) -> Void)? = nil) { 27 | UIView.animate(withDuration: animationDuration, delay: 0, options: .curveEaseInOut, animations: animations, completion: completion) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ZoomTransitioning/ZoomTransitioning.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomTransitioning.h 3 | // ZoomTransitioning 4 | // 5 | // Created by shoji on 7/19/16. 6 | // Copyright © 2016 com.shoji. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ZoomTransitioning. 12 | FOUNDATION_EXPORT double ZoomTransitioningVersionNumber; 13 | 14 | //! Project version string for ZoomTransitioning. 15 | FOUNDATION_EXPORT const unsigned char ZoomTransitioningVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /ZoomTransitioning/ZoomTransitioning.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZoomTransitioning.swift 3 | // ZoomTransitioning 4 | // 5 | // Created by WorldDownTown on 07/08/2016. 6 | // Copyright © 2016 WorldDownTown. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public final class ZoomTransitioning: NSObject { 12 | static let transitionDuration: TimeInterval = 0.3 13 | private let source: ZoomTransitionSourceDelegate 14 | private let destination: ZoomTransitionDestinationDelegate 15 | private let forward: Bool 16 | 17 | required public init(source: ZoomTransitionSourceDelegate, destination: ZoomTransitionDestinationDelegate, forward: Bool) { 18 | self.source = source 19 | self.destination = destination 20 | self.forward = forward 21 | 22 | super.init() 23 | } 24 | } 25 | 26 | 27 | // MARK: - UIViewControllerAnimatedTransitioning { 28 | 29 | extension ZoomTransitioning: UIViewControllerAnimatedTransitioning { 30 | public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 31 | return source.animationDuration 32 | } 33 | 34 | public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 35 | if forward { 36 | animateTransitionForPush(transitionContext) 37 | } else { 38 | animateTransitionForPop(transitionContext) 39 | } 40 | } 41 | 42 | private func animateTransitionForPush(_ transitionContext: UIViewControllerContextTransitioning) { 43 | guard let sourceView = transitionContext.view(forKey: UITransitionContextViewKey.from), 44 | let destinationView = transitionContext.view(forKey: UITransitionContextViewKey.to) else { 45 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 46 | return 47 | } 48 | 49 | let containerView: UIView = transitionContext.containerView 50 | let transitioningImageView: UIImageView = transitioningPushImageView() 51 | 52 | containerView.backgroundColor = sourceView.backgroundColor 53 | sourceView.alpha = 1 54 | destinationView.alpha = 0 55 | 56 | containerView.insertSubview(destinationView, belowSubview: sourceView) 57 | containerView.addSubview(transitioningImageView) 58 | 59 | source.transitionSourceWillBegin() 60 | destination.transitionDestinationWillBegin() 61 | 62 | source.zoomAnimation( 63 | animations: { 64 | sourceView.alpha = 0 65 | destinationView.alpha = 1 66 | transitioningImageView.frame = self.destination.transitionDestinationImageViewFrame(forward: self.forward) 67 | }, 68 | completion: { _ in 69 | sourceView.alpha = 1 70 | transitioningImageView.alpha = 0 71 | transitioningImageView.removeFromSuperview() 72 | 73 | self.source.transitionSourceDidEnd() 74 | self.destination.transitionDestinationDidEnd(transitioningImageView: transitioningImageView) 75 | 76 | let completed: Bool = !transitionContext.transitionWasCancelled 77 | transitionContext.completeTransition(completed) 78 | }) 79 | } 80 | 81 | private func animateTransitionForPop(_ transitionContext: UIViewControllerContextTransitioning) { 82 | guard let sourceView = transitionContext.view(forKey: UITransitionContextViewKey.to), 83 | let destinationView = transitionContext.view(forKey: UITransitionContextViewKey.from) else { 84 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 85 | return 86 | } 87 | 88 | let containerView: UIView = transitionContext.containerView 89 | let transitioningImageView: UIImageView = transitioningPopImageView() 90 | 91 | containerView.backgroundColor = destinationView.backgroundColor 92 | destinationView.alpha = 1 93 | sourceView.alpha = 0 94 | 95 | containerView.insertSubview(sourceView, belowSubview: destinationView) 96 | containerView.addSubview(transitioningImageView) 97 | 98 | source.transitionSourceWillBegin() 99 | destination.transitionDestinationWillBegin() 100 | 101 | if transitioningImageView.frame.maxY < 0 { 102 | transitioningImageView.frame.origin.y = -transitioningImageView.frame.height 103 | } 104 | source.zoomAnimation( 105 | animations: { 106 | destinationView.alpha = 0 107 | sourceView.alpha = 1 108 | transitioningImageView.frame = self.source.transitionSourceImageViewFrame(forward: self.forward) 109 | }, 110 | completion: { _ in 111 | destinationView.alpha = 1 112 | transitioningImageView.removeFromSuperview() 113 | 114 | self.source.transitionSourceDidEnd() 115 | self.destination.transitionDestinationDidEnd(transitioningImageView: transitioningImageView) 116 | 117 | let completed: Bool 118 | if #available(iOS 10.0, *) { 119 | completed = true 120 | } else { 121 | completed = !transitionContext.transitionWasCancelled 122 | } 123 | transitionContext.completeTransition(completed) 124 | }) 125 | } 126 | 127 | private func transitioningPushImageView() -> UIImageView { 128 | let imageView: UIImageView = source.transitionSourceImageView() 129 | let frame: CGRect = source.transitionSourceImageViewFrame(forward: forward) 130 | return UIImageView(baseImageView: imageView, frame: frame) 131 | } 132 | 133 | private func transitioningPopImageView() -> UIImageView { 134 | let imageView: UIImageView = source.transitionSourceImageView() 135 | let frame: CGRect = destination.transitionDestinationImageViewFrame(forward: forward) 136 | return UIImageView(baseImageView: imageView, frame: frame) 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorldDownTown/ZoomTransitioning/2dc31dd16205969dee684f8cf2616c0c15463178/images/demo.gif --------------------------------------------------------------------------------