A lightweight library for popup view
SHPop is lightweight library used for popup view
Just drag and drop the SHPopup.swift file from SHPopup folder to your project.
Set a viewcontroller as popup view using setPopup function
let PopupVC = setPopupVC(storyboradID:"Main",viewControllerID:"restorationIdentifier")
you should set Storyboard name and viewcontroller id in setPopup function
self.presentPopup(controller: popupVC, completion: nil)
self.dismissPopup(completion: nil)
popupVC?.popupAlign = .top
custom alignment option
popupVC?.popupCustomAlign = CGPoint(x: 100, y: 100)
popupVC?.popupAnimation = .bottom
popupVC?.touchDismiss = true
By default it is true
popupVC?.popupSize = CGSize(width: 250, height: 250)
popupVC?.overlayColor = UIColor.black
popupVC?.popupCorner = 5
For more you can download the sample project.
Download the Sample project.
Shezad Ahamed
Follow and contact me on:
If you like my content, please consider buying me a coffee. Thank you for your support!
Inspired by STZPopupView
SHPopup is available under the MIT license. See the LICENSE file for more info.