Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamazz committed Oct 31, 2015
1 parent 48598d4 commit 4b43839
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "65E0370518FE6BE200EFA799"
BuildableName = "Demo.app"
BuildableName = "WaveTransition.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
Expand Down Expand Up @@ -43,7 +43,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "65E0370518FE6BE200EFA799"
BuildableName = "Demo.app"
BuildableName = "WaveTransition.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
Expand All @@ -66,7 +66,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "65E0370518FE6BE200EFA799"
BuildableName = "Demo.app"
BuildableName = "WaveTransition.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
Expand All @@ -85,7 +85,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "65E0370518FE6BE200EFA799"
BuildableName = "Demo.app"
BuildableName = "WaveTransition.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Demo.xcodeproj">
</BuildableReference>
Expand Down
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img width="640" height="240" src="assets/logo.png"/>
<img width="420" height="240" src="assets/logo.png"/>
</p>

[![Build Status](https://travis-ci.org/andreamazz/AMWaveTransition.png)](https://travis-ci.org/andreamazz/AMWaveTransition)
Expand All @@ -11,6 +11,12 @@ Custom transition between viewcontrollers holding tableviews. Each cell is anima

Read more about transitions [here](http://andreamazz.github.io/blog/2014/04/19/transitioning/) and UIKit Dynamics [here](http://andreamazz.github.io/blog/2014/05/22/uikit-dynamics/)

<p align="center">
<a href='https://appetize.io/app/r7enynxrtw4740353za6a39d1w' alt='Live demo'>
<img width="50" height="60" src="assets/demo.png"/>
</a>
</p>

###Screenshot

![AMWaveTransition](https://raw.githubusercontent.com/andreamazz/AMWaveTransition/master/assets/screenshot.gif)
Expand Down Expand Up @@ -39,8 +45,7 @@ Implement ```UINavigationControllerDelegate``` and this delegate method:
- (id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
animationControllerForOperation:(UINavigationControllerOperation)operation
fromViewController:(UIViewController*)fromVC
toViewController:(UIViewController*)toVC
{
toViewController:(UIViewController*)toVC {
if (operation != UINavigationControllerOperationNone) {
// Return your preferred transition operation
return [AMWaveTransition transitionWithOperation:operation];
Expand All @@ -50,22 +55,19 @@ Implement ```UINavigationControllerDelegate``` and this delegate method:
```
Remember to set your instance as the navigation delegate:
```objc
- (void)viewDidAppear:(BOOL)animated
{
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.navigationController setDelegate:self];
}

- (void)dealloc
{
- (void)dealloc {
[self.navigationController setDelegate:nil];
}
```

Implement th ```AMWaveTransitioning``` protocol by returning your tableview's visible cells:
```objc
- (NSArray*)visibleCells
{
- (NSArray*)visibleCells {
return [self.tableView visibleCells];
}
```
Expand All @@ -82,14 +84,12 @@ self.interactive = [[AMWaveTransition alloc] init];
```
Attach the gesture recognizer in your `viewDidAppear:` and detach it in the `viewDidDisappear:`:
```objc
- (void)viewDidAppear:(BOOL)animated
{
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.interactive attachInteractiveGestureToNavigationController:self.navigationController];
}

- (void)viewDidDisappear:(BOOL)animated
{
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[self.interactive detachInteractiveGesture];
}
Expand All @@ -100,7 +100,12 @@ If the view controller you are transitioning to has no table view, don't impleme
As you can see in the sample project, the best results are obtained by setting the view and the cells' background to ```clearColor```, and setting a background color or a background image to the navigation controller.

#Author
[Andrea Mazzini](https://twitter.com/theandreamazz)
[Andrea Mazzini](https://twitter.com/theandreamazz). I'm available for freelance work, feel free to contact me.

Want to support the development of [these free libraries](https://cocoapods.org/owners/734)? Buy me a coffee ☕️ via [Paypal](https://www.paypal.me/andreamazzini).

#Contributors
Thanks to [everyone](https://github.com/andreamazz/AMWaveTransition/graphs/contributors) kind enough to submit a pull request.

#MIT License

Expand Down
Binary file added assets/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b43839

Please sign in to comment.