🚨Use the iPhone X Notch to display alerts. 🚨

Overview

NotchyAlert

Cocoapods compatible Carthage compatible Platform License Build Status

Prerequisites

  • Xcode 9.x
  • Swift 4.x
  • iPhone X Simulator/Device

Demo

Installation

Cocoapods

To install NotchyAlert using Cocoapods, add the following line to your Podfile:

pod 'NotchyAlert'

Carthage

To install NotchyAlert using Carthage, add the following line to your Cartfile:

github "TheAbstractDev/NotchyAlert"

Usage

First, you'll need to import NotchyAlert

import NotchyAlert

Title Only

let notchy = Notchy(title: "Oops!", description: nil, image: nil)
notchy.presentNotchy(in: self.view, duration: 3)

Title and Description

let notchy = Notchy(title: "Oops!", description: "No Internet Connection.", image: nil)
notchy.presentNotchy(in: self.view, duration: 3)

Title and Image

let notchy = Notchy(title: "Oops!", description: nil, image: "<YOUR IMAGE>")
notchy.presentNotchy(in: self.view, duration: 3)

Title, Decription and Image

let notchy = Notchy(title: "Oops!", description: "No Internet Connection.", image: "<YOUR IMAGE>")
notchy.presentNotchy(in: self.view, duration: 3)

Bounce Effect

By default, the bounce effect is true. You can choose to disable the bounce effect by setting false on the call of presentNotchy

notchy.presentNotchy(in: self.view, duration: 3, bounce: false)

Example

You can test it by downloading and run the Example project.

License

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

You might also like...
The easiest way to display highly customizable in app notification banners in iOS
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

SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
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

Zingle – An alert will display underneath your UINavigationBar 🎅
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

Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside

Description 🍃 Break the silence of your UI, whispering, shouting or whistling at it. Whisper is a component that will make the task of displaying mes

[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.
[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.

JDStatusBarNotification Show messages on top of the status bar. Customizable colors, font and animation. Supports progress display and can show an act

💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot

Notice: TSMessages is no longer being maintained/updated. We recommend everyone migrate to RMessage. This repository will be kept as is for those who

An easy to use UIAlertController builder for swift

LKAlertController An easy to use UIAlertController builder for swift Features Short and simple syntax for creating both Alerts and ActionSheets from U

Use UIAlertController like a boss.
Use UIAlertController like a boss.

Description Requirements Installation CocoaPods Carthage Usage License Description CatAlertController is a high level manager object that with chainin

JAlert - This is "Alert View" project for UIKit + SwiftUI. you can use easily

JAlert Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation JAlert is a

Comments
  • New Devices

    New Devices

    Is this project even being maintained anymore? The iPhone Xs, Xs Max, and Xr came out almost 9 months ago with no support in this project.

    If this project is no longer being maintained, please archive the repository on GitHub to let users know that it is no longer being maintained. Otherwise please stay up to date with maintaining support.

    In the codebase support is very manual and using things like device height to detect if it's an iPhone X, and manually setting the width of the notification:

    https://github.com/TheAbstractDev/NotchyAlert/blob/8959278d6a89347a9a413eef227596d359744db8/NotchyAlert/NotchyAlert.swift#L42

    https://github.com/TheAbstractDev/NotchyAlert/blob/8959278d6a89347a9a413eef227596d359744db8/NotchyAlert/NotchyAlert.swift#L58

    opened by fishcharlie 0
Owner
Sofiane Beors
Sofiane Beors
iOS tweak to display toasts for Low Power alerts and charging

Electrode iOS tweak to display toasts for Low Power alerts and charging. Localization Want to help translate Electrode to your language? Sumbit a pull

null 8 Sep 7, 2022
DropView - A SwiftUI library to display Apple Pencil and Pasteboard-like alerts on iOS.

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

Stefano Bertagno 46 Dec 4, 2022
A magic trick to hide the iPhoneX "Notch"

Cut The Notch - The Magic Trick This app helps your create an illusion that you can hide the iPhone X notch Trick Steps App will show a fake "notch" o

Wutian 94 Oct 30, 2022
A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil

Drops ?? A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil. Features iOS 10+ Can be used in Sw

Omar Albeik 709 Dec 29, 2022
Easily create different alerts in SwiftUI

AlertWizard ????‍♂️ This package lets you easily create different alerts in SwiftUI with the call of a single function. As this is my first package th

null 3 Jun 3, 2021
Bursts 🔥 A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI

Bursts ?? A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI Features iOS 10+ Can be used in UIKit and SwiftUI applications Lig

Jovins 11 Apr 22, 2022
Create Apple-like alerts & toasts using SwiftUI

AlertToast-SwiftUI Present Apple-like alert & toast in SwiftUI ?? Example ?? Overview Currently in SwiftUI, the only way to inform the user about some

Elai Zuberman 1.1k Dec 29, 2022
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 Dec 18, 2022
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 37 Dec 9, 2022
BeautyAlert - BeautyAlert provides alerts with custom shapes, colors, buttons

BeautyAlert helps you can easily design by determining the color, shape, and sha

chacha 17 Sep 8, 2022