Latest 0.1.0
Homepage https://github.com/Handii-inc/HDBubbleTransition
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform
codebeat badge

Description

You can add bubble transition animation to view controller.
Inspired by BubbleTransition

Installation

HDBubbleTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'HDBubbleTransition'

Step by step

  1. Add inheritance of UIViewControllerTransitioningDelegate to UIViewContorller that is going to present.(not controller that executes self.present)
  2. In function of UIViewControllerTransitioningDelegate, return HDBubbleTransition instance.
    • In for presentation implementation, create instance by HDBubbleTransition.appear.
    • In for dismiss implementation, create instance by HDBubbleTransition.disappear.

Sample code

Please see example, if you want to get more detail.

import UIKit
import HDBubbleTransition

class AnimationTransitionViewController: UIViewController, UIViewControllerTransitioningDelegate {
    override func viewDidLoad() {
        super.viewDidLoad()
        self.transitioningDelegate = self //set delegate
    }

    //MARK:- UIViewControllerTransitioningDelegate
    func animationController(forPresented presented: UIViewController,
                             presenting: UIViewController,
                             source: UIViewController) -> UIViewControllerAnimatedTransitioning?
    {
        return HDBubbleTransition.appear(from: CGPoint(x: 100, y: 100),
                                         in: self.view.frame,
                                         with: 0.5,
                                         colored: .white)
    }

    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning?
    {
        return HDBubbleTransition.disappear(to: CGPoint(x: 100, y: 100),
                                            in: self.view.frame,
                                            with: 0.5,
                                            colored: .white)
    }
}

Author

Handii, Inc., [email protected]

License

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

Latest podspec

{
    "name": "HDBubbleTransition",
    "version": "0.1.0",
    "summary": "Bubble transition animation library.",
    "description": "This library add bubble animation to transition of page.",
    "homepage": "https://github.com/Handii-inc/HDBubbleTransition",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Handii-inc": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Handii-inc/HDBubbleTransition.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HDBubbleTransition/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This