Skip to content

Commit

Permalink
Merge pull request #40 from Raizlabs/develop
Browse files Browse the repository at this point in the history
version 1.2
  • Loading branch information
mr-fixit committed Dec 1, 2015
2 parents e501dbf + 6ce57c8 commit 95b0cb2
Show file tree
Hide file tree
Showing 47 changed files with 1,472 additions and 235 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: objective-c
osx_image: xcode7.1
before_install:
- rake install
script:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
59 changes: 55 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@

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

Copy and add all of the files in the `RZTransitions` directory (and its subdirectories) into your project.

## Setting a New Default Transition

<p align="right">Swift</p>
```Swift
RZTransitionsManager.shared().defaultPresentDismissAnimationController = RZZoomAlphaAnimationController()
RZTransitionsManager.shared().defaultPushPopAnimationController = RZCardSlideAnimationController()
```

<p align="right">Objective C</p>
```objective-c
id<RZAnimationControllerProtocol> presentDismissAnimationController = [[RZZoomAlphaAnimationController alloc] init];
id<RZAnimationControllerProtocol> pushPopAnimationController = [[RZCardSlideAnimationController alloc] init];
Expand All @@ -38,6 +45,14 @@ id<RZAnimationControllerProtocol> pushPopAnimationController = [[RZCardSlideAnim
When Presenting a View Controller
<p align="right">Swift</p>
```Swift
self.transitioningDelegate = RZTransitionsManager.shared()
let nextViewController = UIViewController()
nextViewController.transitioningDelegate = RZTransitionsManager.shared()
self.presentViewController(nextViewController, animated:true) {}
```
<p align="right">Objective C</p>
```objective-c
[self setTransitioningDelegate:[RZTransitionsManager shared]];
UIViewController *nextViewController = [[UIViewController alloc] init];
Expand All @@ -47,13 +62,27 @@ UIViewController *nextViewController = [[UIViewController alloc] init];
When creating a Navigation Controller ( **or** use RZTransitionsNavigationController )
<p align="right">Swift</p>
```Swift
let navigationController = UINavigationController()
navigationController.delegate = RZTransitionsManager.shared()
```
<p align="right">Objective C</p>
```objective-c
UINavigationController *navigationController = [[UINavigationController alloc] init];
[navigationController setDelegate:[RZTransitionsManager shared]];
```
## Specifying Transitions for Specific View Controllers
<p align="right">Swift</p>
```Swift
RZTransitionsManager.shared().setAnimationController( RZZoomPushAnimationController(),
fromViewController:self.dynamicType,
toViewController:RZSimpleCollectionViewController.self,
forAction:.PushPop)
```
<p align="right">Objective C</p>
```objective-c
// Use the RZZoomPushAnimationController when pushing from this view controller to a
// RZSimpleCollectionViewController or popping from a RZSimpleCollectionViewController to
Expand All @@ -66,6 +95,28 @@ UINavigationController *navigationController = [[UINavigationController alloc] i
## Hooking up Interactors
<p align="right">Swift</p>
```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)
}
```
<p align="right">Objective C</p>
```objective-c
@property (nonatomic, strong) id<RZTransitionInteractionController> presentInteractionController;

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
Binary file added RZTransitions-Demo/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 95b0cb2

Please sign in to comment.