Description
Mimicrate to indicator which appear when silent mode turn on / off. Availalbe 2 animated presets: done & error. Also support custom images and present from top, center & bottom side. For get alert like in Apple music, use library SPAlert.
SPIndicator alternatives and similar libraries
Based on the "Alert" category.
Alternatively, view SPIndicator alternatives based on common mentions on social networks and blogs.
-
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
PMAlertController
PMAlertController is a great and customizable alert that can substitute UIAlertController -
Jelly
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API. -
MijickPopupView
Popups, popovers, sheets, alerts, toasts, banners, (...) presentation made simple. Written with and for SwiftUI. -
CDAlertView
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift -
SPAlert
DISCONTINUED. Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets. [Moved to: https://github.com/varabeis/SPAlert] -
StatusAlert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way. -
Indicate
Interactive notification pop-over (aka "Toast) modeled after the iOS AirPods and Apple Pencil indicator.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SPIndicator or a related project?
README
SPIndicator
Mimicrate for the indicator which appears when silent mode is turned on / off. Availalbe 2 animated presets: done
& error
. Also supports custom images and presentations from top, center & bottom sides.
To get an alert like in Apple music, use this library instead SPAlert.
Navigate
Installation
Ready for use on iOS 12+ & tvOS 12+.
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
Once you have your Swift package set up, adding as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/ivanvorobei/SPIndicator", .upToNextMajor(from: "1.6.0"))
]
CocoaPods:
CocoaPods is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your Podfile
:
pod 'SPIndicator'
Manually
If you prefer not to use any of dependency managers, you can integrate manually. Put Sources/SPIndicator
folder in your Xcode project. Make sure to enable Copy items if needed
and Create groups
.
Quick Start
For best experience, I recommend presenting indicator by calling the class functions SPIndicator
. These functions are updated regularly and show the indicator as Apple way:
// Presets:
SPIndicator.present(title: "Error", message: "Try Again", preset: .error)
// For show with custom image:
let image = UIImage.init(systemName: "sun.min.fill")!.withTintColor(.systemYellow, renderingMode: .alwaysOriginal)
SPIndicator.present(title: "Custom Image", message: "With tint color", preset: .custom(image)))
// For show text only:
SPIndicator.present(title: "Error", haptic: .error)
Usage
Duration
To change the presentation duration time, create the indicator view and call the method present
with a custom duration:
let indicatorView = SPIndicatorView(title: "Complete", preset: .done)
indicatorView.present(duration: 3)
Layout
To customise the layout & margins use the layout
property. You can manage margins for each side, icon size and space between image and titles:
indicatorView.layout.iconSize = .init(width: 24, height: 24)
indicatorView.layout.margins.top = 12
Dismiss by Drag
By default, you can drag the indicator to hide it. While the indicator is dragging, dismiss is not working. This behaviour can be disabled:
indicatorView.dismissByDrag = false
Haptic
To manage haptics, you shoud pass it in present method:
indicatorView.present(duration: 1.5, haptic: .success, completion: nil)
You can remove the duration and completion parameters from the init. They have default values.
Present Side
You can change the presentation side:
SPIndicator.present(title: "Error", message: "Try Again", preset: .error, from: .bottom)
// or for custom `SPIndicatorView`
indicatorView.presentSide = .bottom
In the case from above, the indicator will appear from bottom and will be attached to bottom. To manage the offset - check the property offset
.
Shared Configuration
Also, you can change some default values for the alerts. For example, you can change the default duration for an alert with this code:
SPIndicatorView.appearance().duration = 2
It will apply for all alerts. I recommend to set it in app delegate, but you can change it in runtime.
SwiftUI
Use like system alert only show message tips:
Button("Show Indicator") {
showIndicator = true
}.SPIndicator(isPresent: $showIndicator, title: "This is title only")
or show message, title, image and other configuration:
Button("Show Indicator") {
showIndicator = true
}.SPIndicator(
isPresent: $showIndicator,
title: "Title",
message: "Message",
duration: 2.0,
presentSide: .top,
dismissByDrag: false,
preset: .custom(UIImage(systemName: "heart")!),
haptic: .success,
layout: .init(),
completion: {
print("Indicator is destoryed")
})
Russian Community
Я веду телеграм-канал, там публикую новости и туториалы. С проблемой помогут в чате.
Видео-туториалы выклыдываю на YouTube: