All Projects → ahmetkgunay → Akgpushanimator

ahmetkgunay / Akgpushanimator

Licence: mit
Easily Push and Pop viewcontroller like Instagram App with Interaction

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Akgpushanimator

Flowing Gradient
Android Library to make a flowing gradient effect, similar to that used in Instagram Android login screen
Stars: ✭ 701 (+1493.18%)
Mutual labels:  instagram, transition
Instagramlikecolortransitionandroid
How to create instagram like Gradient color transition in android.📸
Stars: ✭ 586 (+1231.82%)
Mutual labels:  instagram, transition
Social ids
Get user ids from social network handlers
Stars: ✭ 9 (-79.55%)
Mutual labels:  instagram
Instabyte
Clone of Instagram made with React Native
Stars: ✭ 36 (-18.18%)
Mutual labels:  instagram
Instories
iOS app for viewing Instagram stories anonymously.
Stars: ✭ 31 (-29.55%)
Mutual labels:  instagram
Instagrid Js
A Javascript library to do exactly what Instagram Layout application does
Stars: ✭ 13 (-70.45%)
Mutual labels:  instagram
Instagram Scheduler
📷 Beautiful way to get shadowbanned on Instagram by ⏰ scheduling your 🌁 photos.
Stars: ✭ 33 (-25%)
Mutual labels:  instagram
Cardsholder
Demonstration of complex interface layouts using child view controllers in iOS 🦾
Stars: ✭ 24 (-45.45%)
Mutual labels:  transition
Public Instagram
Tool to fetch Instagram's public content.
Stars: ✭ 43 (-2.27%)
Mutual labels:  instagram
Instagramkit
The unofficial Instagram iOS SDK
Stars: ✭ 955 (+2070.45%)
Mutual labels:  instagram
Ig Follow Count
📈 A simple Instagram analytics tool that continuously logs and graphs your follower count.
Stars: ✭ 35 (-20.45%)
Mutual labels:  instagram
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (+2052.27%)
Mutual labels:  transition
Imagetransition
This project provides a library for making transitions between activities with shared images.
Stars: ✭ 13 (-70.45%)
Mutual labels:  transition
Shareinstagram
Share image and video to instagram feed and stories
Stars: ✭ 34 (-22.73%)
Mutual labels:  instagram
Easytransform
Enhancing CSS transform with a little bit of JavaScript.
Stars: ✭ 10 (-77.27%)
Mutual labels:  transition
Gatsby Source Instagram All
⚛️📸 Gatsby source plugin for fetching all your instagram posts
Stars: ✭ 42 (-4.55%)
Mutual labels:  instagram
Instagramfirstcommenter
This bot will post a predefined comment as fast as possible to a new post on the target profile. I used this to successfully win tickets for a big music festival.
Stars: ✭ 26 (-40.91%)
Mutual labels:  instagram
React Whirligig
A react carousel/slider like component for sequentially displaying slides or sets of slides
Stars: ✭ 20 (-54.55%)
Mutual labels:  transition
Jtmaterialtransition
An iOS transition for controllers based on material design.
Stars: ✭ 966 (+2095.45%)
Mutual labels:  transition
Vueg Page Transition Plugin
为Vue应用添加页面间的转场特效( Page level transition plugin for vue-router)
Stars: ✭ 1,023 (+2225%)
Mutual labels:  transition

AKGPushAnimator

Language MIT License Carthage Twitter: @ahmtgny

Easily Push and Pop viewcontroller like Instagram App with Interaction written in pure Swift 4

Anim

Import Library To Your Class

If you are using Carthage to install AKGPushAnimator, then you need to import AKGPushAnimatorKit where you want to use. Because "Carthage" needs Embedded Framework to install libraries, and AKGPushAnimatorKit is the embedded library name of this project.

If you are using Cocoapods to install AKGPushAnimator, then you need to import AKGPushAnimator where you want to use it.

Usage

Usage is simple with creating any BaseViewController and implement UINavigationControllerDelegate

class BaseViewController: UIViewController, UINavigationControllerDelegate {

    let pushAnimator = AKGPushAnimator()
    let interactionAnimator = AKGInteractionAnimator()

    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {

        if operation == .push {
            interactionAnimator.attachToViewController(toVC)
        }
        pushAnimator.isReverseTransition = operation == .pop
        return pushAnimator
    }

    func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {

        return interactionAnimator.transitionInProgress ? interactionAnimator : nil
    }
}

After that, create any ViewController inheritted from BaseViewController and set navigationcontroller delegate before pushing viewcontroller (in prepare for segue for best)

And Thats all! Now you have interactive push and pop animation like Instagram App.

class FirstViewController: BaseViewController {

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

    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        if segue.identifier == "showSecond" {
            navigationController?.delegate = self
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}

Delegation Pattern

extension FirstViewController: AKGPushAnimatorDelegate {

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

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

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

Customise Animation with constants

AKGPushAnimator has constants file to easily change animation types:

struct Common {
    static let duration = 0.27;
    static let dismissPosition : CGFloat = -50;
    static let shadowOpacity : Float = 1
    static let shadowColor : UIColor = .black
}

struct Push {
    static let animateOption = UIViewAnimationOptions.curveEaseOut

}

struct Pop {
    static let animateOption = UIViewAnimationOptions.curveEaseInOut
}

Installation

There are three ways to use AKGPushAnimator in your project:

  • using CocoaPods
  • using Carthage
  • by cloning the project into your repository

Installation with CocoaPods

CocoaPods 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 section for more details.

Podfile

platform :ios, '8.0'
use_frameworks!
pod 'AKGPushAnimator', '~> 1.0.6'

Installation with Carthage

Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods.

To install with carthage, follow the instruction on Carthage

Cartfile

github "ahmetkgunay/AKGPushAnimator" ~> 1.0.6

Author

Ahmet Kazım Günay, [email protected]

License

AKGPushAnimator is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].