diff --git a/.travis.yml b/.travis.yml index 7ca3775..b34938b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: objective-c +osx_image: xcode7.1 before_install: - rake install script: diff --git a/LICENSE b/LICENSE index af43243..fb59b36 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Raizlabs and other contributors +Copyright (c) 2015 Raizlabs and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index f41ad05..d995f36 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ Add the following to your Podfile: -`pod 'RZTransitions', '~> 1.0'` +`pod 'RZTransitions'` -RZTransitions follows semantic versioning conventions. Check the [releases page](https://github.com/Raizlabs/RZTransitions/releases) for the latest updates and version history. +RZTransitions follows semantic versioning conventions. Check the [releases page](https://github.com/Raizlabs/RZTransitions/releases) for the latest updates and version history. ### Manual Installation @@ -29,6 +29,13 @@ Copy and add all of the files in the `RZTransitions` directory (and its subdirec ## Setting a New Default Transition +

Swift

+```Swift +RZTransitionsManager.shared().defaultPresentDismissAnimationController = RZZoomAlphaAnimationController() +RZTransitionsManager.shared().defaultPushPopAnimationController = RZCardSlideAnimationController() +``` + +

Objective C

```objective-c id presentDismissAnimationController = [[RZZoomAlphaAnimationController alloc] init]; id pushPopAnimationController = [[RZCardSlideAnimationController alloc] init]; @@ -38,6 +45,14 @@ id pushPopAnimationController = [[RZCardSlideAnim When Presenting a View Controller +

Swift

+```Swift +self.transitioningDelegate = RZTransitionsManager.shared() +let nextViewController = UIViewController() +nextViewController.transitioningDelegate = RZTransitionsManager.shared() +self.presentViewController(nextViewController, animated:true) {} +``` +

Objective C

```objective-c [self setTransitioningDelegate:[RZTransitionsManager shared]]; UIViewController *nextViewController = [[UIViewController alloc] init]; @@ -47,6 +62,12 @@ UIViewController *nextViewController = [[UIViewController alloc] init]; When creating a Navigation Controller ( **or** use RZTransitionsNavigationController ) +

Swift

+```Swift +let navigationController = UINavigationController() +navigationController.delegate = RZTransitionsManager.shared() +``` +

Objective C

```objective-c UINavigationController *navigationController = [[UINavigationController alloc] init]; [navigationController setDelegate:[RZTransitionsManager shared]]; @@ -54,6 +75,14 @@ UINavigationController *navigationController = [[UINavigationController alloc] i ## Specifying Transitions for Specific View Controllers +

Swift

+```Swift +RZTransitionsManager.shared().setAnimationController( RZZoomPushAnimationController(), + fromViewController:self.dynamicType, + toViewController:RZSimpleCollectionViewController.self, + forAction:.PushPop) +``` +

Objective C

```objective-c // Use the RZZoomPushAnimationController when pushing from this view controller to a // RZSimpleCollectionViewController or popping from a RZSimpleCollectionViewController to @@ -66,6 +95,28 @@ UINavigationController *navigationController = [[UINavigationController alloc] i ## Hooking up Interactors +

Swift

+```Swift +override func viewDidLoad() { + super.viewDidLoad() + + self.presentInteractionController = RZVerticalSwipeInteractionController() + if let vc = self.presentInteractionController as? RZVerticalSwipeInteractionController { + vc.nextViewControllerDelegate = self + vc.attachViewController(self, withAction:.Present) + } +} + +override func viewWillAppear(animated: Bool) +{ + super.viewWillAppear(animated) + RZTransitionsManager.shared().setInteractionController( self.presentInteractionController, + fromViewController:self.dynamicType, + toViewController:nil, + forAction:.Present) +} +``` +

Objective C

```objective-c @property (nonatomic, strong) id presentInteractionController; @@ -96,7 +147,7 @@ UINavigationController *navigationController = [[UINavigationController alloc] i - A comprehensive library of interaction controllers - Mix and match any animation controller with any interaction controller - A shared instance manager that helps wrap the iOS7 custom transition protocol to expose a friendlier API - + You can use any of the animation controllers or interaction controllers without the RZTransitionsManager and simply use them with the iOS7 custom View Controller transition APIs. ## Maintainers @@ -113,7 +164,7 @@ You can use any of the animation controllers or interaction controllers without ## Contributors -[smbarne](https://github.com/smbarne) ([@smbarne](http://twitter.com/smbarne)) +[smbarne](https://github.com/smbarne) ([@smbarne](http://twitter.com/smbarne)) ## License diff --git a/RZTransitions-Demo/Default-568h@2x.png b/RZTransitions-Demo/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/RZTransitions-Demo/Default-568h@2x.png differ diff --git a/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/project.pbxproj b/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/project.pbxproj index 8387bb7..103c3f9 100644 --- a/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/project.pbxproj +++ b/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 47; objects = { /* Begin PBXBuildFile section */ @@ -45,6 +45,41 @@ 9A0F7CA5195A0B9500271D1D /* RZZoomPushAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C90195A0B9500271D1D /* RZZoomPushAnimationController.m */; }; 9A0F7CA6195A0B9500271D1D /* UIImage+RZTransitionsFastImageBlur.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C93195A0B9500271D1D /* UIImage+RZTransitionsFastImageBlur.m */; }; 9A0F7CA7195A0B9500271D1D /* UIImage+RZTransitionsSnapshotHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C95195A0B9500271D1D /* UIImage+RZTransitionsSnapshotHelpers.m */; }; + E11760241BFFC16A0071800D /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E11760221BFFC16A0071800D /* Launch Screen.xib */; }; + E16E52791C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = E16E52781C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.m */; }; + E16E527B1C0E18AE009751AD /* NSObject+RZTransitionsViewHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = E16E52781C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.m */; }; + E18786DA1BFB5FB000E51D79 /* UIColor+Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = E18786D91BFB5FB000E51D79 /* UIColor+Random.swift */; }; + E19CA4AA1BF539F4007F3FF5 /* RZTransitionsDemoAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E19CA4A91BF539F4007F3FF5 /* RZTransitionsDemoAppDelegate.swift */; }; + E1A793301BF677BC008D27EE /* RZSimpleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 833E36EC184E5AFF00A0326A /* RZSimpleViewController.xib */; }; + E1A793311BF677BC008D27EE /* RZSimpleColorViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 833E3701184E5DB400A0326A /* RZSimpleColorViewController.xib */; }; + E1A793321BF677BC008D27EE /* RZSimpleCollectionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 837D08C11859000F00E20B37 /* RZSimpleCollectionViewController.xib */; }; + E1A793341BF67ABD008D27EE /* RZTransitionsNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C69195A0B9500271D1D /* RZTransitionsNavigationController.m */; }; + E1A793351BF67B0B008D27EE /* RZTransitionsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C7D195A0B9500271D1D /* RZTransitionsManager.m */; }; + E1A793361BF67B56008D27EE /* RZUniqueTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C6D195A0B9500271D1D /* RZUniqueTransition.m */; }; + E1A793371BF67C90008D27EE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 833E36BF184E29C300A0326A /* Images.xcassets */; }; + E1A793381BF67CA2008D27EE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 833E36B0184E29C300A0326A /* InfoPlist.strings */; }; + E1A793561BF67FA8008D27EE /* RZBaseSwipeInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C70195A0B9500271D1D /* RZBaseSwipeInteractionController.m */; }; + E1A793571BF67FA8008D27EE /* RZHorizontalInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C72195A0B9500271D1D /* RZHorizontalInteractionController.m */; }; + E1A793581BF67FA8008D27EE /* RZOverscrollInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C74195A0B9500271D1D /* RZOverscrollInteractionController.m */; }; + E1A793591BF67FA8008D27EE /* RZPinchInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C76195A0B9500271D1D /* RZPinchInteractionController.m */; }; + E1A7935A1BF67FA8008D27EE /* RZVerticalSwipeInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C7A195A0B9500271D1D /* RZVerticalSwipeInteractionController.m */; }; + E1A7935B1BF67FA8008D27EE /* RZCardSlideAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C81195A0B9500271D1D /* RZCardSlideAnimationController.m */; }; + E1A7935C1BF67FA8008D27EE /* RZCirclePushAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C83195A0B9500271D1D /* RZCirclePushAnimationController.m */; }; + E1A7935D1BF67FA8008D27EE /* RZRectZoomAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C85195A0B9500271D1D /* RZRectZoomAnimationController.m */; }; + E1A7935E1BF67FA8008D27EE /* RZSegmentControlMoveFadeAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C87195A0B9500271D1D /* RZSegmentControlMoveFadeAnimationController.m */; }; + E1A7935F1BF67FA8008D27EE /* RZShrinkZoomAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C89195A0B9500271D1D /* RZShrinkZoomAnimationController.m */; }; + E1A793601BF67FA8008D27EE /* RZZoomAlphaAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C8C195A0B9500271D1D /* RZZoomAlphaAnimationController.m */; }; + E1A793611BF67FA8008D27EE /* RZZoomBlurAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C8E195A0B9500271D1D /* RZZoomBlurAnimationController.m */; }; + E1A793621BF67FA8008D27EE /* RZZoomPushAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C90195A0B9500271D1D /* RZZoomPushAnimationController.m */; }; + E1A793631BF67FA8008D27EE /* UIImage+RZTransitionsFastImageBlur.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C93195A0B9500271D1D /* UIImage+RZTransitionsFastImageBlur.m */; }; + E1A793641BF67FA8008D27EE /* UIImage+RZTransitionsSnapshotHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0F7C95195A0B9500271D1D /* UIImage+RZTransitionsSnapshotHelpers.m */; }; + E1A793681BF6833E008D27EE /* RZSimpleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E74E611BF649B400C00BD2 /* RZSimpleViewController.swift */; }; + E1C37BB41C04FE9E00F2B87D /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = E1C37BB21C04FE9E00F2B87D /* LICENSE */; }; + E1C37BB81C04FF3200F2B87D /* ReadMeSnippets.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1C37BB61C04FEBD00F2B87D /* ReadMeSnippets.swift */; }; + E1C37BBA1C04FFB000F2B87D /* ReadMeSnippets.m in Sources */ = {isa = PBXBuildFile; fileRef = E1C37BB91C04FFB000F2B87D /* ReadMeSnippets.m */; }; + E1EA18F31BFA923600F471EC /* RZSimpleColorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1EA18F21BFA923600F471EC /* RZSimpleColorViewController.swift */; }; + E1EA18F51BFABA4800F471EC /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E1EA18F41BFABA4800F471EC /* Default-568h@2x.png */; }; + E1EA18F71BFABD7400F471EC /* RZSimpleCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1EA18F61BFABD7400F471EC /* RZSimpleCollectionViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -107,18 +142,18 @@ 9A0F7C7D195A0B9500271D1D /* RZTransitionsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZTransitionsManager.m; sourceTree = ""; }; 9A0F7C7F195A0B9500271D1D /* RZAnimationControllerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZAnimationControllerProtocol.h; sourceTree = ""; }; 9A0F7C80195A0B9500271D1D /* RZCardSlideAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZCardSlideAnimationController.h; sourceTree = ""; }; - 9A0F7C81195A0B9500271D1D /* RZCardSlideAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZCardSlideAnimationController.m; sourceTree = ""; }; + 9A0F7C81195A0B9500271D1D /* RZCardSlideAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = RZCardSlideAnimationController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9A0F7C82195A0B9500271D1D /* RZCirclePushAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZCirclePushAnimationController.h; sourceTree = ""; }; - 9A0F7C83195A0B9500271D1D /* RZCirclePushAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZCirclePushAnimationController.m; sourceTree = ""; }; + 9A0F7C83195A0B9500271D1D /* RZCirclePushAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = RZCirclePushAnimationController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9A0F7C84195A0B9500271D1D /* RZRectZoomAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZRectZoomAnimationController.h; sourceTree = ""; }; 9A0F7C85195A0B9500271D1D /* RZRectZoomAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZRectZoomAnimationController.m; sourceTree = ""; }; 9A0F7C86195A0B9500271D1D /* RZSegmentControlMoveFadeAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZSegmentControlMoveFadeAnimationController.h; sourceTree = ""; }; - 9A0F7C87195A0B9500271D1D /* RZSegmentControlMoveFadeAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZSegmentControlMoveFadeAnimationController.m; sourceTree = ""; }; + 9A0F7C87195A0B9500271D1D /* RZSegmentControlMoveFadeAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = RZSegmentControlMoveFadeAnimationController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9A0F7C88195A0B9500271D1D /* RZShrinkZoomAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZShrinkZoomAnimationController.h; sourceTree = ""; }; - 9A0F7C89195A0B9500271D1D /* RZShrinkZoomAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZShrinkZoomAnimationController.m; sourceTree = ""; }; + 9A0F7C89195A0B9500271D1D /* RZShrinkZoomAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = RZShrinkZoomAnimationController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9A0F7C8A195A0B9500271D1D /* RZTransitionsAnimationControllers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZTransitionsAnimationControllers.h; sourceTree = ""; }; 9A0F7C8B195A0B9500271D1D /* RZZoomAlphaAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZZoomAlphaAnimationController.h; sourceTree = ""; }; - 9A0F7C8C195A0B9500271D1D /* RZZoomAlphaAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZZoomAlphaAnimationController.m; sourceTree = ""; }; + 9A0F7C8C195A0B9500271D1D /* RZZoomAlphaAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = RZZoomAlphaAnimationController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 9A0F7C8D195A0B9500271D1D /* RZZoomBlurAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZZoomBlurAnimationController.h; sourceTree = ""; }; 9A0F7C8E195A0B9500271D1D /* RZZoomBlurAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RZZoomBlurAnimationController.m; sourceTree = ""; }; 9A0F7C8F195A0B9500271D1D /* RZZoomPushAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RZZoomPushAnimationController.h; sourceTree = ""; }; @@ -127,6 +162,22 @@ 9A0F7C93195A0B9500271D1D /* UIImage+RZTransitionsFastImageBlur.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RZTransitionsFastImageBlur.m"; sourceTree = ""; }; 9A0F7C94195A0B9500271D1D /* UIImage+RZTransitionsSnapshotHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RZTransitionsSnapshotHelpers.h"; sourceTree = ""; }; 9A0F7C95195A0B9500271D1D /* UIImage+RZTransitionsSnapshotHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RZTransitionsSnapshotHelpers.m"; sourceTree = ""; }; + E11760231BFFC16A0071800D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = "en.lproj/Launch Screen.xib"; sourceTree = ""; }; + E16E52771C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+RZTransitionsViewHelpers.h"; sourceTree = ""; }; + E16E52781C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+RZTransitionsViewHelpers.m"; sourceTree = ""; }; + E18786D91BFB5FB000E51D79 /* UIColor+Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Random.swift"; sourceTree = ""; }; + E19CA4971BF5391A007F3FF5 /* RZTransitions-Demo-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RZTransitions-Demo-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + E19CA4A91BF539F4007F3FF5 /* RZTransitionsDemoAppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RZTransitionsDemoAppDelegate.swift; sourceTree = ""; }; + E1A7932F1BF65348008D27EE /* RZTransitions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RZTransitions.h; sourceTree = ""; }; + E1C37BB21C04FE9E00F2B87D /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + E1C37BB31C04FE9E00F2B87D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + E1C37BB61C04FEBD00F2B87D /* ReadMeSnippets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadMeSnippets.swift; sourceTree = ""; }; + E1C37BB91C04FFB000F2B87D /* ReadMeSnippets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReadMeSnippets.m; sourceTree = ""; }; + E1C37BBB1C0507E700F2B87D /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; + E1E74E611BF649B400C00BD2 /* RZSimpleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RZSimpleViewController.swift; sourceTree = ""; }; + E1EA18F21BFA923600F471EC /* RZSimpleColorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RZSimpleColorViewController.swift; sourceTree = ""; }; + E1EA18F41BFABA4800F471EC /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + E1EA18F61BFABD7400F471EC /* RZSimpleCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RZSimpleCollectionViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -150,12 +201,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + E19CA4941BF5391A007F3FF5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 833E369B184E29C300A0326A = { isa = PBXGroup; children = ( + E1C37BB11C04FE7F00F2B87D /* Documentation */, + E1EA18F41BFABA4800F471EC /* Default-568h@2x.png */, 9A0F7C66195A0B9500271D1D /* RZTransitions */, 833E36AD184E29C300A0326A /* RZTransitions-Demo */, 833E36CC184E29C300A0326A /* RZTransitions-DemoTests */, @@ -169,6 +229,7 @@ children = ( 833E36A4184E29C300A0326A /* RZTransitions-Demo.app */, 833E36C5184E29C300A0326A /* RZTransitions-DemoTests.xctest */, + E19CA4971BF5391A007F3FF5 /* RZTransitions-Demo-Swift.app */, ); name = Products; sourceTree = ""; @@ -204,6 +265,8 @@ 833E36B0184E29C300A0326A /* InfoPlist.strings */, 833E36B3184E29C300A0326A /* main.m */, 833E36B5184E29C300A0326A /* RZTransitions-Demo-Prefix.pch */, + E11760221BFFC16A0071800D /* Launch Screen.xib */, + E1C37BBB1C0507E700F2B87D /* Bridging-Header.h */, ); name = "Supporting Files"; sourceTree = ""; @@ -231,6 +294,7 @@ children = ( 833E36E7184E5A9A00A0326A /* RZTransitionsDemoAppDelegate.h */, 833E36E8184E5A9A00A0326A /* RZTransitionsDemoAppDelegate.m */, + E19CA4A91BF539F4007F3FF5 /* RZTransitionsDemoAppDelegate.swift */, ); path = Application; sourceTree = ""; @@ -250,6 +314,7 @@ children = ( 83855D08185F98E3004DB036 /* UIColor+Random.h */, 83855D09185F98E3004DB036 /* UIColor+Random.m */, + E18786D91BFB5FB000E51D79 /* UIColor+Random.swift */, ); name = Utilities; path = "RZTransitions-Demo/Utilities"; @@ -258,6 +323,7 @@ 9A0F7C66195A0B9500271D1D /* RZTransitions */ = { isa = PBXGroup; children = ( + E1A7932F1BF65348008D27EE /* RZTransitions.h */, 9A0F7C67195A0B9500271D1D /* Components */, 9A0F7C6A195A0B9500271D1D /* Data */, 9A0F7C6E195A0B9500271D1D /* Interactors */, @@ -344,6 +410,8 @@ 9A0F7C91195A0B9500271D1D /* Utilities */ = { isa = PBXGroup; children = ( + E16E52771C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.h */, + E16E52781C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.m */, 9A0F7C92195A0B9500271D1D /* UIImage+RZTransitionsFastImageBlur.h */, 9A0F7C93195A0B9500271D1D /* UIImage+RZTransitionsFastImageBlur.m */, 9A0F7C94195A0B9500271D1D /* UIImage+RZTransitionsSnapshotHelpers.h */, @@ -357,6 +425,7 @@ children = ( 833E36EA184E5AFF00A0326A /* RZSimpleViewController.h */, 833E36EB184E5AFF00A0326A /* RZSimpleViewController.m */, + E1E74E611BF649B400C00BD2 /* RZSimpleViewController.swift */, 833E36EC184E5AFF00A0326A /* RZSimpleViewController.xib */, ); name = "Simple View Controller"; @@ -367,6 +436,7 @@ children = ( 833E36FF184E5DB400A0326A /* RZSimpleColorViewController.h */, 833E3700184E5DB400A0326A /* RZSimpleColorViewController.m */, + E1EA18F21BFA923600F471EC /* RZSimpleColorViewController.swift */, 833E3701184E5DB400A0326A /* RZSimpleColorViewController.xib */, ); name = "Simple Color View Controller"; @@ -378,10 +448,22 @@ 837D08BF1859000F00E20B37 /* RZSimpleCollectionViewController.h */, 837D08C01859000F00E20B37 /* RZSimpleCollectionViewController.m */, 837D08C11859000F00E20B37 /* RZSimpleCollectionViewController.xib */, + E1EA18F61BFABD7400F471EC /* RZSimpleCollectionViewController.swift */, ); name = "Simple Collection View Controller"; sourceTree = ""; }; + E1C37BB11C04FE7F00F2B87D /* Documentation */ = { + isa = PBXGroup; + children = ( + E1C37BB21C04FE9E00F2B87D /* LICENSE */, + E1C37BB31C04FE9E00F2B87D /* README.md */, + E1C37BB61C04FEBD00F2B87D /* ReadMeSnippets.swift */, + E1C37BB91C04FFB000F2B87D /* ReadMeSnippets.m */, + ); + name = Documentation; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -420,6 +502,23 @@ productReference = 833E36C5184E29C300A0326A /* RZTransitions-DemoTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + E19CA4961BF5391A007F3FF5 /* RZTransitions-Demo-Swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = E19CA4A81BF5391A007F3FF5 /* Build configuration list for PBXNativeTarget "RZTransitions-Demo-Swift" */; + buildPhases = ( + E19CA4931BF5391A007F3FF5 /* Sources */, + E19CA4941BF5391A007F3FF5 /* Frameworks */, + E19CA4951BF5391A007F3FF5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "RZTransitions-Demo-Swift"; + productName = "RZTransitions-Demo-Swift"; + productReference = E19CA4971BF5391A007F3FF5 /* RZTransitions-Demo-Swift.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -427,16 +526,20 @@ isa = PBXProject; attributes = { CLASSPREFIX = RZ; - LastUpgradeCheck = 0510; + LastSwiftUpdateCheck = 0710; + LastUpgradeCheck = 0710; ORGANIZATIONNAME = Raizlabs; TargetAttributes = { 833E36C4184E29C300A0326A = { TestTargetID = 833E36A3184E29C300A0326A; }; + E19CA4961BF5391A007F3FF5 = { + CreatedOnToolsVersion = 7.1.1; + }; }; }; buildConfigurationList = 833E369F184E29C300A0326A /* Build configuration list for PBXProject "RZTransitions-Demo" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 6.3"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( @@ -449,6 +552,7 @@ projectRoot = ""; targets = ( 833E36A3184E29C300A0326A /* RZTransitions-Demo */, + E19CA4961BF5391A007F3FF5 /* RZTransitions-Demo-Swift */, 833E36C4184E29C300A0326A /* RZTransitions-DemoTests */, ); }; @@ -461,9 +565,11 @@ files = ( 833E3703184E5DB400A0326A /* RZSimpleColorViewController.xib in Resources */, 833E36EE184E5AFF00A0326A /* RZSimpleViewController.xib in Resources */, + E1C37BB41C04FE9E00F2B87D /* LICENSE in Resources */, 833E36C0184E29C300A0326A /* Images.xcassets in Resources */, 837D08C31859000F00E20B37 /* RZSimpleCollectionViewController.xib in Resources */, 833E36B2184E29C300A0326A /* InfoPlist.strings in Resources */, + E11760241BFFC16A0071800D /* Launch Screen.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -475,6 +581,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + E19CA4951BF5391A007F3FF5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E1A793381BF67CA2008D27EE /* InfoPlist.strings in Resources */, + E1A793371BF67C90008D27EE /* Images.xcassets in Resources */, + E1A793301BF677BC008D27EE /* RZSimpleViewController.xib in Resources */, + E1A793321BF677BC008D27EE /* RZSimpleCollectionViewController.xib in Resources */, + E1A793311BF677BC008D27EE /* RZSimpleColorViewController.xib in Resources */, + E1EA18F51BFABA4800F471EC /* Default-568h@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -495,8 +614,10 @@ 837D08C21859000F00E20B37 /* RZSimpleCollectionViewController.m in Sources */, 833E3702184E5DB400A0326A /* RZSimpleColorViewController.m in Sources */, 9A0F7C9D195A0B9500271D1D /* RZTransitionsManager.m in Sources */, + E16E52791C0E1864009751AD /* NSObject+RZTransitionsViewHelpers.m in Sources */, 9A0F7CA4195A0B9500271D1D /* RZZoomBlurAnimationController.m in Sources */, 9A0F7C9F195A0B9500271D1D /* RZCirclePushAnimationController.m in Sources */, + E1C37BBA1C04FFB000F2B87D /* ReadMeSnippets.m in Sources */, 833E36ED184E5AFF00A0326A /* RZSimpleViewController.m in Sources */, 9A0F7CA2195A0B9500271D1D /* RZShrinkZoomAnimationController.m in Sources */, 833E36B4184E29C300A0326A /* main.m in Sources */, @@ -518,6 +639,38 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + E19CA4931BF5391A007F3FF5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E1A793611BF67FA8008D27EE /* RZZoomBlurAnimationController.m in Sources */, + E1A793591BF67FA8008D27EE /* RZPinchInteractionController.m in Sources */, + E1A793681BF6833E008D27EE /* RZSimpleViewController.swift in Sources */, + E1A7935E1BF67FA8008D27EE /* RZSegmentControlMoveFadeAnimationController.m in Sources */, + E19CA4AA1BF539F4007F3FF5 /* RZTransitionsDemoAppDelegate.swift in Sources */, + E1A7935D1BF67FA8008D27EE /* RZRectZoomAnimationController.m in Sources */, + E1A7935C1BF67FA8008D27EE /* RZCirclePushAnimationController.m in Sources */, + E1A793581BF67FA8008D27EE /* RZOverscrollInteractionController.m in Sources */, + E1EA18F31BFA923600F471EC /* RZSimpleColorViewController.swift in Sources */, + E1A7935A1BF67FA8008D27EE /* RZVerticalSwipeInteractionController.m in Sources */, + E1A7935F1BF67FA8008D27EE /* RZShrinkZoomAnimationController.m in Sources */, + E1A793621BF67FA8008D27EE /* RZZoomPushAnimationController.m in Sources */, + E1A793351BF67B0B008D27EE /* RZTransitionsManager.m in Sources */, + E1A7935B1BF67FA8008D27EE /* RZCardSlideAnimationController.m in Sources */, + E1A793341BF67ABD008D27EE /* RZTransitionsNavigationController.m in Sources */, + E1A793601BF67FA8008D27EE /* RZZoomAlphaAnimationController.m in Sources */, + E18786DA1BFB5FB000E51D79 /* UIColor+Random.swift in Sources */, + E1A793571BF67FA8008D27EE /* RZHorizontalInteractionController.m in Sources */, + E1C37BB81C04FF3200F2B87D /* ReadMeSnippets.swift in Sources */, + E1EA18F71BFABD7400F471EC /* RZSimpleCollectionViewController.swift in Sources */, + E1A793631BF67FA8008D27EE /* UIImage+RZTransitionsFastImageBlur.m in Sources */, + E1A793561BF67FA8008D27EE /* RZBaseSwipeInteractionController.m in Sources */, + E1A793641BF67FA8008D27EE /* UIImage+RZTransitionsSnapshotHelpers.m in Sources */, + E1A793361BF67B56008D27EE /* RZUniqueTransition.m in Sources */, + E16E527B1C0E18AE009751AD /* NSObject+RZTransitionsViewHelpers.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -545,6 +698,14 @@ name = InfoPlist.strings; sourceTree = ""; }; + E11760221BFFC16A0071800D /* Launch Screen.xib */ = { + isa = PBXVariantGroup; + children = ( + E11760231BFFC16A0071800D /* en */, + ); + name = "Launch Screen.xib"; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -562,10 +723,13 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; + CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -583,6 +747,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 7.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_OBJC_BRIDGING_HEADER = ""; + WARNING_CFLAGS = "-Wincomplete-umbrella"; }; name = Debug; }; @@ -600,6 +766,8 @@ CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; + CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -613,8 +781,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 7.0; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_OBJC_BRIDGING_HEADER = ""; VALIDATE_PRODUCT = YES; + WARNING_CFLAGS = "-Wincomplete-umbrella"; }; name = Release; }; @@ -626,7 +797,11 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RZTransitions-Demo/RZTransitions-Demo-Prefix.pch"; INFOPLIST_FILE = "RZTransitions-Demo/RZTransitions-Demo-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.raizlabs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Debug; @@ -639,7 +814,10 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RZTransitions-Demo/RZTransitions-Demo-Prefix.pch"; INFOPLIST_FILE = "RZTransitions-Demo/RZTransitions-Demo-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.raizlabs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Release; @@ -660,6 +838,7 @@ "$(inherited)", ); INFOPLIST_FILE = "RZTransitions-DemoTests/RZTransitions-DemoTests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.raizlabs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; @@ -678,12 +857,62 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "RZTransitions-Demo/RZTransitions-Demo-Prefix.pch"; INFOPLIST_FILE = "RZTransitions-DemoTests/RZTransitions-DemoTests-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.raizlabs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; }; name = Release; }; + E19CA4A61BF5391A007F3FF5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = "RZTransitions-Demo/RZTransitions-Demo-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.raizlabs.RZTransitions-Demo-Swift"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "RZTransitions-Demo/Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E19CA4A71BF5391A007F3FF5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = "RZTransitions-Demo/RZTransitions-Demo-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.raizlabs.RZTransitions-Demo-Swift"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "RZTransitions-Demo/Bridging-Header.h"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -714,6 +943,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + E19CA4A81BF5391A007F3FF5 /* Build configuration list for PBXNativeTarget "RZTransitions-Demo-Swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E19CA4A61BF5391A007F3FF5 /* Debug */, + E19CA4A71BF5391A007F3FF5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 833E369C184E29C300A0326A /* Project object */; diff --git a/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo-Swift.xcscheme b/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo-Swift.xcscheme new file mode 100644 index 0000000..41fa674 --- /dev/null +++ b/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo-Swift.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo.xcscheme b/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo.xcscheme index 0ea017e..eddc115 100644 --- a/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo.xcscheme +++ b/RZTransitions-Demo/RZTransitions-Demo.xcodeproj/xcshareddata/xcschemes/RZTransitions-Demo.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,17 +48,21 @@ ReferencedContainer = "container:RZTransitions-Demo.xcodeproj"> + + - + - + Bool { + + RZTransitionsManager.shared().defaultPresentDismissAnimationController = RZZoomAlphaAnimationController() + RZTransitionsManager.shared().defaultPushPopAnimationController = RZCardSlideAnimationController() + + let rootViewController = RZSimpleViewController() + let rootNavController = RZTransitionsNavigationController(rootViewController: rootViewController) + + window = UIWindow(frame: UIScreen.mainScreen().bounds) + window?.rootViewController = rootNavController + window?.makeKeyAndVisible() + + return true + } +} diff --git a/RZTransitions-Demo/RZTransitions-Demo/Bridging-Header.h b/RZTransitions-Demo/RZTransitions-Demo/Bridging-Header.h new file mode 100644 index 0000000..96044d6 --- /dev/null +++ b/RZTransitions-Demo/RZTransitions-Demo/Bridging-Header.h @@ -0,0 +1,14 @@ +// +// Bridging-Header.h +// RZTransitions-Demo +// +// Created by Eric Slosser on 11/24/15. +// Copyright © 2015 Raizlabs. All rights reserved. +// + +#ifndef Header_h +#define Header_h + +#import "RZTransitions.h" + +#endif /* Header_h */ diff --git a/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/AppIcon.appiconset/Contents.json b/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/AppIcon.appiconset/Contents.json index a396706..118c98f 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/AppIcon.appiconset/Contents.json @@ -5,15 +5,30 @@ "size" : "29x29", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" } ], "info" : { diff --git a/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/Contents.json b/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/LaunchImage.launchimage/Contents.json b/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/LaunchImage.launchimage/Contents.json index c79ebd3..fadb823 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/RZTransitions-Demo/RZTransitions-Demo/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -10,9 +10,9 @@ { "orientation" : "portrait", "idiom" : "iphone", - "subtype" : "retina4", "extent" : "full-screen", "minimum-system-version" : "7.0", + "subtype" : "retina4", "scale" : "2x" } ], diff --git a/RZTransitions-Demo/RZTransitions-Demo/RZTransitions-Demo-Info.plist b/RZTransitions-Demo/RZTransitions-Demo/RZTransitions-Demo-Info.plist index 3712bde..c3fdacd 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/RZTransitions-Demo-Info.plist +++ b/RZTransitions-Demo/RZTransitions-Demo/RZTransitions-Demo-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - com.raizlabs.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -24,6 +24,8 @@ 1.0 LSRequiresIPhoneOS + UILaunchStoryboardName + Launch Screen UIRequiredDeviceCapabilities armv7 diff --git a/RZTransitions-Demo/RZTransitions-Demo/Utilities/UIColor+Random.swift b/RZTransitions-Demo/RZTransitions-Demo/Utilities/UIColor+Random.swift new file mode 100644 index 0000000..5e78be4 --- /dev/null +++ b/RZTransitions-Demo/RZTransitions-Demo/Utilities/UIColor+Random.swift @@ -0,0 +1,38 @@ +// +// UIColor+Random.swift +// RZTransitions-Demo +// +// Created by Eric Slosser on 11/17/15. +// Copyright 2015 Raizlabs and other contributors +// http://raizlabs.com/ +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import UIKit + +extension UIColor { + + public class func randomColor() -> UIColor { + let hue = CGFloat(arc4random_uniform(256)) / 256.0 // 0.0 to 1.0 + let saturation = CGFloat(arc4random_uniform(128)) / 256.0 + 0.5 // 0.5 to 1.0, away from white + let brightness = CGFloat(arc4random_uniform(128)) / 256.0 + 0.5 // 0.5 to 1.0, away from black + return UIColor(hue:hue, saturation:saturation, brightness:brightness, alpha:1.0) + } +} diff --git a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.swift b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.swift new file mode 100644 index 0000000..64c7e27 --- /dev/null +++ b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.swift @@ -0,0 +1,150 @@ + +// RZSimpleCollectionViewController.swift +// RZTransitions-Demo + +// Created by Eric Slosser on 11/16/15. +// Copyright © 2015 Raizlabs and other contributors. +// http://raizlabs.com/ + +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: + +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +import CoreGraphics +import UIKit + +let kRZCollectionViewCellReuseId = "kRZCollectionViewCellReuseId" +let kRZCollectionViewNumCells = 50 +let kRZCollectionViewCellSize: CGFloat = 88 + +@objc(RZSimpleCollectionViewController) +final class RZSimpleCollectionViewController: UIViewController + , UICollectionViewDataSource + , UICollectionViewDelegate + , UIViewControllerTransitioningDelegate + , RZTransitionInteractionControllerDelegate + , RZCirclePushAnimationDelegate + , RZRectZoomAnimationDelegate +{ + @IBOutlet weak var collectionView: UICollectionView? + + var circleTransitionStartPoint: CGPoint = CGPointZero + var transitionCellRect: CGRect = CGRectZero + var presentOverscrollInteractor: RZOverscrollInteractionController? + var presentDismissAnimationController: RZRectZoomAnimationController? + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + } + + override func viewDidLoad() { + super.viewDidLoad() + + collectionView?.registerClass(UICollectionViewCell.self, forCellWithReuseIdentifier:kRZCollectionViewCellReuseId); + +// TODO: Currently the RZOverscrollInteractor will take over the collection view's delegate, meaning that ```didSelectItemAtIndexPath:``` +// will not be forwarded back. RZOverscrollInteractor requires a bit of a rewrite to use KVO instead of delegation to address this. +// self.presentOverscrollInteractor = [[RZOverscrollInteractionController alloc] init]; +// [self.presentOverscrollInteractor attachViewController:self withAction:RZTransitionAction_Present]; +// [self.presentOverscrollInteractor setNextViewControllerDelegate:self]; +// [[RZTransitionsManager shared] setInteractionController:self.presentOverscrollInteractor +// fromViewController:[self class] +// toViewController:nil +// forAction:RZTransitionAction_Present]; + + presentDismissAnimationController = RZRectZoomAnimationController() + presentDismissAnimationController?.rectZoomDelegate = self + + RZTransitionsManager.shared().setAnimationController( presentDismissAnimationController, + fromViewController:self.dynamicType, + forAction:.PresentDismiss ) + + transitioningDelegate = RZTransitionsManager.shared() + } + +// - (void)viewDidAppear:(BOOL)animated +//{ +// [super viewDidAppear:animated]; +// // TODO: ** Cannot set the scroll view delegate and the collection view delegate at the same time ** +// // [self.presentOverscrollInteractor watchScrollView:self.collectionView]; +//} + +//MARK: - New VC Helper Methods + + func newColorVCWithColor(color: UIColor?) -> UIViewController { + let newColorVC = RZSimpleColorViewController(color: color) + newColorVC.transitioningDelegate = RZTransitionsManager.shared() + + // TODO: Hook up next VC's dismiss transition + return newColorVC + } + +//MARK: - UICollectionViewDelegate + + func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath:NSIndexPath) { + guard let cell = collectionView.cellForItemAtIndexPath(indexPath) else { + fatalError("no cell at \(indexPath)") + } + let colorVC = newColorVCWithColor(cell.backgroundColor ?? UIColor.clearColor()) + + circleTransitionStartPoint = collectionView.convertPoint(cell.center, toView:view) + transitionCellRect = collectionView.convertRect(cell.frame, toView:view) + + // Present VC + presentViewController(colorVC, animated:true) {} + } + +//MARK: - UICollectionViewDataSource + + func collectionView(collectionView:UICollectionView, numberOfItemsInSection section:NSInteger) -> NSInteger { + return kRZCollectionViewNumCells + } + + func collectionView(collectionView:UICollectionView, cellForItemAtIndexPath indexPath:NSIndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCellWithReuseIdentifier(kRZCollectionViewCellReuseId, forIndexPath:indexPath) + cell.backgroundColor = UIColor.randomColor() + return cell + } + +//MARK: - RZTransitionInteractionControllerDelegate + + func nextViewControllerForInteractor() -> UIViewController? { + return newColorVCWithColor(nil) + } + +//MARK: - RZRectZoomAnimationDelegate + + func rectZoomPosition() -> CGRect { + return transitionCellRect + } + +//MARK: - RZCirclePushAnimationDelegate + + func circleCenter() -> CGPoint { + return circleTransitionStartPoint; + } + + func circleStartingRadius() -> CGFloat { + return (kRZCollectionViewCellSize / 2.0); + } +} \ No newline at end of file diff --git a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.xib b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.xib index 3e28467..3f6fd80 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.xib +++ b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleCollectionViewController.xib @@ -1,7 +1,8 @@ - + - + + @@ -15,9 +16,8 @@ - + - @@ -34,9 +34,13 @@ - + + + + + + - diff --git a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.swift b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.swift new file mode 100644 index 0000000..91255eb --- /dev/null +++ b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.swift @@ -0,0 +1,68 @@ +// +// RZSimpleColorViewController.swift +// RZTransitions-Demo +// +// Created by Eric Slosser on 11/16/15. +// Copyright © 2015 Raizlabs and other contributors +// http://raizlabs.com/ +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +import Foundation +import UIKit + +@objc(RZSimpleColorViewController) +final class RZSimpleColorViewController: UIViewController +{ + lazy var backgroundColor: UIColor = UIColor.redColor() + + @IBOutlet weak var titleLabel: UILabel? + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + } + + init(color: UIColor?) { + super.init(nibName: nil, bundle: nil) + if (color != nil) { + backgroundColor = color! + } + } + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = backgroundColor + let tapGestureRecognizer = UITapGestureRecognizer(target:self, action:"dismissSelfOnTap:") + view.addGestureRecognizer(tapGestureRecognizer) + } + + //MARK: - Handle Tap Gesture Recognizer + + @objc(dismissSelfOnTap:) + func dismissSelfOnTap(tapGestureRecognizer: UITapGestureRecognizer) { + dismissViewControllerAnimated(true, completion: nil) + } + +} \ No newline at end of file diff --git a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.xib b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.xib index f4f1894..792b9ae 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.xib +++ b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleColorViewController.xib @@ -1,7 +1,7 @@ - + - + @@ -17,7 +17,6 @@ diff --git a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.m b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.m index be22019..cb0440f 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.m +++ b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.m @@ -44,6 +44,7 @@ @interface RZSimpleViewController () @property (nonatomic, strong) id pushPopInteractionController; @property (nonatomic, strong) id presentInteractionController; +@property (nonatomic, strong) id pinchInteractionController; @end @@ -69,7 +70,11 @@ - (void)viewDidLoad self.presentInteractionController = [[RZVerticalSwipeInteractionController alloc] init]; [self.presentInteractionController setNextViewControllerDelegate:self]; [self.presentInteractionController attachViewController:self withAction:RZTransitionAction_Present]; - + + self.pinchInteractionController = [RZPinchInteractionController new]; + [self.pinchInteractionController setNextViewControllerDelegate:self]; + [self.pinchInteractionController attachViewController:self withAction:RZTransitionAction_Present]; + // Setup the push & pop animations as well as a special animation for pushing a // RZSimpleCollectionViewController [[RZTransitionsManager shared] setAnimationController:[[RZCardSlideAnimationController alloc] init] @@ -93,6 +98,10 @@ - (void)viewWillAppear:(BOOL)animated fromViewController:[self class] toViewController:nil forAction:RZTransitionAction_Present]; + [[RZTransitionsManager shared] setInteractionController:self.pinchInteractionController + fromViewController:[self class] + toViewController:nil + forAction:RZTransitionAction_Present]; } #pragma mark - Button Actions @@ -148,6 +157,9 @@ - (UIViewController *)nextViewControllerForInteractor:(id UIViewController { + let newVC = RZSimpleViewController() + newVC.transitioningDelegate = RZTransitionsManager.shared() + return newVC; + } + + func nextSimpleColorViewController() -> UIViewController { + let newColorVC = RZSimpleColorViewController() + newColorVC.transitioningDelegate = RZTransitionsManager.shared() + + // Create a dismiss interaction controller that will be attached to the presented + // view controller to allow for a custom dismissal + let dismissInteractionController = RZVerticalSwipeInteractionController() + dismissInteractionController.attachViewController(newColorVC, withAction:.Dismiss) + RZTransitionsManager.shared().setInteractionController(dismissInteractionController, + fromViewController:self.dynamicType, + toViewController:nil, + forAction:.Dismiss) + return newColorVC + } + + func nextViewControllerForInteractor(interactor: RZTransitionInteractionController) -> UIViewController { + if (interactor is RZVerticalSwipeInteractionController) { + return nextSimpleColorViewController(); + } + else { + return nextSimpleViewController(); + } + } + +} diff --git a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.xib b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.xib index 8aff90d..f5d1700 100644 --- a/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.xib +++ b/RZTransitions-Demo/RZTransitions-Demo/ViewControllers/RZSimpleViewController.xib @@ -1,7 +1,8 @@ - + - + + @@ -19,8 +20,7 @@