Skip to content

Commit

Permalink
demo project updated with new feature supports delegation pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetkgunay committed May 25, 2017
1 parent 660215e commit a4eed81
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@
isa = PBXGroup;
children = (
C3D309B51EC5F9640080FE73 /* AppDelegate.swift */,
C3D309E31EC5FC620080FE73 /* BaseViewController.swift */,
C3D309B71EC5F9640080FE73 /* ViewController.swift */,
C3D309B91EC5F9640080FE73 /* Main.storyboard */,
C3D309BC1EC5F9640080FE73 /* Assets.xcassets */,
C3D309BE1EC5F9640080FE73 /* LaunchScreen.storyboard */,
C3D309C11EC5F9640080FE73 /* Info.plist */,
C3D309E31EC5FC620080FE73 /* BaseViewController.swift */,
);
path = AKGPushAnimatorTableviewDemo;
sourceTree = "<group>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit
import AKGPushAnimator

class BaseViewController: UIViewController, UINavigationControllerDelegate {
class BaseViewController: UIViewController, UINavigationControllerDelegate {

let pushAnimator = AKGPushAnimator()
let interactionAnimator = AKGInteractionAnimator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import AKGPushAnimator

class ViewController: BaseViewController {

Expand All @@ -15,6 +16,7 @@ class ViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
tableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: "cellId")
pushAnimator.delegate = self
}

override func didReceiveMemoryWarning() {
Expand All @@ -26,6 +28,10 @@ class ViewController: BaseViewController {
navigationController?.delegate = self
}
}

deinit {
pushAnimator.delegate = nil
}
}

extension ViewController : UITableViewDelegate {
Expand Down Expand Up @@ -54,3 +60,18 @@ extension ViewController : UITableViewDataSource {
}
}

extension ViewController : AKGPushAnimatorDelegate {

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

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

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

2 changes: 1 addition & 1 deletion Examples/AKGPushAnimatorTableviewDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ platform :ios, '8.0'
target 'AKGPushAnimatorTableviewDemo' do
use_frameworks!

pod 'AKGPushAnimator', '~> 1.0.4'
pod 'AKGPushAnimator', '~> 1.0.5'

target 'AKGPushAnimatorTableviewDemoTests' do
inherit! :search_paths
Expand Down
8 changes: 4 additions & 4 deletions Examples/AKGPushAnimatorTableviewDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- AKGPushAnimator (1.0.4)
- AKGPushAnimator (1.0.5)

DEPENDENCIES:
- AKGPushAnimator (~> 1.0.4)
- AKGPushAnimator (~> 1.0.5)

SPEC CHECKSUMS:
AKGPushAnimator: d8bb4b710a798603f4c8b5c71be3578f1f1ed708
AKGPushAnimator: 11056d87f7c208db8c5afd6f3cbcd97c7240ff79

PODFILE CHECKSUM: 1a9ca41fd159f3d33bb6dfef8b6d066d7528e902
PODFILE CHECKSUM: 8d46bbaab7e34eb1cf2c97782fd46e67103f15ec

COCOAPODS: 1.2.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Examples/AKGPushAnimatorTableviewDemo/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a4eed81

Please sign in to comment.