Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucaslt89/PopupContainer
Provides a simple, easy to use, popup container for any view, that shows a popup as a UIAlertView
https://github.com/lucaslt89/PopupContainer
Last synced: 3 months ago
JSON representation
Provides a simple, easy to use, popup container for any view, that shows a popup as a UIAlertView
- Host: GitHub
- URL: https://github.com/lucaslt89/PopupContainer
- Owner: lucaslt89
- License: mit
- Created: 2015-03-12T12:57:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-25T10:33:21.000Z (over 7 years ago)
- Last Synced: 2024-03-15T05:45:06.906Z (11 months ago)
- Language: Swift
- Size: 216 KB
- Stars: 33
- Watchers: 4
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PopupContainer
[](https://travis-ci.org/Lucas/PopupContainer)
[](http://cocoadocs.org/docsets/PopupContainer)
[](http://cocoadocs.org/docsets/PopupContainer)
[](http://cocoadocs.org/docsets/PopupContainer)## 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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:pod "PopupContainer"
## ExamplesThis screenshots were taken from the example project:
Portrait:

Landscape:

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