Latest 1.0.0
Homepage https://github.com/serp1412/LazyTransitions
License MIT
Platforms ios 8.0
Authors

LazyTransitions

Platform: iOS 8+Language: Swift 3
Cocoapods
Carthage Compatible


LazyTransitions

LazyTransitions
License: BSD
Twitter: serp1412

A simple framework that allows you to create similar lazy pops and dismisses like in the Facebook, Instagram or Twitter apps.

LazyTransitions

Installation

CocoaPods

Add the following line to your PodFile:

pod 'LazyTransitions'

Carthage

Add the following line to your Cartfile

github "serp1412/LazyTransitions"

Usage

Here’s the simplest way to use LazyTransitions

  • Import the framework in the view controller that you want to make lazy
    import LazyTransitions
  • Make the view controller lazy for the transition that you need
    func viewDidLoad() {
    becomeLazy(for: .dismiss) // or .pop if have pushed this screen
    }
  • A lazy transition trigger is automatically added to the screen’s view property. But you can add transition triggers (i.e. panning on them will also trigger a transition) for other views in your screen
    addTransition(forView: view)
    // or
    addTransition(forScrollView: scrollView)

Example

Here’s some sample code on how to use LazyTransitions in your project.

import LazyTransitions

class LazyViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        becomeLazy(for: .dismiss)
    }
}

That’s it! 😜

More Info Please!

If you want to find out about more use cases for LazyTransitions or just mess around with it a bit.

  1. Clone this project
  2. Open it in Xcode and find the LazyTransitions.playground file
  3. Open the README playground page and follow the instructions inside.

I hope you enjoy using this framework as much as I did creating it 😊

Latest podspec

{
    "name": "LazyTransitions",
    "version": "1.0.0",
    "license": "MIT",
    "summary": "Simple framework to add lazy pop and dismiss like in the Facebook or Instagram apps",
    "homepage": "https://github.com/serp1412/LazyTransitions",
    "social_media_url": "http://twitter.com/serp1412",
    "authors": {
        "Serghei Catraniuc": "[email protected]"
    },
    "source": {
        "git": "https://github.com/serp1412/LazyTransitions.git",
        "tag": "1.0.0"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "LazyTransitions/*.swift"
}

Pin It on Pinterest

Share This