Latest 1.0.0
Homepage https://github.com/cockscomb/HUDKit
License MIT
Platforms ios 8.0
Authors

HUDKit provides HUD interface as UIPresentationController.

Features

HUDKit provides HUDPresentationController. This is the HUD interface as an implementation of UIPresentationController. You can show your any view controllers in the HUD panel.

HUDKit provides HUDProgressViewController also. This can be used as progress HUD easily.

Screenshots


Usage

Your view controller must implements UIViewControllerTransitioningDelegate like below.

import UIKit
import HUDKit

class ViewController: UIViewController, UIViewControllerTransitioningDelegate {

    ...

    func presentationControllerForPresentedViewController(presented: UIViewController, presentingViewController presenting: UIViewController, sourceViewController source: UIViewController) -> UIPresentationController? {
        let HUD = HUDPresentationController(presentedViewController: presented, presentingViewController: presenting)
        HUD.dismissWhenTapped = true
        return HUD
    }

}

Next, you have to set it to the transitioningDelegate property and set .Custom to modalPresentationStyle property of your presented view controller.

Now, call presentViewController(_:animated:completion:).

You can read the sample code at Example directory for further informations.

Requirements

  • iOS 8 or later

Author

Hiroki Kato, [email protected]

License

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

Latest podspec

{
    "name": "HUDKit",
    "version": "1.0.0",
    "summary": "HUDKit provides HUD interface as UIPresentationController.",
    "description": "HUDKit provides the HUD interface as an implementation ofnUIPresentationController. You can show your any view controllers in the HUDnpanel.nnHUDKit provides HUDProgressViewController also. This can be used as progressnHUD easily.",
    "homepage": "https://github.com/cockscomb/HUDKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Hiroki Kato": "[email protected]"
    },
    "social_media_url": "https://twitter.com/cockscomb",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/cockscomb/HUDKit.git",
        "tag": "1.0.0"
    },
    "source_files": "HUDKit/Classes/**/*.{swift}",
    "resources": "HUDKit/Classes/**/*.{xib}"
}

Pin It on Pinterest

Share This