Skip to content

Commit

Permalink
read me updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetkgunay committed May 24, 2017
1 parent 6c0ad5f commit 660215e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AKGPushAnimator.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AKGPushAnimator"
s.version = '1.0.4'
s.version = '1.0.5'
s.summary = "Easy to use, Interactive Push Animator like Instagram app"
s.description = <<-DESC
Easily Push and Pop ViewController like Instagram App with Interaction written in pure Swift 3
Expand Down
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class FirstViewController: BaseViewController {

override func viewDidLoad() {
super.viewDidLoad()
pushAnimator.delegate = self
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
Expand All @@ -64,7 +65,30 @@ class FirstViewController: BaseViewController {
super.didReceiveMemoryWarning()
}
}

```

#### Delegation Pattern

```swift

extension FirstViewController: AKGPushAnimatorDelegate {

func beganTransition() {
print("began transition")
}

func cancelledTransition() {
print("cancelled transition")
}

func finishedTransition() {
print("finished transition")
}
}

```

#### Customise Animation with constants

AKGPushAnimator has constants file to easily change animation types:
Expand All @@ -73,6 +97,8 @@ AKGPushAnimator has constants file to easily change animation types:
struct Common {
static let duration = 0.27;
static let dismissPosition : CGFloat = -50;
static let shadowOpacity : Float = 1
static let shadowColor : UIColor = .black
}

struct Push {
Expand Down Expand Up @@ -100,7 +126,7 @@ There are three ways to use AKGPushAnimator in your project:
```ruby
platform :ios, '8.0'
use_frameworks!
pod 'AKGPushAnimator', '~> 1.0.4'
pod 'AKGPushAnimator', '~> 1.0.5'
```

### Installation with Carthage
Expand All @@ -111,7 +137,7 @@ To install with carthage, follow the instruction on [Carthage](https://github.co

#### Cartfile
```
github "ahmetkgunay/AKGPushAnimator" ~> 1.0.4
github "ahmetkgunay/AKGPushAnimator" ~> 1.0.5
```

## Author
Expand Down

0 comments on commit 660215e

Please sign in to comment.