├── ASTransitionExample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── alpersenyurt.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── ASTransitionExample.xcscheme │ └── xcschememanagement.plist ├── ASTransitionExample ├── ASDropBehavior.swift ├── ASDropTransitionAnimator.swift ├── ASResultViewController.swift ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist └── ViewController.swift └── ASTransitionExampleTests ├── ASTransitionExampleTests.swift └── Info.plist /ASTransitionExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 54CFAC491A34F342006B7F57 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CFAC481A34F342006B7F57 /* AppDelegate.swift */; }; 11 | 54CFAC4B1A34F342006B7F57 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CFAC4A1A34F342006B7F57 /* ViewController.swift */; }; 12 | 54CFAC4E1A34F342006B7F57 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 54CFAC4C1A34F342006B7F57 /* Main.storyboard */; }; 13 | 54CFAC501A34F342006B7F57 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 54CFAC4F1A34F342006B7F57 /* Images.xcassets */; }; 14 | 54CFAC531A34F342006B7F57 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 54CFAC511A34F342006B7F57 /* LaunchScreen.xib */; }; 15 | 54CFAC5F1A34F342006B7F57 /* ASTransitionExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CFAC5E1A34F342006B7F57 /* ASTransitionExampleTests.swift */; }; 16 | 54CFAC691A34F40A006B7F57 /* ASDropBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CFAC681A34F40A006B7F57 /* ASDropBehavior.swift */; }; 17 | 54CFAC6B1A34FE48006B7F57 /* ASDropTransitionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CFAC6A1A34FE48006B7F57 /* ASDropTransitionAnimator.swift */; }; 18 | 54CFAC6D1A351024006B7F57 /* ASResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CFAC6C1A351024006B7F57 /* ASResultViewController.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 54CFAC591A34F342006B7F57 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 54CFAC3B1A34F342006B7F57 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 54CFAC421A34F342006B7F57; 27 | remoteInfo = ASTransitionExample; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 54CFAC431A34F342006B7F57 /* ASTransitionExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ASTransitionExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 54CFAC471A34F342006B7F57 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | 54CFAC481A34F342006B7F57 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 35 | 54CFAC4A1A34F342006B7F57 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 36 | 54CFAC4D1A34F342006B7F57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 37 | 54CFAC4F1A34F342006B7F57 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 38 | 54CFAC521A34F342006B7F57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 39 | 54CFAC581A34F342006B7F57 /* ASTransitionExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ASTransitionExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 54CFAC5D1A34F342006B7F57 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 54CFAC5E1A34F342006B7F57 /* ASTransitionExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTransitionExampleTests.swift; sourceTree = ""; }; 42 | 54CFAC681A34F40A006B7F57 /* ASDropBehavior.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ASDropBehavior.swift; sourceTree = ""; }; 43 | 54CFAC6A1A34FE48006B7F57 /* ASDropTransitionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ASDropTransitionAnimator.swift; sourceTree = ""; }; 44 | 54CFAC6C1A351024006B7F57 /* ASResultViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ASResultViewController.swift; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 54CFAC401A34F342006B7F57 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | 54CFAC551A34F342006B7F57 /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXFrameworksBuildPhase section */ 63 | 64 | /* Begin PBXGroup section */ 65 | 54CFAC3A1A34F342006B7F57 = { 66 | isa = PBXGroup; 67 | children = ( 68 | 54CFAC451A34F342006B7F57 /* ASTransitionExample */, 69 | 54CFAC5B1A34F342006B7F57 /* ASTransitionExampleTests */, 70 | 54CFAC441A34F342006B7F57 /* Products */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | 54CFAC441A34F342006B7F57 /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 54CFAC431A34F342006B7F57 /* ASTransitionExample.app */, 78 | 54CFAC581A34F342006B7F57 /* ASTransitionExampleTests.xctest */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 54CFAC451A34F342006B7F57 /* ASTransitionExample */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 54CFAC681A34F40A006B7F57 /* ASDropBehavior.swift */, 87 | 54CFAC6A1A34FE48006B7F57 /* ASDropTransitionAnimator.swift */, 88 | 54CFAC481A34F342006B7F57 /* AppDelegate.swift */, 89 | 54CFAC4A1A34F342006B7F57 /* ViewController.swift */, 90 | 54CFAC6C1A351024006B7F57 /* ASResultViewController.swift */, 91 | 54CFAC4C1A34F342006B7F57 /* Main.storyboard */, 92 | 54CFAC4F1A34F342006B7F57 /* Images.xcassets */, 93 | 54CFAC511A34F342006B7F57 /* LaunchScreen.xib */, 94 | 54CFAC461A34F342006B7F57 /* Supporting Files */, 95 | ); 96 | path = ASTransitionExample; 97 | sourceTree = ""; 98 | }; 99 | 54CFAC461A34F342006B7F57 /* Supporting Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 54CFAC471A34F342006B7F57 /* Info.plist */, 103 | ); 104 | name = "Supporting Files"; 105 | sourceTree = ""; 106 | }; 107 | 54CFAC5B1A34F342006B7F57 /* ASTransitionExampleTests */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 54CFAC5E1A34F342006B7F57 /* ASTransitionExampleTests.swift */, 111 | 54CFAC5C1A34F342006B7F57 /* Supporting Files */, 112 | ); 113 | path = ASTransitionExampleTests; 114 | sourceTree = ""; 115 | }; 116 | 54CFAC5C1A34F342006B7F57 /* Supporting Files */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 54CFAC5D1A34F342006B7F57 /* Info.plist */, 120 | ); 121 | name = "Supporting Files"; 122 | sourceTree = ""; 123 | }; 124 | /* End PBXGroup section */ 125 | 126 | /* Begin PBXNativeTarget section */ 127 | 54CFAC421A34F342006B7F57 /* ASTransitionExample */ = { 128 | isa = PBXNativeTarget; 129 | buildConfigurationList = 54CFAC621A34F342006B7F57 /* Build configuration list for PBXNativeTarget "ASTransitionExample" */; 130 | buildPhases = ( 131 | 54CFAC3F1A34F342006B7F57 /* Sources */, 132 | 54CFAC401A34F342006B7F57 /* Frameworks */, 133 | 54CFAC411A34F342006B7F57 /* Resources */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = ASTransitionExample; 140 | productName = ASTransitionExample; 141 | productReference = 54CFAC431A34F342006B7F57 /* ASTransitionExample.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | 54CFAC571A34F342006B7F57 /* ASTransitionExampleTests */ = { 145 | isa = PBXNativeTarget; 146 | buildConfigurationList = 54CFAC651A34F342006B7F57 /* Build configuration list for PBXNativeTarget "ASTransitionExampleTests" */; 147 | buildPhases = ( 148 | 54CFAC541A34F342006B7F57 /* Sources */, 149 | 54CFAC551A34F342006B7F57 /* Frameworks */, 150 | 54CFAC561A34F342006B7F57 /* Resources */, 151 | ); 152 | buildRules = ( 153 | ); 154 | dependencies = ( 155 | 54CFAC5A1A34F342006B7F57 /* PBXTargetDependency */, 156 | ); 157 | name = ASTransitionExampleTests; 158 | productName = ASTransitionExampleTests; 159 | productReference = 54CFAC581A34F342006B7F57 /* ASTransitionExampleTests.xctest */; 160 | productType = "com.apple.product-type.bundle.unit-test"; 161 | }; 162 | /* End PBXNativeTarget section */ 163 | 164 | /* Begin PBXProject section */ 165 | 54CFAC3B1A34F342006B7F57 /* Project object */ = { 166 | isa = PBXProject; 167 | attributes = { 168 | LastUpgradeCheck = 0610; 169 | ORGANIZATIONNAME = "Alper Senyurt"; 170 | TargetAttributes = { 171 | 54CFAC421A34F342006B7F57 = { 172 | CreatedOnToolsVersion = 6.1; 173 | }; 174 | 54CFAC571A34F342006B7F57 = { 175 | CreatedOnToolsVersion = 6.1; 176 | TestTargetID = 54CFAC421A34F342006B7F57; 177 | }; 178 | }; 179 | }; 180 | buildConfigurationList = 54CFAC3E1A34F342006B7F57 /* Build configuration list for PBXProject "ASTransitionExample" */; 181 | compatibilityVersion = "Xcode 3.2"; 182 | developmentRegion = English; 183 | hasScannedForEncodings = 0; 184 | knownRegions = ( 185 | en, 186 | Base, 187 | ); 188 | mainGroup = 54CFAC3A1A34F342006B7F57; 189 | productRefGroup = 54CFAC441A34F342006B7F57 /* Products */; 190 | projectDirPath = ""; 191 | projectRoot = ""; 192 | targets = ( 193 | 54CFAC421A34F342006B7F57 /* ASTransitionExample */, 194 | 54CFAC571A34F342006B7F57 /* ASTransitionExampleTests */, 195 | ); 196 | }; 197 | /* End PBXProject section */ 198 | 199 | /* Begin PBXResourcesBuildPhase section */ 200 | 54CFAC411A34F342006B7F57 /* Resources */ = { 201 | isa = PBXResourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | 54CFAC4E1A34F342006B7F57 /* Main.storyboard in Resources */, 205 | 54CFAC531A34F342006B7F57 /* LaunchScreen.xib in Resources */, 206 | 54CFAC501A34F342006B7F57 /* Images.xcassets in Resources */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | 54CFAC561A34F342006B7F57 /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXSourcesBuildPhase section */ 220 | 54CFAC3F1A34F342006B7F57 /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 54CFAC6B1A34FE48006B7F57 /* ASDropTransitionAnimator.swift in Sources */, 225 | 54CFAC6D1A351024006B7F57 /* ASResultViewController.swift in Sources */, 226 | 54CFAC691A34F40A006B7F57 /* ASDropBehavior.swift in Sources */, 227 | 54CFAC4B1A34F342006B7F57 /* ViewController.swift in Sources */, 228 | 54CFAC491A34F342006B7F57 /* AppDelegate.swift in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | 54CFAC541A34F342006B7F57 /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | 54CFAC5F1A34F342006B7F57 /* ASTransitionExampleTests.swift in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | /* End PBXSourcesBuildPhase section */ 241 | 242 | /* Begin PBXTargetDependency section */ 243 | 54CFAC5A1A34F342006B7F57 /* PBXTargetDependency */ = { 244 | isa = PBXTargetDependency; 245 | target = 54CFAC421A34F342006B7F57 /* ASTransitionExample */; 246 | targetProxy = 54CFAC591A34F342006B7F57 /* PBXContainerItemProxy */; 247 | }; 248 | /* End PBXTargetDependency section */ 249 | 250 | /* Begin PBXVariantGroup section */ 251 | 54CFAC4C1A34F342006B7F57 /* Main.storyboard */ = { 252 | isa = PBXVariantGroup; 253 | children = ( 254 | 54CFAC4D1A34F342006B7F57 /* Base */, 255 | ); 256 | name = Main.storyboard; 257 | sourceTree = ""; 258 | }; 259 | 54CFAC511A34F342006B7F57 /* LaunchScreen.xib */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | 54CFAC521A34F342006B7F57 /* Base */, 263 | ); 264 | name = LaunchScreen.xib; 265 | sourceTree = ""; 266 | }; 267 | /* End PBXVariantGroup section */ 268 | 269 | /* Begin XCBuildConfiguration section */ 270 | 54CFAC601A34F342006B7F57 /* Debug */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ALWAYS_SEARCH_USER_PATHS = NO; 274 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 275 | CLANG_CXX_LIBRARY = "libc++"; 276 | CLANG_ENABLE_MODULES = YES; 277 | CLANG_ENABLE_OBJC_ARC = YES; 278 | CLANG_WARN_BOOL_CONVERSION = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INT_CONVERSION = YES; 284 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 285 | CLANG_WARN_UNREACHABLE_CODE = YES; 286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 288 | COPY_PHASE_STRIP = NO; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu99; 291 | GCC_DYNAMIC_NO_PIC = NO; 292 | GCC_OPTIMIZATION_LEVEL = 0; 293 | GCC_PREPROCESSOR_DEFINITIONS = ( 294 | "DEBUG=1", 295 | "$(inherited)", 296 | ); 297 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 300 | GCC_WARN_UNDECLARED_SELECTOR = YES; 301 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 302 | GCC_WARN_UNUSED_FUNCTION = YES; 303 | GCC_WARN_UNUSED_VARIABLE = YES; 304 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 305 | MTL_ENABLE_DEBUG_INFO = YES; 306 | ONLY_ACTIVE_ARCH = YES; 307 | SDKROOT = iphoneos; 308 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 309 | }; 310 | name = Debug; 311 | }; 312 | 54CFAC611A34F342006B7F57 /* Release */ = { 313 | isa = XCBuildConfiguration; 314 | buildSettings = { 315 | ALWAYS_SEARCH_USER_PATHS = NO; 316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 317 | CLANG_CXX_LIBRARY = "libc++"; 318 | CLANG_ENABLE_MODULES = YES; 319 | CLANG_ENABLE_OBJC_ARC = YES; 320 | CLANG_WARN_BOOL_CONVERSION = YES; 321 | CLANG_WARN_CONSTANT_CONVERSION = YES; 322 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 323 | CLANG_WARN_EMPTY_BODY = YES; 324 | CLANG_WARN_ENUM_CONVERSION = YES; 325 | CLANG_WARN_INT_CONVERSION = YES; 326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 327 | CLANG_WARN_UNREACHABLE_CODE = YES; 328 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 329 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 330 | COPY_PHASE_STRIP = YES; 331 | ENABLE_NS_ASSERTIONS = NO; 332 | ENABLE_STRICT_OBJC_MSGSEND = YES; 333 | GCC_C_LANGUAGE_STANDARD = gnu99; 334 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 335 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 336 | GCC_WARN_UNDECLARED_SELECTOR = YES; 337 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 338 | GCC_WARN_UNUSED_FUNCTION = YES; 339 | GCC_WARN_UNUSED_VARIABLE = YES; 340 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 341 | MTL_ENABLE_DEBUG_INFO = NO; 342 | SDKROOT = iphoneos; 343 | VALIDATE_PRODUCT = YES; 344 | }; 345 | name = Release; 346 | }; 347 | 54CFAC631A34F342006B7F57 /* Debug */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 351 | INFOPLIST_FILE = ASTransitionExample/Info.plist; 352 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 353 | PRODUCT_NAME = "$(TARGET_NAME)"; 354 | }; 355 | name = Debug; 356 | }; 357 | 54CFAC641A34F342006B7F57 /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 361 | INFOPLIST_FILE = ASTransitionExample/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_NAME = "$(TARGET_NAME)"; 364 | }; 365 | name = Release; 366 | }; 367 | 54CFAC661A34F342006B7F57 /* Debug */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | BUNDLE_LOADER = "$(TEST_HOST)"; 371 | FRAMEWORK_SEARCH_PATHS = ( 372 | "$(SDKROOT)/Developer/Library/Frameworks", 373 | "$(inherited)", 374 | ); 375 | GCC_PREPROCESSOR_DEFINITIONS = ( 376 | "DEBUG=1", 377 | "$(inherited)", 378 | ); 379 | INFOPLIST_FILE = ASTransitionExampleTests/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ASTransitionExample.app/ASTransitionExample"; 383 | }; 384 | name = Debug; 385 | }; 386 | 54CFAC671A34F342006B7F57 /* Release */ = { 387 | isa = XCBuildConfiguration; 388 | buildSettings = { 389 | BUNDLE_LOADER = "$(TEST_HOST)"; 390 | FRAMEWORK_SEARCH_PATHS = ( 391 | "$(SDKROOT)/Developer/Library/Frameworks", 392 | "$(inherited)", 393 | ); 394 | INFOPLIST_FILE = ASTransitionExampleTests/Info.plist; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ASTransitionExample.app/ASTransitionExample"; 398 | }; 399 | name = Release; 400 | }; 401 | /* End XCBuildConfiguration section */ 402 | 403 | /* Begin XCConfigurationList section */ 404 | 54CFAC3E1A34F342006B7F57 /* Build configuration list for PBXProject "ASTransitionExample" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | 54CFAC601A34F342006B7F57 /* Debug */, 408 | 54CFAC611A34F342006B7F57 /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | 54CFAC621A34F342006B7F57 /* Build configuration list for PBXNativeTarget "ASTransitionExample" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | 54CFAC631A34F342006B7F57 /* Debug */, 417 | 54CFAC641A34F342006B7F57 /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | }; 421 | 54CFAC651A34F342006B7F57 /* Build configuration list for PBXNativeTarget "ASTransitionExampleTests" */ = { 422 | isa = XCConfigurationList; 423 | buildConfigurations = ( 424 | 54CFAC661A34F342006B7F57 /* Debug */, 425 | 54CFAC671A34F342006B7F57 /* Release */, 426 | ); 427 | defaultConfigurationIsVisible = 0; 428 | }; 429 | /* End XCConfigurationList section */ 430 | }; 431 | rootObject = 54CFAC3B1A34F342006B7F57 /* Project object */; 432 | } 433 | -------------------------------------------------------------------------------- /ASTransitionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ASTransitionExample.xcodeproj/xcuserdata/alpersenyurt.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 56 | 68 | 69 | 70 | 72 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ASTransitionExample.xcodeproj/xcuserdata/alpersenyurt.xcuserdatad/xcschemes/ASTransitionExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /ASTransitionExample.xcodeproj/xcuserdata/alpersenyurt.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ASTransitionExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 54CFAC421A34F342006B7F57 16 | 17 | primary 18 | 19 | 20 | 54CFAC571A34F342006B7F57 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ASTransitionExample/ASDropBehavior.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ASDropBehavior.swift 3 | // ASTransitionExample 4 | // 5 | // Created by Alper Senyurt on 12/7/14. 6 | // Copyright (c) 2014 Alper Senyurt. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ASDropBehavior: UIDynamicBehavior { 12 | 13 | private let kAngleInDegrees:CGFloat = 100.0 14 | private let kAngularVelocity:CGFloat = -2.9 15 | private let kMagnitude:CGFloat = 4.0 16 | private lazy var animationOptions = UIDynamicItemBehavior() 17 | private lazy var gravityBehavior: UIGravityBehavior = { [unowned self] in 18 | var temporarygravityBehavior = UIGravityBehavior() 19 | temporarygravityBehavior.magnitude = self.kMagnitude 20 | temporarygravityBehavior.angle = (self.kAngleInDegrees * CGFloat(M_PI)) / 180 21 | return temporarygravityBehavior 22 | }() 23 | 24 | 25 | 26 | init(item:UIDynamicItem) { 27 | super.init() 28 | 29 | self.gravityBehavior.addItem(item) 30 | self.animationOptions.addItem(item) 31 | self.animationOptions.addAngularVelocity(kAngularVelocity, forItem: item) 32 | 33 | self.addChildBehavior(self.gravityBehavior) 34 | self.addChildBehavior(self.animationOptions) 35 | 36 | } 37 | 38 | //pragma mark - Public 39 | func removeItem(item:UIDynamicItem) ->Void { 40 | 41 | self.gravityBehavior.removeItem(item) 42 | self.animationOptions.removeItem(item) 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ASTransitionExample/ASDropTransitionAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ASDropTransitionAnimator.swift 3 | // ASTransitionExample 4 | // 5 | // Created by Alper Senyurt on 12/7/14. 6 | // Copyright (c) 2014 Alper Senyurt. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation; 11 | 12 | class ASDropTransitionAnimator: NSObject,UIViewControllerAnimatedTransitioning { 13 | 14 | private let kAnimatedTransitionDuration:NSTimeInterval = 0.5 15 | let yAxisPositionCorrection:CGFloat = 1.0 16 | var presenting:Bool = false 17 | let referenceView:UIView = UIApplication.sharedApplication().windows.first as UIView 18 | private lazy var animator: UIDynamicAnimator = { [unowned self] in 19 | return UIDynamicAnimator(referenceView:self.referenceView) 20 | }() 21 | 22 | func animateTransition(transitionContext: UIViewControllerContextTransitioning) { 23 | 24 | if self.presenting { 25 | self.addingAnimationTransition(transitionContext) 26 | } else { 27 | 28 | self.dismissalPresentation(transitionContext) 29 | } 30 | } 31 | 32 | func transitionDuration(transitionContext: UIViewControllerContextTransitioning) -> NSTimeInterval { 33 | 34 | return kAnimatedTransitionDuration 35 | } 36 | 37 | func addingAnimationTransition(transitionContext:UIViewControllerContextTransitioning){ 38 | 39 | let fromVC = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey) 40 | let toVC = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey) 41 | fromVC!.view.userInteractionEnabled = false; 42 | 43 | transitionContext.containerView().addSubview(toVC!.view) 44 | 45 | let startFrame:CGRect = self.startPresentingFrameFromViewController(fromVC!, toVC: toVC!) 46 | let endFrame:CGRect = self.endPresentingFrameFromViewController(fromVC!, toVC: toVC!) 47 | 48 | toVC!.view.frame = startFrame; 49 | UIView.animateWithDuration(1.0, delay: 0.0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.8, options: .CurveEaseInOut, animations: { toVC!.view.frame = endFrame }, completion: { finished in transitionContext.completeTransition(true) }) 50 | 51 | 52 | } 53 | 54 | func startPresentingFrameFromViewController (fromVC:UIViewController,toVC:UIViewController)->CGRect{ 55 | 56 | var rect = toVC.view.subviews.first!.frame 57 | rect.origin.x = fromVC.view.center.x - (toVC.view.subviews.first!.frame.size.width/2) 58 | rect.origin.y = 0 59 | return rect 60 | 61 | } 62 | func endPresentingFrameFromViewController (fromVC:UIViewController,toVC:UIViewController)->CGRect{ 63 | 64 | var rect = toVC.view.subviews.first!.frame 65 | rect.origin.x = fromVC.view.center.x - (toVC.view.subviews.first!.frame.size.width/2) 66 | rect.origin.y = fromVC.view.center.y - (toVC.view.subviews.first!.frame.size.height/2) * self.yAxisPositionCorrection 67 | return rect 68 | 69 | } 70 | 71 | func dismissalPresentation(transitionContext:UIViewControllerContextTransitioning){ 72 | let fromVC = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey) 73 | let toVC = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey) 74 | toVC!.view.userInteractionEnabled = true; 75 | let dropBehavior = ASDropBehavior(item: fromVC!.view) 76 | self.animator.addBehavior(dropBehavior) 77 | let delayInSeconds = self.transitionDuration(transitionContext) 78 | let popTime:dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, (Int64)(delayInSeconds * Double(NSEC_PER_SEC))) 79 | dispatch_after(popTime, dispatch_get_main_queue()) { () -> Void in 80 | transitionContext.completeTransition(true) 81 | dropBehavior.removeItem(fromVC!.view) 82 | } 83 | 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /ASTransitionExample/ASResultViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ASResultViewController.swift 3 | // ASTransitionExample 4 | // 5 | // Created by Alper Senyurt on 12/8/14. 6 | // Copyright (c) 2014 Alper Senyurt. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ASResultViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | 25 | @IBAction func dismissController(sender: AnyObject) { 26 | 27 | self.presentingViewController?.dismissViewControllerAnimated(true, completion: nil) 28 | } 29 | /* 30 | // MARK: - Navigation 31 | 32 | // In a storyboard-based application, you will often want to do a little preparation before navigation 33 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 34 | // Get the new view controller using segue.destinationViewController. 35 | // Pass the selected object to the new view controller. 36 | } 37 | */ 38 | 39 | } 40 | -------------------------------------------------------------------------------- /ASTransitionExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ASTransitionExample 4 | // 5 | // Created by Alper Senyurt on 12/7/14. 6 | // Copyright (c) 2014 Alper Senyurt. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /ASTransitionExample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ASTransitionExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 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 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /ASTransitionExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ASTransitionExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | alpersenyurt.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ASTransitionExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ASTransitionExample 4 | // 5 | // Created by Alper Senyurt on 12/7/14. 6 | // Copyright (c) 2014 Alper Senyurt. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController,UIViewControllerTransitioningDelegate{ 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 24 | 25 | let detailViewController: ASResultViewController = segue.destinationViewController as ASResultViewController 26 | detailViewController.transitioningDelegate = self; 27 | detailViewController.modalPresentationStyle = .Custom 28 | } 29 | 30 | 31 | func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? { 32 | 33 | var animator = ASDropTransitionAnimator() 34 | animator.presenting = true 35 | return animator; 36 | } 37 | 38 | func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { 39 | 40 | var animator = ASDropTransitionAnimator() 41 | animator.presenting = false 42 | return animator; 43 | } 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /ASTransitionExampleTests/ASTransitionExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ASTransitionExampleTests.swift 3 | // ASTransitionExampleTests 4 | // 5 | // Created by Alper Senyurt on 12/7/14. 6 | // Copyright (c) 2014 Alper Senyurt. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class ASTransitionExampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ASTransitionExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | alpersenyurt.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | --------------------------------------------------------------------------------