├── .gitignore ├── .swift-version ├── AKGPushAnimator.gif ├── AKGPushAnimator.podspec ├── AKGPushAnimator.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── AKGPushAnimator.xcscheme │ └── AKGPushAnimatorKit.xcscheme ├── AKGPushAnimator ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── BaseViewController.swift ├── FirstViewController.swift ├── Info.plist └── SecondViewController.swift ├── AKGPushAnimatorKit ├── AKGPushAnimatorKit.h └── Info.plist ├── AKGPushAnimatorTests ├── AKGPushAnimatorTests.swift └── Info.plist ├── AKGPushAnimatorUITests ├── AKGPushAnimatorUITests.swift └── Info.plist ├── Examples ├── AKGPushAnimatorDemo │ ├── AKGPushAnimator.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── AKGPushAnimator.xcscheme │ ├── AKGPushAnimator │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── BaseViewController.swift │ │ ├── FirstViewController.swift │ │ ├── Info.plist │ │ └── SecondViewController.swift │ ├── AKGPushAnimatorTests │ │ ├── AKGPushAnimatorTests.swift │ │ └── Info.plist │ └── AKGPushAnimatorUITests │ │ ├── AKGPushAnimatorUITests.swift │ │ └── Info.plist └── AKGPushAnimatorTableviewDemo │ ├── AKGPushAnimatorTableviewDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── AKGPushAnimatorTableviewDemo.xcworkspace │ └── contents.xcworkspacedata │ ├── AKGPushAnimatorTableviewDemo │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── BaseViewController.swift │ ├── Info.plist │ └── ViewController.swift │ ├── AKGPushAnimatorTableviewDemoTests │ ├── AKGPushAnimatorTableviewDemoTests.swift │ └── Info.plist │ ├── AKGPushAnimatorTableviewDemoUITests │ ├── AKGPushAnimatorTableviewDemoUITests.swift │ └── Info.plist │ ├── Podfile │ ├── Podfile.lock │ └── Pods │ ├── AKGPushAnimator │ ├── LICENSE │ ├── README.md │ └── Source │ │ ├── AKGInteractionAnimator.swift │ │ ├── AKGPushAnimator.swift │ │ └── AKGPushAnimatorConstants.swift │ ├── Manifest.lock │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── AKGPushAnimator │ ├── AKGPushAnimator-dummy.m │ ├── AKGPushAnimator-prefix.pch │ ├── AKGPushAnimator-umbrella.h │ ├── AKGPushAnimator.modulemap │ ├── AKGPushAnimator.xcconfig │ └── Info.plist │ ├── Pods-AKGPushAnimatorTableviewDemo │ ├── Info.plist │ ├── Pods-AKGPushAnimatorTableviewDemo-acknowledgements.markdown │ ├── Pods-AKGPushAnimatorTableviewDemo-acknowledgements.plist │ ├── Pods-AKGPushAnimatorTableviewDemo-dummy.m │ ├── Pods-AKGPushAnimatorTableviewDemo-frameworks.sh │ ├── Pods-AKGPushAnimatorTableviewDemo-resources.sh │ ├── Pods-AKGPushAnimatorTableviewDemo-umbrella.h │ ├── Pods-AKGPushAnimatorTableviewDemo.debug.xcconfig │ ├── Pods-AKGPushAnimatorTableviewDemo.modulemap │ └── Pods-AKGPushAnimatorTableviewDemo.release.xcconfig │ ├── Pods-AKGPushAnimatorTableviewDemoTests │ ├── Info.plist │ ├── Pods-AKGPushAnimatorTableviewDemoTests-acknowledgements.markdown │ ├── Pods-AKGPushAnimatorTableviewDemoTests-acknowledgements.plist │ ├── Pods-AKGPushAnimatorTableviewDemoTests-dummy.m │ ├── Pods-AKGPushAnimatorTableviewDemoTests-frameworks.sh │ ├── Pods-AKGPushAnimatorTableviewDemoTests-resources.sh │ ├── Pods-AKGPushAnimatorTableviewDemoTests-umbrella.h │ ├── Pods-AKGPushAnimatorTableviewDemoTests.debug.xcconfig │ ├── Pods-AKGPushAnimatorTableviewDemoTests.modulemap │ └── Pods-AKGPushAnimatorTableviewDemoTests.release.xcconfig │ └── Pods-AKGPushAnimatorTableviewDemoUITests │ ├── Info.plist │ ├── Pods-AKGPushAnimatorTableviewDemoUITests-acknowledgements.markdown │ ├── Pods-AKGPushAnimatorTableviewDemoUITests-acknowledgements.plist │ ├── Pods-AKGPushAnimatorTableviewDemoUITests-dummy.m │ ├── Pods-AKGPushAnimatorTableviewDemoUITests-frameworks.sh │ ├── Pods-AKGPushAnimatorTableviewDemoUITests-resources.sh │ ├── Pods-AKGPushAnimatorTableviewDemoUITests-umbrella.h │ ├── Pods-AKGPushAnimatorTableviewDemoUITests.debug.xcconfig │ ├── Pods-AKGPushAnimatorTableviewDemoUITests.modulemap │ └── Pods-AKGPushAnimatorTableviewDemoUITests.release.xcconfig ├── LICENSE ├── README.md └── Source ├── AKGInteractionAnimator.swift ├── AKGPushAnimator.h ├── AKGPushAnimator.swift ├── AKGPushAnimatorConstants.swift └── Info.plist /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /AKGPushAnimator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ahmetkgunay/AKGPushAnimator/2a01c27ab76d445e578aaaa5bd5bcc31968f325f/AKGPushAnimator.gif -------------------------------------------------------------------------------- /AKGPushAnimator.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AKGPushAnimator" 3 | s.version = '1.0.6' 4 | s.summary = "Easy to use, Interactive Push Animator like Instagram app" 5 | s.description = <<-DESC 6 | Easily Push and Pop ViewController like Instagram App with Interaction written in pure Swift 4 7 | DESC 8 | s.homepage = "https://github.com/ahmetkgunay/AKGPushAnimator" 9 | s.license = 'MIT' 10 | s.author = { "Ahmet Kazım Günay" => "ahmetkgunay@gmail.com" } 11 | s.source = { :git => "https://github.com/ahmetkgunay/AKGPushAnimator.git", :tag => s.version.to_s } 12 | s.social_media_url = 'https://twitter.com/ahmtgny' 13 | s.platform = :ios, '8.0' 14 | s.requires_arc = true 15 | 16 | s.source_files = 'Source/*.swift' 17 | end 18 | -------------------------------------------------------------------------------- /AKGPushAnimator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AKGPushAnimator.xcodeproj/xcshareddata/xcschemes/AKGPushAnimator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 44 | 50 | 51 | 52 | 53 | 54 | 60 | 61 | 62 | 63 | 64 | 65 | 76 | 78 | 84 | 85 | 86 | 87 | 88 | 89 | 95 | 97 | 103 | 104 | 105 | 106 | 108 | 109 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /AKGPushAnimator.xcodeproj/xcshareddata/xcschemes/AKGPushAnimatorKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /AKGPushAnimator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /AKGPushAnimator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /AKGPushAnimator/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /AKGPushAnimator/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 53 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /AKGPushAnimator/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BaseViewController: UIViewController, UINavigationControllerDelegate { 12 | 13 | let pushAnimator = AKGPushAnimator() 14 | let interactionAnimator = AKGInteractionAnimator() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | } 19 | 20 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 21 | if operation == .push { 22 | interactionAnimator.attachToViewController(toVC) 23 | } 24 | pushAnimator.isReverseTransition = operation == .pop 25 | return pushAnimator 26 | } 27 | 28 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 29 | return interactionAnimator.transitionInProgress ? interactionAnimator : nil 30 | } 31 | 32 | override func didReceiveMemoryWarning() { 33 | super.didReceiveMemoryWarning() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AKGPushAnimator/FirstViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FirstViewController: BaseViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | pushAnimator.delegate = self 16 | } 17 | 18 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 19 | if segue.identifier == "showSecond" { 20 | navigationController?.delegate = self 21 | } 22 | } 23 | 24 | override func didReceiveMemoryWarning() { 25 | super.didReceiveMemoryWarning() 26 | } 27 | 28 | deinit { 29 | pushAnimator.delegate = nil 30 | } 31 | } 32 | 33 | extension FirstViewController: AKGPushAnimatorDelegate { 34 | 35 | func beganTransition() { 36 | print("began transition") 37 | } 38 | 39 | func cancelledTransition() { 40 | print("cancelled transition") 41 | } 42 | 43 | func finishedTransition() { 44 | print("finished transition") 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /AKGPushAnimator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AKGPushAnimator/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SecondViewController: BaseViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | } 16 | 17 | override func didReceiveMemoryWarning() { 18 | super.didReceiveMemoryWarning() 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /AKGPushAnimatorKit/AKGPushAnimatorKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorKit.h 3 | // AKGPushAnimatorKit 4 | // 5 | // Created by AHMET KAZIM GUNAY on 07/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for AKGPushAnimatorKit. 12 | FOUNDATION_EXPORT double AKGPushAnimatorKitVersionNumber; 13 | 14 | //! Project version string for AKGPushAnimatorKit. 15 | FOUNDATION_EXPORT const unsigned char AKGPushAnimatorKitVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /AKGPushAnimatorKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AKGPushAnimatorTests/AKGPushAnimatorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorTests.swift 3 | // AKGPushAnimatorTests 4 | // 5 | // Created by AHMET KAZIM GUNAY on 07/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import AKGPushAnimator 11 | 12 | class AKGPushAnimatorTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /AKGPushAnimatorTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AKGPushAnimatorUITests/AKGPushAnimatorUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorUITests.swift 3 | // AKGPushAnimatorUITests 4 | // 5 | // Created by AHMET KAZIM GUNAY on 07/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AKGPushAnimatorUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /AKGPushAnimatorUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C31058311EBF3B3400C18F16 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31058301EBF3B3400C18F16 /* AppDelegate.swift */; }; 11 | C31058361EBF3B3400C18F16 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C31058341EBF3B3400C18F16 /* Main.storyboard */; }; 12 | C31058381EBF3B3400C18F16 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C31058371EBF3B3400C18F16 /* Assets.xcassets */; }; 13 | C310583B1EBF3B3400C18F16 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C31058391EBF3B3400C18F16 /* LaunchScreen.storyboard */; }; 14 | C31058461EBF3B3400C18F16 /* AKGPushAnimatorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31058451EBF3B3400C18F16 /* AKGPushAnimatorTests.swift */; }; 15 | C31058511EBF3B3400C18F16 /* AKGPushAnimatorUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31058501EBF3B3400C18F16 /* AKGPushAnimatorUITests.swift */; }; 16 | C31058731EBF3C4800C18F16 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31058701EBF3C4800C18F16 /* BaseViewController.swift */; }; 17 | C31058741EBF3C4800C18F16 /* FirstViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31058711EBF3C4800C18F16 /* FirstViewController.swift */; }; 18 | C31058751EBF3C4800C18F16 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31058721EBF3C4800C18F16 /* SecondViewController.swift */; }; 19 | C3634D4B1F153C1300DDF5B0 /* AKGInteractionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3634D481F153C1300DDF5B0 /* AKGInteractionAnimator.swift */; }; 20 | C3634D4C1F153C1300DDF5B0 /* AKGPushAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3634D491F153C1300DDF5B0 /* AKGPushAnimator.swift */; }; 21 | C3634D4D1F153C1300DDF5B0 /* AKGPushAnimatorConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3634D4A1F153C1300DDF5B0 /* AKGPushAnimatorConstants.swift */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | C31058421EBF3B3400C18F16 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = C31058251EBF3B3400C18F16 /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = C310582C1EBF3B3400C18F16; 30 | remoteInfo = AKGPushAnimator; 31 | }; 32 | C310584D1EBF3B3400C18F16 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = C31058251EBF3B3400C18F16 /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = C310582C1EBF3B3400C18F16; 37 | remoteInfo = AKGPushAnimator; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXCopyFilesBuildPhase section */ 42 | C310586F1EBF3BB500C18F16 /* Embed Frameworks */ = { 43 | isa = PBXCopyFilesBuildPhase; 44 | buildActionMask = 2147483647; 45 | dstPath = ""; 46 | dstSubfolderSpec = 10; 47 | files = ( 48 | ); 49 | name = "Embed Frameworks"; 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXCopyFilesBuildPhase section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | C310582D1EBF3B3400C18F16 /* AKGPushAnimator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AKGPushAnimator.app; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | C31058301EBF3B3400C18F16 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 57 | C31058351EBF3B3400C18F16 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 58 | C31058371EBF3B3400C18F16 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 59 | C310583A1EBF3B3400C18F16 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 60 | C310583C1EBF3B3400C18F16 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | C31058411EBF3B3400C18F16 /* AKGPushAnimatorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AKGPushAnimatorTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | C31058451EBF3B3400C18F16 /* AKGPushAnimatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AKGPushAnimatorTests.swift; sourceTree = ""; }; 63 | C31058471EBF3B3400C18F16 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | C310584C1EBF3B3400C18F16 /* AKGPushAnimatorUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AKGPushAnimatorUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | C31058501EBF3B3400C18F16 /* AKGPushAnimatorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AKGPushAnimatorUITests.swift; sourceTree = ""; }; 66 | C31058521EBF3B3400C18F16 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | C31058651EBF3BB500C18F16 /* AKGPushAnimatorKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AKGPushAnimatorKit.h; sourceTree = ""; }; 68 | C31058661EBF3BB500C18F16 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | C31058701EBF3C4800C18F16 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; 70 | C31058711EBF3C4800C18F16 /* FirstViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstViewController.swift; sourceTree = ""; }; 71 | C31058721EBF3C4800C18F16 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; 72 | C3634D481F153C1300DDF5B0 /* AKGInteractionAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AKGInteractionAnimator.swift; path = ../../../Source/AKGInteractionAnimator.swift; sourceTree = ""; }; 73 | C3634D491F153C1300DDF5B0 /* AKGPushAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AKGPushAnimator.swift; path = ../../../Source/AKGPushAnimator.swift; sourceTree = ""; }; 74 | C3634D4A1F153C1300DDF5B0 /* AKGPushAnimatorConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AKGPushAnimatorConstants.swift; path = ../../../Source/AKGPushAnimatorConstants.swift; sourceTree = ""; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | C310582A1EBF3B3400C18F16 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | C310583E1EBF3B3400C18F16 /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | C31058491EBF3B3400C18F16 /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | /* End PBXFrameworksBuildPhase section */ 100 | 101 | /* Begin PBXGroup section */ 102 | C31058241EBF3B3400C18F16 = { 103 | isa = PBXGroup; 104 | children = ( 105 | C310582F1EBF3B3400C18F16 /* AKGPushAnimator */, 106 | C31058441EBF3B3400C18F16 /* AKGPushAnimatorTests */, 107 | C310584F1EBF3B3400C18F16 /* AKGPushAnimatorUITests */, 108 | C31058641EBF3BB500C18F16 /* AKGPushAnimatorKit */, 109 | C310582E1EBF3B3400C18F16 /* Products */, 110 | ); 111 | sourceTree = ""; 112 | }; 113 | C310582E1EBF3B3400C18F16 /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | C310582D1EBF3B3400C18F16 /* AKGPushAnimator.app */, 117 | C31058411EBF3B3400C18F16 /* AKGPushAnimatorTests.xctest */, 118 | C310584C1EBF3B3400C18F16 /* AKGPushAnimatorUITests.xctest */, 119 | ); 120 | name = Products; 121 | sourceTree = ""; 122 | }; 123 | C310582F1EBF3B3400C18F16 /* AKGPushAnimator */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | C3634D471F153C0800DDF5B0 /* Source */, 127 | C31058701EBF3C4800C18F16 /* BaseViewController.swift */, 128 | C31058711EBF3C4800C18F16 /* FirstViewController.swift */, 129 | C31058721EBF3C4800C18F16 /* SecondViewController.swift */, 130 | C31058301EBF3B3400C18F16 /* AppDelegate.swift */, 131 | C31058341EBF3B3400C18F16 /* Main.storyboard */, 132 | C31058371EBF3B3400C18F16 /* Assets.xcassets */, 133 | C31058391EBF3B3400C18F16 /* LaunchScreen.storyboard */, 134 | C310583C1EBF3B3400C18F16 /* Info.plist */, 135 | ); 136 | path = AKGPushAnimator; 137 | sourceTree = ""; 138 | }; 139 | C31058441EBF3B3400C18F16 /* AKGPushAnimatorTests */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | C31058451EBF3B3400C18F16 /* AKGPushAnimatorTests.swift */, 143 | C31058471EBF3B3400C18F16 /* Info.plist */, 144 | ); 145 | path = AKGPushAnimatorTests; 146 | sourceTree = ""; 147 | }; 148 | C310584F1EBF3B3400C18F16 /* AKGPushAnimatorUITests */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | C31058501EBF3B3400C18F16 /* AKGPushAnimatorUITests.swift */, 152 | C31058521EBF3B3400C18F16 /* Info.plist */, 153 | ); 154 | path = AKGPushAnimatorUITests; 155 | sourceTree = ""; 156 | }; 157 | C31058641EBF3BB500C18F16 /* AKGPushAnimatorKit */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | C31058651EBF3BB500C18F16 /* AKGPushAnimatorKit.h */, 161 | C31058661EBF3BB500C18F16 /* Info.plist */, 162 | ); 163 | path = AKGPushAnimatorKit; 164 | sourceTree = ""; 165 | }; 166 | C3634D471F153C0800DDF5B0 /* Source */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | C3634D481F153C1300DDF5B0 /* AKGInteractionAnimator.swift */, 170 | C3634D491F153C1300DDF5B0 /* AKGPushAnimator.swift */, 171 | C3634D4A1F153C1300DDF5B0 /* AKGPushAnimatorConstants.swift */, 172 | ); 173 | name = Source; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXNativeTarget section */ 179 | C310582C1EBF3B3400C18F16 /* AKGPushAnimator */ = { 180 | isa = PBXNativeTarget; 181 | buildConfigurationList = C31058551EBF3B3400C18F16 /* Build configuration list for PBXNativeTarget "AKGPushAnimator" */; 182 | buildPhases = ( 183 | C31058291EBF3B3400C18F16 /* Sources */, 184 | C310582A1EBF3B3400C18F16 /* Frameworks */, 185 | C310582B1EBF3B3400C18F16 /* Resources */, 186 | C310586F1EBF3BB500C18F16 /* Embed Frameworks */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = AKGPushAnimator; 193 | productName = AKGPushAnimator; 194 | productReference = C310582D1EBF3B3400C18F16 /* AKGPushAnimator.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | C31058401EBF3B3400C18F16 /* AKGPushAnimatorTests */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = C31058581EBF3B3400C18F16 /* Build configuration list for PBXNativeTarget "AKGPushAnimatorTests" */; 200 | buildPhases = ( 201 | C310583D1EBF3B3400C18F16 /* Sources */, 202 | C310583E1EBF3B3400C18F16 /* Frameworks */, 203 | C310583F1EBF3B3400C18F16 /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | C31058431EBF3B3400C18F16 /* PBXTargetDependency */, 209 | ); 210 | name = AKGPushAnimatorTests; 211 | productName = AKGPushAnimatorTests; 212 | productReference = C31058411EBF3B3400C18F16 /* AKGPushAnimatorTests.xctest */; 213 | productType = "com.apple.product-type.bundle.unit-test"; 214 | }; 215 | C310584B1EBF3B3400C18F16 /* AKGPushAnimatorUITests */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = C310585B1EBF3B3400C18F16 /* Build configuration list for PBXNativeTarget "AKGPushAnimatorUITests" */; 218 | buildPhases = ( 219 | C31058481EBF3B3400C18F16 /* Sources */, 220 | C31058491EBF3B3400C18F16 /* Frameworks */, 221 | C310584A1EBF3B3400C18F16 /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | C310584E1EBF3B3400C18F16 /* PBXTargetDependency */, 227 | ); 228 | name = AKGPushAnimatorUITests; 229 | productName = AKGPushAnimatorUITests; 230 | productReference = C310584C1EBF3B3400C18F16 /* AKGPushAnimatorUITests.xctest */; 231 | productType = "com.apple.product-type.bundle.ui-testing"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | C31058251EBF3B3400C18F16 /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | LastSwiftUpdateCheck = 0820; 240 | LastUpgradeCheck = 0820; 241 | ORGANIZATIONNAME = "AHMET KAZIM GUNAY"; 242 | TargetAttributes = { 243 | C310582C1EBF3B3400C18F16 = { 244 | CreatedOnToolsVersion = 8.2.1; 245 | DevelopmentTeam = KUKEJWK3NR; 246 | ProvisioningStyle = Automatic; 247 | }; 248 | C31058401EBF3B3400C18F16 = { 249 | CreatedOnToolsVersion = 8.2.1; 250 | DevelopmentTeam = KUKEJWK3NR; 251 | ProvisioningStyle = Automatic; 252 | TestTargetID = C310582C1EBF3B3400C18F16; 253 | }; 254 | C310584B1EBF3B3400C18F16 = { 255 | CreatedOnToolsVersion = 8.2.1; 256 | DevelopmentTeam = KUKEJWK3NR; 257 | ProvisioningStyle = Automatic; 258 | TestTargetID = C310582C1EBF3B3400C18F16; 259 | }; 260 | }; 261 | }; 262 | buildConfigurationList = C31058281EBF3B3400C18F16 /* Build configuration list for PBXProject "AKGPushAnimator" */; 263 | compatibilityVersion = "Xcode 3.2"; 264 | developmentRegion = English; 265 | hasScannedForEncodings = 0; 266 | knownRegions = ( 267 | en, 268 | Base, 269 | ); 270 | mainGroup = C31058241EBF3B3400C18F16; 271 | productRefGroup = C310582E1EBF3B3400C18F16 /* Products */; 272 | projectDirPath = ""; 273 | projectRoot = ""; 274 | targets = ( 275 | C310582C1EBF3B3400C18F16 /* AKGPushAnimator */, 276 | C31058401EBF3B3400C18F16 /* AKGPushAnimatorTests */, 277 | C310584B1EBF3B3400C18F16 /* AKGPushAnimatorUITests */, 278 | ); 279 | }; 280 | /* End PBXProject section */ 281 | 282 | /* Begin PBXResourcesBuildPhase section */ 283 | C310582B1EBF3B3400C18F16 /* Resources */ = { 284 | isa = PBXResourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | C310583B1EBF3B3400C18F16 /* LaunchScreen.storyboard in Resources */, 288 | C31058381EBF3B3400C18F16 /* Assets.xcassets in Resources */, 289 | C31058361EBF3B3400C18F16 /* Main.storyboard in Resources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | C310583F1EBF3B3400C18F16 /* Resources */ = { 294 | isa = PBXResourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | C310584A1EBF3B3400C18F16 /* Resources */ = { 301 | isa = PBXResourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXResourcesBuildPhase section */ 308 | 309 | /* Begin PBXSourcesBuildPhase section */ 310 | C31058291EBF3B3400C18F16 /* Sources */ = { 311 | isa = PBXSourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | C31058311EBF3B3400C18F16 /* AppDelegate.swift in Sources */, 315 | C31058731EBF3C4800C18F16 /* BaseViewController.swift in Sources */, 316 | C31058751EBF3C4800C18F16 /* SecondViewController.swift in Sources */, 317 | C31058741EBF3C4800C18F16 /* FirstViewController.swift in Sources */, 318 | C3634D4D1F153C1300DDF5B0 /* AKGPushAnimatorConstants.swift in Sources */, 319 | C3634D4C1F153C1300DDF5B0 /* AKGPushAnimator.swift in Sources */, 320 | C3634D4B1F153C1300DDF5B0 /* AKGInteractionAnimator.swift in Sources */, 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | }; 324 | C310583D1EBF3B3400C18F16 /* Sources */ = { 325 | isa = PBXSourcesBuildPhase; 326 | buildActionMask = 2147483647; 327 | files = ( 328 | C31058461EBF3B3400C18F16 /* AKGPushAnimatorTests.swift in Sources */, 329 | ); 330 | runOnlyForDeploymentPostprocessing = 0; 331 | }; 332 | C31058481EBF3B3400C18F16 /* Sources */ = { 333 | isa = PBXSourcesBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | C31058511EBF3B3400C18F16 /* AKGPushAnimatorUITests.swift in Sources */, 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | }; 340 | /* End PBXSourcesBuildPhase section */ 341 | 342 | /* Begin PBXTargetDependency section */ 343 | C31058431EBF3B3400C18F16 /* PBXTargetDependency */ = { 344 | isa = PBXTargetDependency; 345 | target = C310582C1EBF3B3400C18F16 /* AKGPushAnimator */; 346 | targetProxy = C31058421EBF3B3400C18F16 /* PBXContainerItemProxy */; 347 | }; 348 | C310584E1EBF3B3400C18F16 /* PBXTargetDependency */ = { 349 | isa = PBXTargetDependency; 350 | target = C310582C1EBF3B3400C18F16 /* AKGPushAnimator */; 351 | targetProxy = C310584D1EBF3B3400C18F16 /* PBXContainerItemProxy */; 352 | }; 353 | /* End PBXTargetDependency section */ 354 | 355 | /* Begin PBXVariantGroup section */ 356 | C31058341EBF3B3400C18F16 /* Main.storyboard */ = { 357 | isa = PBXVariantGroup; 358 | children = ( 359 | C31058351EBF3B3400C18F16 /* Base */, 360 | ); 361 | name = Main.storyboard; 362 | sourceTree = ""; 363 | }; 364 | C31058391EBF3B3400C18F16 /* LaunchScreen.storyboard */ = { 365 | isa = PBXVariantGroup; 366 | children = ( 367 | C310583A1EBF3B3400C18F16 /* Base */, 368 | ); 369 | name = LaunchScreen.storyboard; 370 | sourceTree = ""; 371 | }; 372 | /* End PBXVariantGroup section */ 373 | 374 | /* Begin XCBuildConfiguration section */ 375 | C31058531EBF3B3400C18F16 /* Debug */ = { 376 | isa = XCBuildConfiguration; 377 | buildSettings = { 378 | ALWAYS_SEARCH_USER_PATHS = NO; 379 | CLANG_ANALYZER_NONNULL = YES; 380 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 381 | CLANG_CXX_LIBRARY = "libc++"; 382 | CLANG_ENABLE_MODULES = YES; 383 | CLANG_ENABLE_OBJC_ARC = YES; 384 | CLANG_WARN_BOOL_CONVERSION = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 387 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INFINITE_RECURSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 393 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 394 | CLANG_WARN_UNREACHABLE_CODE = YES; 395 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 397 | COPY_PHASE_STRIP = NO; 398 | DEBUG_INFORMATION_FORMAT = dwarf; 399 | ENABLE_STRICT_OBJC_MSGSEND = YES; 400 | ENABLE_TESTABILITY = YES; 401 | GCC_C_LANGUAGE_STANDARD = gnu99; 402 | GCC_DYNAMIC_NO_PIC = NO; 403 | GCC_NO_COMMON_BLOCKS = YES; 404 | GCC_OPTIMIZATION_LEVEL = 0; 405 | GCC_PREPROCESSOR_DEFINITIONS = ( 406 | "DEBUG=1", 407 | "$(inherited)", 408 | ); 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 416 | MTL_ENABLE_DEBUG_INFO = YES; 417 | ONLY_ACTIVE_ARCH = YES; 418 | SDKROOT = iphoneos; 419 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 420 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 421 | TARGETED_DEVICE_FAMILY = "1,2"; 422 | }; 423 | name = Debug; 424 | }; 425 | C31058541EBF3B3400C18F16 /* Release */ = { 426 | isa = XCBuildConfiguration; 427 | buildSettings = { 428 | ALWAYS_SEARCH_USER_PATHS = NO; 429 | CLANG_ANALYZER_NONNULL = YES; 430 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 431 | CLANG_CXX_LIBRARY = "libc++"; 432 | CLANG_ENABLE_MODULES = YES; 433 | CLANG_ENABLE_OBJC_ARC = YES; 434 | CLANG_WARN_BOOL_CONVERSION = YES; 435 | CLANG_WARN_CONSTANT_CONVERSION = YES; 436 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 437 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 438 | CLANG_WARN_EMPTY_BODY = YES; 439 | CLANG_WARN_ENUM_CONVERSION = YES; 440 | CLANG_WARN_INFINITE_RECURSION = YES; 441 | CLANG_WARN_INT_CONVERSION = YES; 442 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 443 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 444 | CLANG_WARN_UNREACHABLE_CODE = YES; 445 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 446 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 447 | COPY_PHASE_STRIP = NO; 448 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 449 | ENABLE_NS_ASSERTIONS = NO; 450 | ENABLE_STRICT_OBJC_MSGSEND = YES; 451 | GCC_C_LANGUAGE_STANDARD = gnu99; 452 | GCC_NO_COMMON_BLOCKS = YES; 453 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 454 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 455 | GCC_WARN_UNDECLARED_SELECTOR = YES; 456 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 457 | GCC_WARN_UNUSED_FUNCTION = YES; 458 | GCC_WARN_UNUSED_VARIABLE = YES; 459 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 460 | MTL_ENABLE_DEBUG_INFO = NO; 461 | SDKROOT = iphoneos; 462 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 463 | TARGETED_DEVICE_FAMILY = "1,2"; 464 | VALIDATE_PRODUCT = YES; 465 | }; 466 | name = Release; 467 | }; 468 | C31058561EBF3B3400C18F16 /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 472 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 473 | DEVELOPMENT_TEAM = KUKEJWK3NR; 474 | INFOPLIST_FILE = AKGPushAnimator/Info.plist; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 476 | PRODUCT_BUNDLE_IDENTIFIER = com.ahmetkgunay.AKGPushAnimator; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | SWIFT_VERSION = 3.0; 479 | }; 480 | name = Debug; 481 | }; 482 | C31058571EBF3B3400C18F16 /* Release */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | DEVELOPMENT_TEAM = KUKEJWK3NR; 488 | INFOPLIST_FILE = AKGPushAnimator/Info.plist; 489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 490 | PRODUCT_BUNDLE_IDENTIFIER = com.ahmetkgunay.AKGPushAnimator; 491 | PRODUCT_NAME = "$(TARGET_NAME)"; 492 | SWIFT_VERSION = 3.0; 493 | }; 494 | name = Release; 495 | }; 496 | C31058591EBF3B3400C18F16 /* Debug */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 500 | BUNDLE_LOADER = "$(TEST_HOST)"; 501 | DEVELOPMENT_TEAM = KUKEJWK3NR; 502 | INFOPLIST_FILE = AKGPushAnimatorTests/Info.plist; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 504 | PRODUCT_BUNDLE_IDENTIFIER = com.ahmetkgunay.AKGPushAnimatorTests; 505 | PRODUCT_NAME = "$(TARGET_NAME)"; 506 | SWIFT_VERSION = 3.0; 507 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AKGPushAnimator.app/AKGPushAnimator"; 508 | }; 509 | name = Debug; 510 | }; 511 | C310585A1EBF3B3400C18F16 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 515 | BUNDLE_LOADER = "$(TEST_HOST)"; 516 | DEVELOPMENT_TEAM = KUKEJWK3NR; 517 | INFOPLIST_FILE = AKGPushAnimatorTests/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 519 | PRODUCT_BUNDLE_IDENTIFIER = com.ahmetkgunay.AKGPushAnimatorTests; 520 | PRODUCT_NAME = "$(TARGET_NAME)"; 521 | SWIFT_VERSION = 3.0; 522 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AKGPushAnimator.app/AKGPushAnimator"; 523 | }; 524 | name = Release; 525 | }; 526 | C310585C1EBF3B3400C18F16 /* Debug */ = { 527 | isa = XCBuildConfiguration; 528 | buildSettings = { 529 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 530 | DEVELOPMENT_TEAM = KUKEJWK3NR; 531 | INFOPLIST_FILE = AKGPushAnimatorUITests/Info.plist; 532 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 533 | PRODUCT_BUNDLE_IDENTIFIER = com.ahmetkgunay.AKGPushAnimatorUITests; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | SWIFT_VERSION = 3.0; 536 | TEST_TARGET_NAME = AKGPushAnimator; 537 | }; 538 | name = Debug; 539 | }; 540 | C310585D1EBF3B3400C18F16 /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | buildSettings = { 543 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 544 | DEVELOPMENT_TEAM = KUKEJWK3NR; 545 | INFOPLIST_FILE = AKGPushAnimatorUITests/Info.plist; 546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 547 | PRODUCT_BUNDLE_IDENTIFIER = com.ahmetkgunay.AKGPushAnimatorUITests; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | SWIFT_VERSION = 3.0; 550 | TEST_TARGET_NAME = AKGPushAnimator; 551 | }; 552 | name = Release; 553 | }; 554 | /* End XCBuildConfiguration section */ 555 | 556 | /* Begin XCConfigurationList section */ 557 | C31058281EBF3B3400C18F16 /* Build configuration list for PBXProject "AKGPushAnimator" */ = { 558 | isa = XCConfigurationList; 559 | buildConfigurations = ( 560 | C31058531EBF3B3400C18F16 /* Debug */, 561 | C31058541EBF3B3400C18F16 /* Release */, 562 | ); 563 | defaultConfigurationIsVisible = 0; 564 | defaultConfigurationName = Release; 565 | }; 566 | C31058551EBF3B3400C18F16 /* Build configuration list for PBXNativeTarget "AKGPushAnimator" */ = { 567 | isa = XCConfigurationList; 568 | buildConfigurations = ( 569 | C31058561EBF3B3400C18F16 /* Debug */, 570 | C31058571EBF3B3400C18F16 /* Release */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | C31058581EBF3B3400C18F16 /* Build configuration list for PBXNativeTarget "AKGPushAnimatorTests" */ = { 576 | isa = XCConfigurationList; 577 | buildConfigurations = ( 578 | C31058591EBF3B3400C18F16 /* Debug */, 579 | C310585A1EBF3B3400C18F16 /* Release */, 580 | ); 581 | defaultConfigurationIsVisible = 0; 582 | defaultConfigurationName = Release; 583 | }; 584 | C310585B1EBF3B3400C18F16 /* Build configuration list for PBXNativeTarget "AKGPushAnimatorUITests" */ = { 585 | isa = XCConfigurationList; 586 | buildConfigurations = ( 587 | C310585C1EBF3B3400C18F16 /* Debug */, 588 | C310585D1EBF3B3400C18F16 /* Release */, 589 | ); 590 | defaultConfigurationIsVisible = 0; 591 | defaultConfigurationName = Release; 592 | }; 593 | /* End XCConfigurationList section */ 594 | }; 595 | rootObject = C31058251EBF3B3400C18F16 /* Project object */; 596 | } 597 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator.xcodeproj/xcshareddata/xcschemes/AKGPushAnimator.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 53 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BaseViewController: UIViewController, UINavigationControllerDelegate { 12 | 13 | let pushAnimator = AKGPushAnimator() 14 | let interactionAnimator = AKGInteractionAnimator() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | } 19 | 20 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 21 | if operation == .push { 22 | interactionAnimator.attachToViewController(toVC) 23 | } 24 | pushAnimator.isReverseTransition = operation == .pop 25 | return pushAnimator 26 | } 27 | 28 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 29 | return interactionAnimator.transitionInProgress ? interactionAnimator : nil 30 | } 31 | 32 | override func didReceiveMemoryWarning() { 33 | super.didReceiveMemoryWarning() 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/FirstViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstViewController.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class FirstViewController: BaseViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | pushAnimator.delegate = self 16 | } 17 | 18 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 19 | if segue.identifier == "showSecond" { 20 | navigationController?.delegate = self 21 | } 22 | } 23 | 24 | override func didReceiveMemoryWarning() { 25 | super.didReceiveMemoryWarning() 26 | } 27 | 28 | deinit { 29 | pushAnimator.delegate = nil 30 | } 31 | } 32 | 33 | extension FirstViewController: AKGPushAnimatorDelegate { 34 | 35 | func beganTransition() { 36 | print("began transition") 37 | } 38 | 39 | func finishedTransition() { 40 | print("finished transition") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimator/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SecondViewController: BaseViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | } 16 | 17 | override func didReceiveMemoryWarning() { 18 | super.didReceiveMemoryWarning() 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimatorTests/AKGPushAnimatorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorTests.swift 3 | // AKGPushAnimatorTests 4 | // 5 | // Created by AHMET KAZIM GUNAY on 07/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import AKGPushAnimator 11 | 12 | class AKGPushAnimatorTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimatorTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimatorUITests/AKGPushAnimatorUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorUITests.swift 3 | // AKGPushAnimatorUITests 4 | // 5 | // Created by AHMET KAZIM GUNAY on 07/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AKGPushAnimatorUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorDemo/AKGPushAnimatorUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AKGPushAnimatorTableviewDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 12/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/BaseViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.swift 3 | // AKGPushAnimatorTableviewDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 12/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AKGPushAnimator 11 | 12 | class BaseViewController: UIViewController, UINavigationControllerDelegate { 13 | 14 | let pushAnimator = AKGPushAnimator() 15 | let interactionAnimator = AKGInteractionAnimator() 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | } 20 | 21 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 22 | if operation == .push { 23 | interactionAnimator.attachToViewController(toVC) 24 | } 25 | pushAnimator.isReverseTransition = operation == .pop 26 | return pushAnimator 27 | } 28 | 29 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 30 | return interactionAnimator.transitionInProgress ? interactionAnimator : nil 31 | } 32 | 33 | override func didReceiveMemoryWarning() { 34 | super.didReceiveMemoryWarning() 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AKGPushAnimatorTableviewDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 12/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AKGPushAnimator 11 | 12 | class ViewController: BaseViewController { 13 | 14 | @IBOutlet weak var tableView: UITableView! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | tableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: "cellId") 19 | pushAnimator.delegate = self 20 | } 21 | 22 | override func didReceiveMemoryWarning() { 23 | super.didReceiveMemoryWarning() 24 | } 25 | 26 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 27 | if segue.identifier == "showDetail" { 28 | navigationController?.delegate = self 29 | } 30 | } 31 | 32 | deinit { 33 | pushAnimator.delegate = nil 34 | } 35 | } 36 | 37 | extension ViewController : UITableViewDelegate { 38 | 39 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 40 | return 44.0 41 | } 42 | 43 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 44 | tableView.deselectRow(at: indexPath, animated: true) 45 | performSegue(withIdentifier: "showDetail", sender: nil) 46 | } 47 | } 48 | 49 | extension ViewController : UITableViewDataSource { 50 | 51 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 52 | return 100 53 | } 54 | 55 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 56 | 57 | let cell = tableView.dequeueReusableCell(withIdentifier: "cellId", for: indexPath) 58 | cell.textLabel?.text = "\(indexPath.row + 1)" 59 | return cell 60 | } 61 | } 62 | 63 | extension ViewController : AKGPushAnimatorDelegate { 64 | 65 | func beganTransition() { 66 | print("bagan transition") 67 | } 68 | 69 | func cancelledTransition() { 70 | print("cancelled transition") 71 | } 72 | 73 | func finishedTransition() { 74 | print("finished transition") 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemoTests/AKGPushAnimatorTableviewDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorTableviewDemoTests.swift 3 | // AKGPushAnimatorTableviewDemoTests 4 | // 5 | // Created by AHMET KAZIM GUNAY on 12/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import AKGPushAnimatorTableviewDemo 11 | 12 | class AKGPushAnimatorTableviewDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemoUITests/AKGPushAnimatorTableviewDemoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorTableviewDemoUITests.swift 3 | // AKGPushAnimatorTableviewDemoUITests 4 | // 5 | // Created by AHMET KAZIM GUNAY on 12/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AKGPushAnimatorTableviewDemoUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/AKGPushAnimatorTableviewDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | 3 | target 'AKGPushAnimatorTableviewDemo' do 4 | use_frameworks! 5 | 6 | pod 'AKGPushAnimator', '~> 1.0.5' 7 | 8 | target 'AKGPushAnimatorTableviewDemoTests' do 9 | inherit! :search_paths 10 | # Pods for testing 11 | end 12 | 13 | target 'AKGPushAnimatorTableviewDemoUITests' do 14 | inherit! :search_paths 15 | # Pods for testing 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AKGPushAnimator (1.0.5) 3 | 4 | DEPENDENCIES: 5 | - AKGPushAnimator (~> 1.0.5) 6 | 7 | SPEC CHECKSUMS: 8 | AKGPushAnimator: 11056d87f7c208db8c5afd6f3cbcd97c7240ff79 9 | 10 | PODFILE CHECKSUM: 8d46bbaab7e34eb1cf2c97782fd46e67103f15ec 11 | 12 | COCOAPODS: 1.2.1 13 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/AKGPushAnimator/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Ahmet Günay 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/AKGPushAnimator/README.md: -------------------------------------------------------------------------------- 1 | # AKGPushAnimator 2 | Easily Push and Pop viewcontroller like Instagram App with Interaction written in pure Swift 3 3 | 4 | ![Anim](https://github.com/ahmetkgunay/AKGPushAnimator/blob/master/AKGPushAnimator.gif) 5 | 6 | ## Import Library To Your Class 7 | 8 | If you are using Carthage to install AKGPushAnimator, then you need to import AKGPushAnimatorKit where you want to use. 9 | Because "Carthage" needs Embedded Framework to install libraries, and AKGPushAnimatorKit is the embedded library name of this project. 10 | 11 | If you are using Cocoapods to install AKGPushAnimator, then you need to import AKGPushAnimator where you want to use it. 12 | 13 | ## Usage 14 | 15 | Usage is simple with creating any BaseViewController and implement UINavigationControllerDelegate 16 | 17 | 18 | ```swift 19 | 20 | class BaseViewController: UIViewController, UINavigationControllerDelegate { 21 | 22 | let pushAnimator = AKGPushAnimator() 23 | let interactionAnimator = AKGInteractionAnimator() 24 | 25 | override func viewDidLoad() { 26 | super.viewDidLoad() 27 | } 28 | 29 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 30 | 31 | if operation == .push { 32 | interactionAnimator.attachToViewController(toVC) 33 | } 34 | pushAnimator.isReverseTransition = operation == .pop 35 | return pushAnimator 36 | } 37 | 38 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 39 | 40 | return interactionAnimator.transitionInProgress ? interactionAnimator : nil 41 | } 42 | } 43 | ``` 44 | 45 | After that, create any ViewController inheritted from BaseViewController and set navigationcontroller delegate before pushing viewcontroller (in prepare for segue for best) 46 | 47 | And Thats all! Now you have interactive push and pop animation like Instagram App. 48 | 49 | ```swift 50 | 51 | class FirstViewController: BaseViewController { 52 | 53 | override func viewDidLoad() { 54 | super.viewDidLoad() 55 | } 56 | 57 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 58 | if segue.identifier == "showSecond" { 59 | navigationController?.delegate = self 60 | } 61 | } 62 | 63 | override func didReceiveMemoryWarning() { 64 | super.didReceiveMemoryWarning() 65 | } 66 | } 67 | ``` 68 | #### Customise Animation with constants 69 | 70 | AKGPushAnimator has constants file to easily change animation types: 71 | 72 | ```swift 73 | struct Common { 74 | static let duration = 0.27; 75 | static let dismissPosition : CGFloat = -50; 76 | } 77 | 78 | struct Push { 79 | static let animateOption = UIViewAnimationOptions.curveEaseOut 80 | 81 | } 82 | 83 | struct Pop { 84 | static let animateOption = UIViewAnimationOptions.curveEaseInOut 85 | } 86 | 87 | ``` 88 | ## Installation 89 | 90 | There are three ways to use AKGPushAnimator in your project: 91 | - using CocoaPods 92 | - using Carthage 93 | - by cloning the project into your repository 94 | 95 | ### Installation with CocoaPods 96 | 97 | [CocoaPods](http://cocoapods.org/) is a dependency manager for Swift and Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the [Get Started](http://cocoapods.org/#get_started) section for more details. 98 | 99 | #### Podfile 100 | ```ruby 101 | platform :ios, '8.0' 102 | use_frameworks! 103 | pod 'AKGPushAnimator', '~> 1.0.4' 104 | ``` 105 | 106 | ### Installation with Carthage 107 | 108 | [Carthage](https://github.com/Carthage/Carthage) is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. 109 | 110 | To install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage) 111 | 112 | #### Cartfile 113 | ``` 114 | github "ahmetkgunay/AKGPushAnimator" ~> 1.0.4 115 | ``` 116 | 117 | ## Author 118 | 119 | Ahmet Kazım Günay, ahmetkgunay@gmail.com 120 | 121 | ## License 122 | 123 | AKGPushAnimator is available under the MIT license. See the LICENSE file for more info. 124 | 125 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/AKGPushAnimator/Source/AKGInteractionAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGInteractionAnimator.swift 3 | // AKGPushAnimatorDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class AKGInteractionAnimator: UIPercentDrivenInteractiveTransition { 12 | 13 | var navigationController: UINavigationController! 14 | var shouldCompleteTransition = false 15 | public var transitionInProgress = false 16 | 17 | public func attachToViewController(_ viewController: UIViewController) { 18 | navigationController = viewController.navigationController 19 | addGestureRecognizer(viewController.view) 20 | } 21 | 22 | fileprivate func addGestureRecognizer(_ view: UIView) { 23 | let panGesture = UIPanGestureRecognizer(target: self, action: #selector(AKGInteractionAnimator.handlePanGesture(_:))) 24 | panGesture.delegate = self 25 | view.addGestureRecognizer(panGesture) 26 | } 27 | 28 | func handlePanGesture(_ gestureRecognizer: UIPanGestureRecognizer) { 29 | let viewTranslation = gestureRecognizer.translation(in: gestureRecognizer.view?.superview) 30 | let velocity : CGPoint = gestureRecognizer.velocity(in: gestureRecognizer.view) 31 | 32 | switch gestureRecognizer.state { 33 | case .began: 34 | transitionInProgress = true 35 | navigationController.popViewController(animated: true) 36 | case .changed: 37 | let const = CGFloat(viewTranslation.x / UIScreen.main.bounds.width) 38 | shouldCompleteTransition = const > 0.4 || velocity.x > UIScreen.main.bounds.width 39 | update(const) 40 | case .cancelled, .ended: 41 | transitionInProgress = false 42 | if !shouldCompleteTransition || gestureRecognizer.state == .cancelled { 43 | cancel() 44 | } else { 45 | finish() 46 | } 47 | default: 48 | print("Swift switch must be exhaustive, thus the default") 49 | } 50 | } 51 | } 52 | 53 | extension AKGInteractionAnimator : UIGestureRecognizerDelegate { 54 | 55 | private func gestureRecognizerShouldBegin(_ gestureRecognizer: UIPanGestureRecognizer) -> Bool { 56 | let velocity : CGPoint = gestureRecognizer.velocity(in: gestureRecognizer.view) 57 | return fabs(velocity.x) > fabs(velocity.y) && fabs(velocity.x) > 0; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/AKGPushAnimator/Source/AKGPushAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimator.swift 3 | // AKGPushAnimatorDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol AKGPushAnimatorDelegate { 12 | 13 | @objc optional func beganTransition() 14 | @objc optional func cancelledTransition() 15 | @objc optional func finishedTransition() 16 | } 17 | 18 | public class AKGPushAnimator: NSObject { 19 | 20 | public var isReverseTransition = false 21 | 22 | open var delegate : AKGPushAnimatorDelegate? 23 | 24 | // MARK: Variables with Getters 25 | 26 | var animatorScreenWidth : CGFloat { 27 | get { 28 | return UIScreen.main.bounds.width 29 | } 30 | } 31 | 32 | var animatorScreenHeight : CGFloat { 33 | get { 34 | return UIScreen.main.bounds.height 35 | } 36 | } 37 | 38 | var toViewPushedFrame : CGRect { 39 | get { 40 | return CGRect(x : 0, 41 | y : 0, 42 | width : self.animatorScreenWidth, 43 | height : self.animatorScreenHeight) 44 | } 45 | } 46 | 47 | var fromViewPushedFrame : CGRect { 48 | get { 49 | return CGRect(x : AKGPushAnimatorConstants.Common.dismissPosition, 50 | y : 0, 51 | width : self.animatorScreenWidth, 52 | height : self.animatorScreenHeight) 53 | } 54 | } 55 | 56 | var fromViewPopedFrame : CGRect { 57 | get { 58 | return CGRect(x : self.animatorScreenWidth, 59 | y : 0, 60 | width : self.animatorScreenWidth, 61 | height : self.animatorScreenHeight) 62 | } 63 | } 64 | 65 | var toViewPopedFrame : CGRect { 66 | get { 67 | return CGRect(x : 0, 68 | y : 0, 69 | width : self.animatorScreenWidth, 70 | height : self.animatorScreenHeight) 71 | } 72 | } 73 | 74 | fileprivate func animate(withTransitionContext transitionContext:UIViewControllerContextTransitioning, 75 | toView: UIView, 76 | fromView: UIView, 77 | duration: TimeInterval, 78 | delay: TimeInterval, 79 | options: UIViewAnimationOptions = [], 80 | animations: @escaping () -> Swift.Void) { 81 | 82 | UIView.animate(withDuration: duration, 83 | delay: delay, 84 | options: options, 85 | animations: animations) { (finished) in 86 | 87 | if (transitionContext.transitionWasCancelled) { 88 | toView.removeFromSuperview() 89 | self.delegate?.cancelledTransition?() 90 | } else { 91 | fromView.removeFromSuperview() 92 | self.delegate?.finishedTransition?() 93 | } 94 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 95 | 96 | } 97 | } 98 | 99 | fileprivate func addShadowToView(_ toView:UIView!) -> Swift.Void { 100 | 101 | toView.layer.shadowOpacity = AKGPushAnimatorConstants.Common.shadowOpacity 102 | toView.layer.shadowOffset = CGSize(width:0, height:3) 103 | toView.layer.shadowColor = AKGPushAnimatorConstants.Common.shadowColor.cgColor 104 | let shadowRect: CGRect = toView.bounds.insetBy(dx: 0, dy: 4); // inset top/bottom 105 | toView.layer.shadowPath = UIBezierPath(rect: shadowRect).cgPath 106 | } 107 | } 108 | 109 | extension AKGPushAnimator: UIViewControllerAnimatedTransitioning { 110 | 111 | // MARK: UIViewControllerAnimatedTransitioning 112 | 113 | public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 114 | return AKGPushAnimatorConstants.Common.duration 115 | } 116 | 117 | public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 118 | 119 | let containerView = transitionContext.containerView 120 | 121 | guard let toVC = transitionContext.viewController(forKey: .to), 122 | let fromVC = transitionContext.viewController(forKey: .from), 123 | let toView = toVC.view, 124 | let fromView = fromVC.view else { return } 125 | 126 | addShadowToView(toView) 127 | 128 | delegate?.beganTransition?() 129 | 130 | if !isReverseTransition { 131 | 132 | containerView.addSubview(fromView) 133 | containerView.addSubview(toView) 134 | 135 | toView.frame = CGRect(x : animatorScreenWidth, 136 | y : toView.frame.origin.y, 137 | width : animatorScreenWidth, 138 | height : animatorScreenHeight) 139 | 140 | animate(withTransitionContext: transitionContext, 141 | toView: toView, 142 | fromView: fromView, 143 | duration: AKGPushAnimatorConstants.Common.duration, 144 | delay: 0, 145 | options: AKGPushAnimatorConstants.Push.animateOption, 146 | animations: { 147 | fromView.frame = self.fromViewPushedFrame 148 | toView.frame = self.toViewPushedFrame}) 149 | } 150 | else { 151 | 152 | containerView.addSubview(toView) 153 | containerView.addSubview(fromView) 154 | 155 | toView.frame = CGRect(x : AKGPushAnimatorConstants.Common.dismissPosition, 156 | y : toView.frame.origin.y, 157 | width : animatorScreenWidth, 158 | height : animatorScreenHeight) 159 | 160 | animate(withTransitionContext: transitionContext, 161 | toView: toView, 162 | fromView: fromView, 163 | duration: AKGPushAnimatorConstants.Common.duration, 164 | delay: 0, 165 | options: AKGPushAnimatorConstants.Pop.animateOption, 166 | animations: { 167 | fromView.frame = self.fromViewPopedFrame 168 | toView.frame = self.toViewPopedFrame }) 169 | } 170 | } 171 | } 172 | 173 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/AKGPushAnimator/Source/AKGPushAnimatorConstants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorConstants.swift 3 | // AKGPushAnimatorDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct AKGPushAnimatorConstants { 12 | 13 | struct Common { 14 | static let duration = 0.27 15 | static let dismissPosition : CGFloat = -50 16 | static let shadowOpacity : Float = 1 17 | static let shadowColor : UIColor = .black 18 | } 19 | 20 | struct Push { 21 | static let animateOption : UIViewAnimationOptions = .curveEaseOut 22 | 23 | } 24 | 25 | struct Pop { 26 | static let animateOption : UIViewAnimationOptions = .curveEaseInOut 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AKGPushAnimator (1.0.5) 3 | 4 | DEPENDENCIES: 5 | - AKGPushAnimator (~> 1.0.5) 6 | 7 | SPEC CHECKSUMS: 8 | AKGPushAnimator: 11056d87f7c208db8c5afd6f3cbcd97c7240ff79 9 | 10 | PODFILE CHECKSUM: 8d46bbaab7e34eb1cf2c97782fd46e67103f15ec 11 | 12 | COCOAPODS: 1.2.1 13 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/AKGPushAnimator/AKGPushAnimator-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AKGPushAnimator : NSObject 3 | @end 4 | @implementation PodsDummy_AKGPushAnimator 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/AKGPushAnimator/AKGPushAnimator-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/AKGPushAnimator/AKGPushAnimator-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double AKGPushAnimatorVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AKGPushAnimatorVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/AKGPushAnimator/AKGPushAnimator.modulemap: -------------------------------------------------------------------------------- 1 | framework module AKGPushAnimator { 2 | umbrella header "AKGPushAnimator-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/AKGPushAnimator/AKGPushAnimator.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AKGPushAnimator 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/AKGPushAnimator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AKGPushAnimator 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 Ahmet Günay 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2017 Ahmet Günay 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | AKGPushAnimator 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AKGPushAnimatorTableviewDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AKGPushAnimatorTableviewDemo 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/AKGPushAnimator/AKGPushAnimator.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/AKGPushAnimator/AKGPushAnimator.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AKGPushAnimatorTableviewDemoVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AKGPushAnimatorTableviewDemoVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator/AKGPushAnimator.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AKGPushAnimator" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_AKGPushAnimatorTableviewDemo { 2 | umbrella header "Pods-AKGPushAnimatorTableviewDemo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemo/Pods-AKGPushAnimatorTableviewDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator/AKGPushAnimator.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AKGPushAnimator" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AKGPushAnimatorTableviewDemoTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AKGPushAnimatorTableviewDemoTests 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AKGPushAnimatorTableviewDemoTestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AKGPushAnimatorTableviewDemoTestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator/AKGPushAnimator.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_AKGPushAnimatorTableviewDemoTests { 2 | umbrella header "Pods-AKGPushAnimatorTableviewDemoTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoTests/Pods-AKGPushAnimatorTableviewDemoTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator/AKGPushAnimator.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AKGPushAnimatorTableviewDemoUITests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AKGPushAnimatorTableviewDemoUITests 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AKGPushAnimatorTableviewDemoUITestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AKGPushAnimatorTableviewDemoUITestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator/AKGPushAnimator.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_AKGPushAnimatorTableviewDemoUITests { 2 | umbrella header "Pods-AKGPushAnimatorTableviewDemoUITests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/AKGPushAnimatorTableviewDemo/Pods/Target Support Files/Pods-AKGPushAnimatorTableviewDemoUITests/Pods-AKGPushAnimatorTableviewDemoUITests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AKGPushAnimator/AKGPushAnimator.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Ahmet Günay 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AKGPushAnimator 2 |

