Skip to content

abdallahnh/ANPopUpContainer

Repository files navigation

ANPopUpContainer

CI Status Version License Platform

Example

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

Requirements

Installation

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

pod 'ANPopUpContainer'

How to use

Normal Display

let storyBoard = UIStoryboard(name: "Main", bundle: nil)
let popUpContainer = storyBoard.instantiateViewController(withIdentifier: "PopUPStoryId") as! ANPopUpContainerViewController
    popUpContainer.parentView = self
let firstView = storyBoard.instantiateViewController(withIdentifier: "FirstPopupStoryBoardId") as! FirstPopupViewController
    firstView.view.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 220)
    firstView.inPopUpContainer = popUpContainer 
        
 popUpContainer.displayContentController(for: firstView)
 self.present(popUpContainer, animated: true, completion: nil)
 

Fade Display

let storyBoard = UIStoryboard(name: "Main", bundle: nil)
let popUpContainer = storyBoard.instantiateViewController(withIdentifier: "PopUPStoryId") as! ANPopUpContainerViewController
   popUpContainer.parentView = self
let firstView = storyBoard.instantiateViewController(withIdentifier: "FirstPopupStoryBoardId") as! FirstPopupViewController
   firstView.view.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 220)
   firstView.inPopUpContainer = popUpContainer 
       
popUpContainer.displayContentControllerWithFadeAnimation(for: firstView)
self.present(popUpContainer, animated: true, completion: nil)

Author

abdallahnh, abdallah.nh@gmail.com

License

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

About

ANPopUpContainer is used to popup any UITableViewController or any UIViewController

Resources

License

Stars

Watchers

Forks

Packages

No packages published