MZFormSheetPresentationController is an ios framework that provide a popup from UIViewController.

example of MZFormSheetPresentationController
example of MZFormSheetPresentationController

Step to integrate MZFormSheetPresentationController

1. add these 2 lines to podfile and compile
pod 'MZAppearance'
pod 'JGMethodSwizzler'

2. download .zip file from MZFormSheetPresentationController and extract
Screen Shot 2015-08-02 at 5.41.08 AM

3. drag “MZFormSheetPresentationController” folder to your project
Screen Shot 2015-08-02 at 5.41.41 AM

4. in your Bridging Header file, add these 2 lines
#import "MZFormSheetPresentationController.h"
#import "MZFormSheetPresentationControllerSegue.h"

5. create your new UIViewController .xib file, name it (Ex: PopupViewController.xib) and create your own popup layout.
Screen Shot 2015-08-02 at 6.07.59 AM

6. Add these code in the UIViewController that you want to add your popup

class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
var btn:UIButton = UIButton.buttonWithType(UIButtonType.InfoLight) as! UIButton
btn.addTarget(self, action: "btnInfoTouched", forControlEvents: UIControlEvents.TouchUpInside)
UIBarButtonItem(customView: btn)
self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: btn)
}
func btnInfoTouched(){
var infoViewController = UIViewController(nibName: "PopupViewController", bundle: nil)
var formSheetController = MZFormSheetPresentationController(contentViewController: infoViewController)
formSheetController.contentViewSize = CGSizeMake(280, 70)
formSheetController.contentViewControllerTransitionStyle = MZFormSheetPresentationTransitionStyle.StyleBounce
var tap:UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "dismissPopup")
formSheetController.view.addGestureRecognizer(tap)
// add tap gesture recognizer to detect tap and close popup
self.presentViewController(formSheetController, animated: true, completion: nil)
}
func dismissPopup() {
self.dismissViewControllerAnimated(true, completion: nil)
}
}

7. build and see the result