3 | 4 | Language 5 | 6 | 7 | MIT License 8 | 9 | 10 | Carthage 11 | 12 | 13 | Twitter: @ahmtgny 14 | 15 | 16 | 17 | 18 |

19 | 20 | Easily Push and Pop viewcontroller like Instagram App with Interaction written in pure Swift 4 21 | 22 | ![Anim](https://github.com/ahmetkgunay/AKGPushAnimator/blob/master/AKGPushAnimator.gif) 23 | 24 | ## Import Library To Your Class 25 | 26 | If you are using Carthage to install AKGPushAnimator, then you need to import AKGPushAnimatorKit where you want to use. 27 | Because "Carthage" needs Embedded Framework to install libraries, and AKGPushAnimatorKit is the embedded library name of this project. 28 | 29 | If you are using Cocoapods to install AKGPushAnimator, then you need to import AKGPushAnimator where you want to use it. 30 | 31 | ## Usage 32 | 33 | Usage is simple with creating any BaseViewController and implement UINavigationControllerDelegate 34 | 35 | 36 | ```swift 37 | 38 | class BaseViewController: UIViewController, UINavigationControllerDelegate { 39 | 40 | let pushAnimator = AKGPushAnimator() 41 | let interactionAnimator = AKGInteractionAnimator() 42 | 43 | override func viewDidLoad() { 44 | super.viewDidLoad() 45 | } 46 | 47 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 48 | 49 | if operation == .push { 50 | interactionAnimator.attachToViewController(toVC) 51 | } 52 | pushAnimator.isReverseTransition = operation == .pop 53 | return pushAnimator 54 | } 55 | 56 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 57 | 58 | return interactionAnimator.transitionInProgress ? interactionAnimator : nil 59 | } 60 | } 61 | ``` 62 | 63 | After that, create any ViewController inheritted from BaseViewController and set navigationcontroller delegate before pushing viewcontroller (in prepare for segue for best) 64 | 65 | And Thats all! Now you have interactive push and pop animation like Instagram App. 66 | 67 | ```swift 68 | 69 | class FirstViewController: BaseViewController { 70 | 71 | override func viewDidLoad() { 72 | super.viewDidLoad() 73 | pushAnimator.delegate = self 74 | } 75 | 76 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 77 | if segue.identifier == "showSecond" { 78 | navigationController?.delegate = self 79 | } 80 | } 81 | 82 | override func didReceiveMemoryWarning() { 83 | super.didReceiveMemoryWarning() 84 | } 85 | } 86 | 87 | ``` 88 | 89 | #### Delegation Pattern 90 | 91 | ```swift 92 | 93 | extension FirstViewController: AKGPushAnimatorDelegate { 94 | 95 | func beganTransition() { 96 | print("began transition") 97 | } 98 | 99 | func cancelledTransition() { 100 | print("cancelled transition") 101 | } 102 | 103 | func finishedTransition() { 104 | print("finished transition") 105 | } 106 | } 107 | 108 | ``` 109 | 110 | #### Customise Animation with constants 111 | 112 | AKGPushAnimator has constants file to easily change animation types: 113 | 114 | ```swift 115 | struct Common { 116 | static let duration = 0.27; 117 | static let dismissPosition : CGFloat = -50; 118 | static let shadowOpacity : Float = 1 119 | static let shadowColor : UIColor = .black 120 | } 121 | 122 | struct Push { 123 | static let animateOption = UIViewAnimationOptions.curveEaseOut 124 | 125 | } 126 | 127 | struct Pop { 128 | static let animateOption = UIViewAnimationOptions.curveEaseInOut 129 | } 130 | 131 | ``` 132 | ## Installation 133 | 134 | There are three ways to use AKGPushAnimator in your project: 135 | - using CocoaPods 136 | - using Carthage 137 | - by cloning the project into your repository 138 | 139 | ### Installation with CocoaPods 140 | 141 | [CocoaPods](http://cocoapods.org/) is a dependency manager for Swift and Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the [Get Started](http://cocoapods.org/#get_started) section for more details. 142 | 143 | #### Podfile 144 | ```ruby 145 | platform :ios, '8.0' 146 | use_frameworks! 147 | pod 'AKGPushAnimator', '~> 1.0.6' 148 | ``` 149 | 150 | ### Installation with Carthage 151 | 152 | [Carthage](https://github.com/Carthage/Carthage) is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. 153 | 154 | To install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage) 155 | 156 | #### Cartfile 157 | ``` 158 | github "ahmetkgunay/AKGPushAnimator" ~> 1.0.6 159 | ``` 160 | 161 | ## Author 162 | 163 | Ahmet Kazım Günay, ahmetkgunay@gmail.com 164 | 165 | ## License 166 | 167 | AKGPushAnimator is available under the MIT license. See the LICENSE file for more info. 168 | 169 | -------------------------------------------------------------------------------- /Source/AKGInteractionAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGInteractionAnimator.swift 3 | // AKGPushAnimatorDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class AKGInteractionAnimator: UIPercentDrivenInteractiveTransition { 12 | 13 | var navigationController: UINavigationController! 14 | var shouldCompleteTransition = false 15 | public var transitionInProgress = false 16 | 17 | public func attachToViewController(_ viewController: UIViewController) { 18 | navigationController = viewController.navigationController 19 | addGestureRecognizer(viewController.view) 20 | } 21 | 22 | fileprivate func addGestureRecognizer(_ view: UIView) { 23 | let panGesture = UIPanGestureRecognizer(target: self, action: #selector(AKGInteractionAnimator.handlePanGesture(_:))) 24 | panGesture.delegate = self 25 | view.addGestureRecognizer(panGesture) 26 | } 27 | 28 | @objc func handlePanGesture(_ gestureRecognizer: UIPanGestureRecognizer) { 29 | let viewTranslation = gestureRecognizer.translation(in: gestureRecognizer.view?.superview) 30 | let velocity : CGPoint = gestureRecognizer.velocity(in: gestureRecognizer.view) 31 | 32 | switch gestureRecognizer.state { 33 | case .began: 34 | transitionInProgress = true 35 | navigationController.popViewController(animated: true) 36 | case .changed: 37 | var const = CGFloat(viewTranslation.x / UIScreen.main.bounds.width * 1.0) 38 | const = min(1.0, max(0.0, const)) 39 | shouldCompleteTransition = const > 0.5 || velocity.x > UIScreen.main.bounds.width 40 | update(const) 41 | case .cancelled, .ended: 42 | transitionInProgress = false 43 | if !shouldCompleteTransition || gestureRecognizer.state == .cancelled { 44 | cancel() 45 | } else { 46 | finish() 47 | } 48 | default: 49 | print("Swift switch must be exhaustive, thus the default") 50 | } 51 | } 52 | } 53 | 54 | extension AKGInteractionAnimator : UIGestureRecognizerDelegate { 55 | 56 | private func gestureRecognizerShouldBegin(_ gestureRecognizer: UIPanGestureRecognizer) -> Bool { 57 | let velocity : CGPoint = gestureRecognizer.velocity(in: gestureRecognizer.view) 58 | return fabs(velocity.x) > fabs(velocity.y) && fabs(velocity.x) > 0; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Source/AKGPushAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimator.h 3 | // AKGPushAnimator 4 | // 5 | // Created by AHMET KAZIM GUNAY on 07/05/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for AKGPushAnimator. 12 | FOUNDATION_EXPORT double AKGPushAnimatorVersionNumber; 13 | 14 | //! Project version string for AKGPushAnimator. 15 | FOUNDATION_EXPORT const unsigned char AKGPushAnimatorVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/AKGPushAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimator.swift 3 | // AKGPushAnimatorDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol AKGPushAnimatorDelegate { 12 | 13 | @objc optional func beganTransition() 14 | @objc optional func cancelledTransition() 15 | @objc optional func finishedTransition() 16 | } 17 | 18 | public class AKGPushAnimator: NSObject { 19 | 20 | public var isReverseTransition = false 21 | 22 | open var delegate : AKGPushAnimatorDelegate? 23 | 24 | // MARK: Variables with Getters 25 | 26 | var animatorScreenWidth : CGFloat { 27 | get { 28 | return UIScreen.main.bounds.width 29 | } 30 | } 31 | 32 | var animatorScreenHeight : CGFloat { 33 | get { 34 | return UIScreen.main.bounds.height 35 | } 36 | } 37 | 38 | var toViewPushedFrame : CGRect { 39 | get { 40 | return CGRect(x : 0, 41 | y : 0, 42 | width : self.animatorScreenWidth, 43 | height : self.animatorScreenHeight) 44 | } 45 | } 46 | 47 | var fromViewPushedFrame : CGRect { 48 | get { 49 | return CGRect(x : AKGPushAnimatorConstants.Common.dismissPosition, 50 | y : 0, 51 | width : self.animatorScreenWidth, 52 | height : self.animatorScreenHeight) 53 | } 54 | } 55 | 56 | var fromViewPopedFrame : CGRect { 57 | get { 58 | return CGRect(x : self.animatorScreenWidth, 59 | y : 0, 60 | width : self.animatorScreenWidth, 61 | height : self.animatorScreenHeight) 62 | } 63 | } 64 | 65 | var toViewPopedFrame : CGRect { 66 | get { 67 | return CGRect(x : 0, 68 | y : 0, 69 | width : self.animatorScreenWidth, 70 | height : self.animatorScreenHeight) 71 | } 72 | } 73 | 74 | fileprivate func animate(withTransitionContext transitionContext:UIViewControllerContextTransitioning, 75 | toView: UIView, 76 | fromView: UIView, 77 | duration: TimeInterval, 78 | delay: TimeInterval, 79 | options: UIViewAnimationOptions = [], 80 | animations: @escaping () -> Swift.Void) { 81 | 82 | UIView.animate(withDuration: duration, 83 | delay: delay, 84 | options: options, 85 | animations: animations) { (finished) in 86 | 87 | if (transitionContext.transitionWasCancelled) { 88 | toView.removeFromSuperview() 89 | self.delegate?.cancelledTransition?() 90 | } else { 91 | fromView.removeFromSuperview() 92 | self.delegate?.finishedTransition?() 93 | } 94 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 95 | 96 | } 97 | } 98 | 99 | fileprivate func addShadowToView(_ toView:UIView!) -> Swift.Void { 100 | 101 | toView.layer.shadowOpacity = AKGPushAnimatorConstants.Common.shadowOpacity 102 | toView.layer.shadowOffset = CGSize(width:0, height:3) 103 | toView.layer.shadowColor = AKGPushAnimatorConstants.Common.shadowColor.cgColor 104 | let shadowRect: CGRect = toView.bounds.insetBy(dx: 0, dy: 4); // inset top/bottom 105 | toView.layer.shadowPath = UIBezierPath(rect: shadowRect).cgPath 106 | } 107 | } 108 | 109 | extension AKGPushAnimator: UIViewControllerAnimatedTransitioning { 110 | 111 | // MARK: UIViewControllerAnimatedTransitioning 112 | 113 | public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 114 | return AKGPushAnimatorConstants.Common.duration 115 | } 116 | 117 | public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 118 | 119 | let containerView = transitionContext.containerView 120 | 121 | guard let toVC = transitionContext.viewController(forKey: .to), 122 | let fromVC = transitionContext.viewController(forKey: .from), 123 | let toView = toVC.view, 124 | let fromView = fromVC.view else { return } 125 | 126 | addShadowToView(toView) 127 | 128 | delegate?.beganTransition?() 129 | 130 | if !isReverseTransition { 131 | 132 | containerView.addSubview(fromView) 133 | containerView.addSubview(toView) 134 | 135 | toView.frame = CGRect(x : animatorScreenWidth, 136 | y : toView.frame.origin.y, 137 | width : animatorScreenWidth, 138 | height : animatorScreenHeight) 139 | 140 | animate(withTransitionContext: transitionContext, 141 | toView: toView, 142 | fromView: fromView, 143 | duration: AKGPushAnimatorConstants.Common.duration, 144 | delay: 0, 145 | options: AKGPushAnimatorConstants.Push.animateOption, 146 | animations: { 147 | fromView.frame = self.fromViewPushedFrame 148 | toView.frame = self.toViewPushedFrame}) 149 | } 150 | else { 151 | 152 | containerView.addSubview(toView) 153 | containerView.addSubview(fromView) 154 | 155 | toView.frame = CGRect(x : AKGPushAnimatorConstants.Common.dismissPosition, 156 | y : toView.frame.origin.y, 157 | width : animatorScreenWidth, 158 | height : animatorScreenHeight) 159 | 160 | animate(withTransitionContext: transitionContext, 161 | toView: toView, 162 | fromView: fromView, 163 | duration: AKGPushAnimatorConstants.Common.duration, 164 | delay: 0, 165 | options: AKGPushAnimatorConstants.Pop.animateOption, 166 | animations: { 167 | fromView.frame = self.fromViewPopedFrame 168 | toView.frame = self.toViewPopedFrame }) 169 | } 170 | } 171 | } 172 | 173 | -------------------------------------------------------------------------------- /Source/AKGPushAnimatorConstants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AKGPushAnimatorConstants.swift 3 | // AKGPushAnimatorDemo 4 | // 5 | // Created by AHMET KAZIM GUNAY on 30/04/2017. 6 | // Copyright © 2017 AHMET KAZIM GUNAY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct AKGPushAnimatorConstants { 12 | 13 | struct Common { 14 | static let duration = 0.27 15 | static let dismissPosition : CGFloat = -50 16 | static let shadowOpacity : Float = 1 17 | static let shadowColor : UIColor = .black 18 | } 19 | 20 | struct Push { 21 | static let animateOption : UIViewAnimationOptions = .curveEaseOut 22 | 23 | } 24 | 25 | struct Pop { 26 | static let animateOption : UIViewAnimationOptions = .curveEaseInOut 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | --------------------------------------------------------------------------------