Popularity
6.3
Growing
Activity
3.6
Declining
733
14
51

Programming language: Swift
License: MIT License
Tags: UI     Alert     Popup     SwiftUI    
Latest version: v0.0.5

Popup View alternatives and similar libraries

Based on the "Alert" category.
Alternatively, view Popup View alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Popup View or a related project?

Add another 'Alert' Library

README

Popup View

Toasts and popups library written with SwiftUI


We are a development agency building phenomenal apps.

Twitter Version Carthage Compatible License Platform

Usage

  1. Put all your body code into a ZStack
  2. Add a binding bool to control popup presentation state
  3. Add .popup modifier to your ZStack ```swift @State var showingPopup = false

struct ContentView: View { var body: some View { ZStack { // your view } .popup(isPresented: $showingPopup, autohideIn: 2) { HStack { Text("The popup") } .frame(width: 200, height: 60) .background(Color(red: 0.85, green: 0.8, blue: 0.95)) .cornerRadius(30.0) } } }


### Required parameters 
`presented` - binding to determine if the popup should be seen on screen or hidden     
`view` - view you want to display on your popup  

### Available customizations - optional parameters    
`type` - toast, float or default   
`position` - top or bottom (for default case it just determines animation direction)  
`animation` - custom animation for popup sliding onto screen  
`autohideIn` - time after which popup should disappear    

## Examples

To try PopupView examples:
- Clone the repo `https://github.com/exyte/PopupView.git`
- Open terminal and run `cd <PopupViewRepo>/Example/`
- Run `pod install` to install all dependencies
- Run open `PopupViewExample.xcworkspace/` to open project in the Xcode
- Try it!

## Installation

### [CocoaPods](http://cocoapods.org)

To install `PopupView`, simply add the following line to your Podfile:

```ruby
pod 'ExytePopupView'

Carthage

To integrate PopupView into your Xcode project using Carthage, specify it in your Cartfile

github "Exyte/PopupView"

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/exyte/PopupView.git", from: "0.0.1")
]

Manually

Drop PopupView.swift in your project.

Requirements

  • iOS 13+
  • Xcode 11+


*Note that all licence references and agreements mentioned in the Popup View README section above are relevant to that project's source code only.