Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sa74 authored Mar 14, 2019
1 parent c3c8eeb commit 7c902ed
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ it, simply add the following line to your Podfile:
```ruby
pod 'STCubeTransition'
```
You want to add pod 'STCubeTransition', '~> 1.0' similar to the following to your Podfile:
You want to add pod 'STCubeTransition', '~> 1.4' similar to the following to your Podfile:

```
target 'MyApp' do
pod 'STCubeTransition', '~> 1.0'
pod 'STCubeTransition', '~> 1.4'
use_frameworks!
end
```
Expand All @@ -47,29 +47,26 @@ If you use `Cocoapods`, First of all, import the framework:
import STCubeTransition
```

Then, init `CubeTransition` with delegate as follows,
Then, init `CubeTransition` as follows,

```
let cubeTranstion:CubeTransition = CubeTransition()
cubeTranstion.delegate = self
```

next, perform cube transition between your views as follows,

```
cubeTranstion.translateView(faceView: self.faceView!, // currently visible view
withView: subMenu!, // hidden view that you want to display from this transition
toDirection: direction, // any available CubeTransitionDirection
withDuration: 0.5) // animation duration
cubeTranstion.translateView(faceView!, // currently visible view
toView: subMenu!, // hidden view that you want to display from this transition
direction: direction, // any available CubeTransitionDirection
duration: 0.5) // animation duration
{ (displayView) in
// animation completion callback
}
```

Finally, implement the `CubeTransitionDelegate` optional method if you would like to perform any additional actions,
Finally, use the `Completion` block if you would like to perform any additional actions,

```
func animationDidFinishWithView(displayView: UIView) {
// Do any additional work if required
}
```

Here you go you are all setup for performing cool Cube Transition in you app 👍

Expand Down

0 comments on commit 7c902ed

Please sign in to comment.