NotchyAlert
  • November 3, 2023

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, Description 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.

GitHub


View Github

#animation #iphonex #swift
YOU MIGHT ALSO LIKE...
ConfettiView

A SwiftUI View that emits confetti with user-defined shapes, images, and text.

SwiftUI Colour Wheel

A colour wheel made all in SwiftUI. There are 2 different colour wheels to choose from. The first main one ...

ColorPickerRing

A color picker implementation with color wheel appearance written in plain SwiftUI. It is compatible with UIColor and NSColor.

ASCollectionView

This repository is no longer maintained. Here's why: with the release of iOS 16 SwiftUI now enables most of the ...