A SwiftUI library to display Apple Pencil and Pasteboard-like alerts on iOS.

Overview

Notification


DropView is a SwiftUI-based library to display alerts inspired by the Apple Pencil and pasteboard stock ones.


What are some features I can expect from this library?

  • Dark mode
  • Interactive dismissal
  • Dynamic font sizing
  • Accessibility support
  • Custom positioning (.top, .bottom and .center)

Status

Swift iOS macOS tvOS watchOS
checks GitHub release (latest by date)

You can find all changelogs directly under every release.

What's next?

Milestones and issues are the best way to keep updated with active developement.

Feel free to contribute by sending a pull request. Just remember to refer to our guidelines and Code of Conduct beforehand.

Installation

Swift Package Manager (Xcode 11 and above)

  1. Select File/Swift Packages/Add Package Dependency… from the menu.
  2. Paste https://github.com/sbertix/DropView.git.
  3. Follow the steps.
  4. Add DropView.

Why not CocoaPods, or Carthage, or blank?

Supporting multiple dependency managers makes maintaining a library exponentially more complicated and time consuming.
Furthermore, with the integration of the Swift Package Manager in Xcode 11 and greater, we expect the need for alternative solutions to fade quickly.

Usage

DropView allows you to present alerts just like sheets and fullScreenCovers.

Just call .drop($drop) on any View.

Example

import SwiftUI

import DropView

struct YourView: View {
    /// An optional `Drop` binding.
    @State var drop: Drop?
    /// The current posiiton.
    @State var alignmentValue: Int = 0
    /// Autohides after a given amount of seconds.
    @State var seconds: TimeInterval = 2

    /// The vertical alignment.
    private var alignment: VerticalAlignment {
        switch alignmentValue {
        case 1: return .center
        case 2: return .bottom
        default: return .top
        }
    }

    /// The underlying view.
    var body: some View {
        VStack(spacing: 8) {
            Slider(value: $seconds, in: 2...10)
                .padding(.horizontal)
            Picker("Alignment", selection: $alignmentValue) {
                Text("Top").tag(0)
                Text("Center").tag(1)
                Text("Bottom").tag(2)
            }
            Button(action: {
                drop = .init(title: "DropView",
                             subtitle: "github.com/sbertix/DropView",
                             icon: Image(systemName: "hand.wave.fill").resizable(),
                             action: Image(systemName: "star.circle.fill").resizable())
            }) {
                Text("Present").bold()
            }
            Button(action: {
                drop = nil
            }) {
                Text("Hide").foregroundColor(.red)
            }
        }
        .drop($drop, hidingAfter: seconds, alignment: alignment)
    }
}

Special thanks

Massive thanks to anyone contributing to omaralbeik/Drops for the inspiration.

Issues
Releases(0.2.1)
🚨Use the iPhone X Notch to display alerts. 🚨

NotchyAlert Prerequisites Xcode 9.x Swift 4.x iPhone X Simulator/Device Demo Installation Cocoapods To install NotchyAlert using Cocoapods, add the fo

Sofiane Beors 68 May 9, 2021
It is a highly configurable iOS library which allows easy styling with built in styles as well as extra header and footer views so that you can make extremely unique alerts and action sheets.

 CFAlertViewController CFAlertViewController is a library that helps you display and customise Alerts, Action Sheets, and Notifications on iPad and i

Crowdfire Inc. 1.1k Nov 15, 2021
Advance animated alerts for iOS written in Swift

LIHAlert LIHAlert provides animated banners for iOS. Updated to Swift 3 Demo Project The LIHAlert workspace contains a demo project, also used for dev

null 36 Aug 28, 2021
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.

SwiftEntryKit ?? Donations can be made here. Table of Contents Overview Features Example Project Example Project Installation Presets Playground Requi

Daniel Huri 5.7k Nov 20, 2021
The easiest way to display highly customizable in app notification banners in iOS

Written in Swift 5 NotificationBanner is an extremely customizable and lightweight library that makes the task of displaying in app notification banne

Dalton Hinterscher 4.3k Nov 20, 2021
Zingle – An alert will display underneath your UINavigationBar 🎅

Zingle Zingle – An alert will display underneath your UINavigationBar ?? ?? Note: Zingle has a dependency to have a UINavigationController in your app

Hemang 106 Dec 21, 2020
Toasts and popups library written with SwiftUI

Popup View Toasts and popups library written with SwiftUI We are a development agency building phenomenal apps. Usage Put all your body code into a ZS

Exyte 1.1k Nov 26, 2021
Animated alert library like Swarm app.

TKSwarmAlert Animation Tool for Alert like Swarm app. ScreenShot Installation CocoaPods You can use CocoaPods to install TKSwarmAlert by adding it to

Takuya Okamoto 580 Nov 8, 2021
Swift library to manage in app notification in swift language, like WhatsApp, Telegram, Frind, ecc.

InAppNotify - Manage in App notifications During develop of my app Frind, I needed to manage in app notifications like whatsapp or telegram, but i did

Luca Becchetti 436 Sep 30, 2021
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.

SPAlert Popup from Apple Music & Feedback in AppStore. Contains Done, Heart, Error and other presets. Supports Dark Mode. I tried to recreate Apple's

Ivan Vorobei 1.4k Nov 18, 2021
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.

SPAlert Popup from Apple Music & Feedback in AppStore. Contains Done, Heart, Error and other presets. Supports Dark Mode. I tried to recreate Apple's

Ivan Vorobei 1.1k Apr 27, 2021
A Google like action sheet for iOS written in Swift.

MaterialActionSheetController Lightweight and totally customizable. Create and present it the way you do with UIAlertController. Screenshots Demo | De

Thanh-Nhon NGUYEN 104 Jun 3, 2021
This is an iOS control for presenting any UIView in an UIAlertController like manner

RMActionController This framework allows you to present just any view as an action sheet. In addition, it allows you to add actions around the present

Roland Moers 547 Oct 28, 2021
This is an iOS control for selecting a date using UIDatePicker in an UIAlertController like manner

RMDateSelectionViewController This framework allows you to select a date by presenting an action sheet. In addition, it allows you to add actions arro

Roland Moers 1.2k Oct 27, 2021
This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner

RMPickerViewController This framework allows you to pick something with a picker presented as an action sheet. In addition, it allows you to add actio

Roland Moers 383 Jul 26, 2021
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.

Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexibl

Sebastian Boldt 2.3k Nov 18, 2021
SwiftOverlays is a Swift GUI library for displaying various popups and notifications

SwiftOverlays is a Swift GUI library for displaying various popups and notifications. SwiftOverlays animated logo is kindly made by Crafted Pixels Fea

Peter Prokop 628 Oct 28, 2021
BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

BPStatusBarAlert BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

Ben.Park 131 Nov 14, 2021
A Swift library to design custom prompts with a great scope of options to choose from.

Installation CocoaPods Install with CocoaPods by adding the following to your Podfile: source 'https://github.com/CocoaPods/Specs.git' platform :ios,

Gabriel Alvarado 742 Nov 6, 2021