TemporaryAlert 1.1.0

TemporaryAlert 1.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Daniel Barros.



  • By
  • Daniel Barros

Temporary alerts similar to those in Apple's Music app.

Features:

  • Temporary and unobstrusive alerts.
  • Super-simple API.
  • Customizable appearance and behavior.
  • Built-in cross and checkmark images, the latter with a nice animation.

Usage

Showing an alert:

TemporaryAlert.show(image: .checkmark, title: "Added to your Library", message: nil)

Customizing alerts:

TemporaryAlert.Configuration.lifeSpan = 2
TemporaryAlert.Configuration.titleColor = .red

Example

Installation

Manually

Drag the whole project into your workspace, build it, and add the framework to the Embedded Binaries of your project.

Known issues

Xcode might generate a warning like this:

<UIVisualEffectView 0x0123456789> is being asked to animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

However, you can safely ignore it. The result is as expected.
Anyone with a fix is welcome to create a pull request =).