Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jesster2k10 authored Jul 27, 2017
1 parent 8e5077b commit d3a9758
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ I made them as classes and you can use it with ease.

**Swift 3 / Swift 4**

``` ruby
pod 'TKSubmitTransition'
```


**Swift 2 & Below**

pod 'TKSubmitTransition'
``` ruby
pod 'TKSubmitTransition', '~> 0.2'
```


## Manually ##
Expand Down Expand Up @@ -91,16 +95,16 @@ Use this to animate your button. Follow the steps in `Delegation` to setup the t

``` swift
func didStartYourLoading() {
btn.startLoadingAnimation()
btn.startLoadingAnimation()
}

func didFinishYourLoading() {
btn.startFinishAnimation {
//Your Transition
let secondVC = SecondViewController()
secondVC.transitioningDelegate = self
self.presentViewController(secondVC, animated: true, completion: nil)
}
btn.startFinishAnimation {
//Your Transition
let secondVC = SecondViewController()
secondVC.transitioningDelegate = self
self.presentViewController(secondVC, animated: true, completion: nil)
}
}

```
Expand All @@ -122,23 +126,27 @@ Please use This for transition animation.

**Swift 3/4**

``` swift
func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return TKFadeInAnimator(transitionDuration: 0.5, startingAlpha: 0.8)
return TKFadeInAnimator(transitionDuration: 0.5, startingAlpha: 0.8)
}

func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return nil
return nil
}
```

**Swift 2 & Below**

``` swift
// MARK: UIViewControllerTransitioningDelegate
func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
let fadeInAnimator = TKFadeInAnimator()
return fadeInAnimator
let fadeInAnimator = TKFadeInAnimator()
return fadeInAnimator
}

func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return nil
return nil
}

```
Expand Down

0 comments on commit d3a9758

Please sign in to comment.