Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamshezad/shpopup
A lightweight library for popup view
https://github.com/iamshezad/shpopup
alert alignment-options animation message popup popup-menu swift swift-4
Last synced: about 1 month ago
JSON representation
A lightweight library for popup view
- Host: GitHub
- URL: https://github.com/iamshezad/shpopup
- Owner: iamshezad
- License: mit
- Created: 2017-12-14T08:50:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T05:03:27.000Z (over 3 years ago)
- Last Synced: 2024-10-12T14:42:00.660Z (about 1 month ago)
- Topics: alert, alignment-options, animation, message, popup, popup-menu, swift, swift-4
- Language: Swift
- Size: 3.13 MB
- Stars: 38
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SHPopup
SHPop is lightweight library used for popup view[![Version](https://img.shields.io/cocoapods/v/SHSnackBarView.svg?style=flat)](https://cocoapods.org/pods/SHPopup)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![Platform](https://img.shields.io/badge/platform-ios-blue.svg?style=flat)](https://cocoapods.org/pods/SHPopup)### Sample One
### Sample Two
### Sample Three
## Features
#### SHPopup supports a popup inside another popup without dismissing
#### SHPopup is customizable## Installation
Just drag and drop the SHPopup.swift file from SHPopup folder to your project.## Usage
### Main viewcontroller must be embed in a navigation controller
### Set Popup View
Set a viewcontroller as popup view using setPopup function
```swift
let PopupVC = setPopupVC(storyboradID:"Main",viewControllerID:"restorationIdentifier")
```
you should set Storyboard name and viewcontroller id in setPopup function### Present Popup View
```swift
self.presentPopup(controller: popupVC, completion: nil)
```
### Dismiss Popup View
```swift
self.dismissPopup(completion: nil)
```
### Customization1. Popup View alignment options
.top
.center
.bottom
.custom - you can specify the x and y point of popup view
```swift
popupVC?.popupAlign = .top
```
custom alignment option
```swift
popupVC?.popupCustomAlign = CGPoint(x: 100, y: 100)
```
2. Popup View animation options
.normal
.top
.bottom
.bottomBounce
.topBounce
```swift
popupVC?.popupAnimation = .bottom
```
3. Poup View touch dismiss
```swift
popupVC?.touchDismiss = true
```
By default it is true4. Popup View Size - you can specify the width and height of popup view
```swift
popupVC?.popupSize = CGSize(width: 250, height: 250)
```
5. Popup View overlay Color - you can specify any color as overlay
```swift
popupVC?.overlayColor = UIColor.black
```
6. Popup View Corner Radius
```swift
popupVC?.popupCorner = 5
```
For more you can download the sample project.## Requirements
* iOS 9.0+
## Example
Download the Sample project.
## Contact
Shezad Ahamed
Follow and contact me on:
If you like my content, please consider buying me a coffee. Thank you for your support!
## Acknowledge
Inspired by [STZPopupView](https://github.com/STAR-ZERO/STZPopupView)
## License
SHPopup is available under the MIT license. See the LICENSE file for more info.