{"id":20556254,"url":"https://github.com/ahmetkgunay/akgpushanimator","last_synced_at":"2025-04-14T13:07:14.281Z","repository":{"id":56900598,"uuid":"89871242","full_name":"ahmetkgunay/AKGPushAnimator","owner":"ahmetkgunay","description":"Easily Push and Pop viewcontroller like Instagram App with Interaction","archived":false,"fork":false,"pushed_at":"2017-11-01T16:51:18.000Z","size":4219,"stargazers_count":46,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-03-14T16:43:45.090Z","etag":null,"topics":["animatedtransitioning","instagram","popviewcontroller","pushviewcontroller","swift4","transition"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetkgunay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-30T19:11:15.000Z","updated_at":"2022-04-09T12:30:11.000Z","dependencies_parsed_at":"2022-08-21T02:20:36.270Z","dependency_job_id":null,"html_url":"https://github.com/ahmetkgunay/AKGPushAnimator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetkgunay%2FAKGPushAnimator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetkgunay%2FAKGPushAnimator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetkgunay%2FAKGPushAnimator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetkgunay%2FAKGPushAnimator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetkgunay","download_url":"https://codeload.github.com/ahmetkgunay/AKGPushAnimator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886314,"owners_count":21177643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animatedtransitioning","instagram","popviewcontroller","pushviewcontroller","swift4","transition"],"created_at":"2024-11-16T03:26:11.619Z","updated_at":"2025-04-14T13:07:14.010Z","avatar_url":"https://github.com/ahmetkgunay.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AKGPushAnimator\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://swift.org\"\u003e\n\u003cimg src=\"http://img.shields.io/badge/Swift-4.0-brightgreen.svg\" alt=\"Language\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/ahmetkgunay/NetworkLayer/blob/master/LICENSE\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT License\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat\" alt=\"Carthage\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/ahmtgny\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/contact-@ahmtgny-blue.svg?style=flat\" alt=\"Twitter: @ahmtgny\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/ahmetkgunay/AKGPushAnimator/tree/master/Source\"\u003e\n\u003cimg src=\"https://img.shields.io/gemnasium/mathiasbynens/he.svg?style=flat\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nEasily Push and Pop viewcontroller like Instagram App with Interaction written in pure Swift 4\n\n![Anim](https://github.com/ahmetkgunay/AKGPushAnimator/blob/master/AKGPushAnimator.gif)\n\n## Import Library To Your Class\n\nIf you are using Carthage to install AKGPushAnimator, then you need to import AKGPushAnimatorKit where you want to use.\nBecause \"Carthage\" needs Embedded Framework to install libraries, and AKGPushAnimatorKit is the embedded library name of this project.\n\nIf you are using Cocoapods to install AKGPushAnimator, then you need to import AKGPushAnimator where you want to use it.\n\n## Usage\n\nUsage is simple with creating any BaseViewController and implement UINavigationControllerDelegate \n\n\n```swift\n\nclass BaseViewController: UIViewController, UINavigationControllerDelegate {\n\n    let pushAnimator = AKGPushAnimator()\n    let interactionAnimator = AKGInteractionAnimator()\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n    \n    func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -\u003e UIViewControllerAnimatedTransitioning? {\n\n        if operation == .push {\n            interactionAnimator.attachToViewController(toVC)\n        }\n        pushAnimator.isReverseTransition = operation == .pop\n        return pushAnimator\n    }\n\n    func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -\u003e UIViewControllerInteractiveTransitioning? {\n\n        return interactionAnimator.transitionInProgress ? interactionAnimator : nil\n    }\n}\n```\n\nAfter that, create any ViewController inheritted from BaseViewController and set navigationcontroller delegate before pushing viewcontroller (in prepare for segue for best)\n\nAnd Thats all! Now you have interactive push and pop animation like Instagram App.\n\n```swift\n\nclass FirstViewController: BaseViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        pushAnimator.delegate = self\n    }\n\n    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {\n        if segue.identifier == \"showSecond\" {\n            navigationController?.delegate = self\n        }\n    }\n\n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n}\n\n```\n\n#### Delegation Pattern\n\n```swift\n\nextension FirstViewController: AKGPushAnimatorDelegate {\n\n    func beganTransition() {\n        print(\"began transition\")\n    }\n\n    func cancelledTransition() {\n        print(\"cancelled transition\")\n    }\n\n    func finishedTransition() {\n        print(\"finished transition\")\n    }\n}\n\n```\n\n#### Customise Animation with constants\n\nAKGPushAnimator has constants file to easily change animation types:\n\n```swift\nstruct Common {\n    static let duration = 0.27;\n    static let dismissPosition : CGFloat = -50;\n    static let shadowOpacity : Float = 1\n    static let shadowColor : UIColor = .black\n}\n\nstruct Push {\n    static let animateOption = UIViewAnimationOptions.curveEaseOut\n\n}\n\nstruct Pop {\n    static let animateOption = UIViewAnimationOptions.curveEaseInOut\n}\n\n```\n## Installation\n\nThere are three ways to use AKGPushAnimator in your project:\n- using CocoaPods\n- using Carthage\n- by cloning the project into your repository\n\n### Installation with CocoaPods\n\n[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.\n\n#### Podfile\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\npod 'AKGPushAnimator', '~\u003e 1.0.6'\n```\n\n### Installation with Carthage\n\n[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.\n\nTo install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage)\n\n#### Cartfile\n```\ngithub \"ahmetkgunay/AKGPushAnimator\" ~\u003e 1.0.6\n```\n\n## Author\n\nAhmet Kazım Günay, ahmetkgunay@gmail.com\n\n## License\n\nAKGPushAnimator is available under the MIT license. See the LICENSE file for more info.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetkgunay%2Fakgpushanimator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetkgunay%2Fakgpushanimator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetkgunay%2Fakgpushanimator/lists"}