Latest 1.0
Homepage https://github.com/TheAbstractDev/NotchyAlert
License MIT
Platforms ios 11.0
Frameworks UIKit
Authors

Cocoapods compatible
Carthage compatible
Platform
License

Prerequisites

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

Demo

notchySimple
notchyWithDescription
notchyWithImage
notchyWithDescImage

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.

Latest podspec

{
    "name": "NotchyAlert",
    "version": "1.0",
    "summary": "Use the iPhone X notch space to display creative alerts.",
    "homepage": "https://github.com/TheAbstractDev/NotchyAlert",
    "authors": {
        "Sofiane Beors (TheAbstractDev)": "[email protected]"
    },
    "license": "MIT",
    "source": {
        "git": "https://github.com/TheAbstractDev/NotchyAlert.git",
        "tag": "v1.0"
    },
    "source_files": [
        "NotchyAlert",
        "NotchyAlert/**/*.{h,m}"
    ],
    "frameworks": "UIKit",
    "platforms": {
        "ios": "11.0"
    }
}

Pin It on Pinterest

Share This