Latest 0.0.5
Homepage https://github.com/lucaslt89/PopupContainer
License MIT
Platforms ios 8.0, requires ARC
Authors

CI Status
Version
License
Platform

NOTE

Since Version 0.0.2 is adapted to Swift 1.2. If you want to use this library with previous Swift versions, force the pod version to 0.0.1

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Before using PopupContainer, import the module to your file:

import PopupContainer

To create a popup, use any UIView you have created, either from Xib or from code, and then do

PopupContainer.generatePopupWithView(yourView).show()

To close a popup, just call close() function of PopupContainer.

class ViewController: UIViewController {
    var aPopupContainer: PopupContainer?

    @IBAction func showFromXibButtonPressed(sender: AnyObject) {
        let xibView = NSBundle.mainBundle().loadNibNamed("XibPopup", owner: nil, options: nil)[0] as XibPopup
        self.aPopupContainer = PopupContainer.generatePopupWithView(xibView)
        self.aPopupContainer?.show()
    }

    func closePopup() {
        self.aPopupContainer?.close()
    }
}

Requirements

iOS 8.0+

Installation

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

pod "PopupContainer"

Examples

This screenshots were taken from the example project:

Portrait:

Portrait popup small
Protrait popup big

Landscape:

Landscape popup small
Landscape popup big

Author

Lucas Diez de Medina @ Technopix Argentina, [email protected]

Latest podspec

{
    "name": "PopupContainer",
    "version": "0.0.5",
    "summary": "A Popup container that shows any UIView as a UIAlertView, taking care of animations and positioning.",
    "homepage": "https://github.com/lucaslt89/PopupContainer",
    "license": "MIT",
    "authors": {
        "Lucas Diez de Medina @ Technopix": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lucaslt89/PopupContainer.git",
        "tag": "0.0.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/*.swift",
    "resource_bundles": {
        "PopupContainer": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This