HYAlertController alternatives and similar libraries
Based on the "Alert" category.
Alternatively, view HYAlertController 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. -
SPIndicator
Floating indicator, mimicrate to indicator which appear when silent mode switched. Can be present from top and bottom. Interactive with gesters. -
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 HYAlertController or a related project?
README
HYAlertController
HYAlertController is a minimalist alert control, that contains a variety of usage scenarios. It has the same syntax as Apple's UIAlertController
, so you can easily use it in your own app.
[δΈζθ―΄ζ](Docs/README_cn.md)
Alert Style
Sheet Style
Share Style
Features
- [x] Title
- [x] Description message(adaptive height)
- [x] Button with icon
- [x] The default has the cancel button
- [x] New share style
- [x] Closure when a button is clicked
- [x] Similar syntax to UIAlertController
- [x] Swift 3 support
- [x] Cocoapods
- [ ] Carthage
Requirements
- Swift 3
- iOS 10.0+
- Xcode 8+
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
Then create Podfile
file into your Xcode project, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
pod 'HYAlertController'
Finially, you will complete it with the following command:
$ pod install
Manually
Download and drop /HYAlertController
folder in your project.
Usage
The usage is very similar to UIAlertController. HYAlertController
has three styles: Alert, Sheet and Share.
Alert Style: with this style, you can center the contents of the display as a reminder to the user operation of the dialog box;
Sheet Style: with this style, you can display the contents of the bottom of the screen, the following will pop up a dialog box for the user to select;
Share Style: similar to Sheet Style, the difference is that this style can be used for sharing, you can quickly complete the creation of mainstream sharing style.
Alert Style
//Work with Swift 3
let alertVC: HYAlertController = HYAlertController (title: "Title", message: "Here you can describe the details of its title, and you can write here what you want to express.", style: .alert)
let oneAction: HYAlertAction = HYAlertAction (title: "One Action", style: .normal, handler: { (action) in
print(action.title)
})
let twoAction: HYAlertAction = HYAlertAction (title: "Two Action", style: .normal, handler: { (action) in
print(action.title)
})
let threeAction: HYAlertAction = HYAlertAction (title: "Three Action", style: .destructive, handler: { (action) in
print(action.title)
})
let cancelAction: HYAlertAction = HYAlertAction (title: "Cancel Action", style: .cancel, handler: { (action) in
print(action.title)
})
alertVC.addAction(action: oneAction)
alertVC.addAction(action: twoAction)
alertVC.addAction(action: threeAction)
alertVC.addAction(action: cancelAction)
self.present(alertVC, animated: true, completion: nil)
Sheet Style
//Work with Swift 3
let alertVC: HYAlertController = HYAlertController (title: "Title", message: "Here you can describe the details of its title, and you can write here what you want to express.", style: .actionSheet)
let oneAction: HYAlertAction = HYAlertAction (title: "One Action", style: .normal, handler: { (action) in
print(action.title)
})
let twoAction: HYAlertAction = HYAlertAction (title: "Two Action", style: .normal, handler: { (action) in
print(action.title)
})
let threeAction: HYAlertAction = HYAlertAction (title: "Three Action", style: .destructive, handler: { (action) in
print(action.title)
})
let cancelAction: HYAlertAction = HYAlertAction (title: "Cancel Action", style: .cancel, handler: { (action) in
print(action.title)
})
alertVC.addAction(action: oneAction)
alertVC.addAction(action: twoAction)
alertVC.addAction(action: threeAction)
alertVC.addAction(action: cancelAction)
self.present(alertVC, animated: true, completion: nil)
Share Style
//Work with Swift 3
let alertVC: HYAlertController = HYAlertController (title: nil, message: nil, style: .shareSheet)
let oneAction: HYAlertAction = HYAlertAction (title: "Facebook", image: UIImage (named: "facebook")!, style: .normal, handler: {
(action) in
print(action.title)
})
let twoAction: HYAlertAction = HYAlertAction (title: "Twitter", image: UIImage (named: "twitter")!, style: .normal, handler: {
(action) in
print(action.title)
})
let threeAction: HYAlertAction = HYAlertAction (title: "Snapchat", image: UIImage (named: "snapchat")!, style: .normal, handler: {
(action) in
print(action.title)
})
let fourAction: HYAlertAction = HYAlertAction (title: "Instagram", image: UIImage (named: "instagram")!, style: .normal, handler: {
(action) in
print(action.title)
})
let fiveAction: HYAlertAction = HYAlertAction (title: "Pinterest", image: UIImage (named: "pinterest")!, style: .normal, handler: {
(action) in
print(action.title)
})
let sixAction: HYAlertAction = HYAlertAction (title: "Line", image: UIImage (named: "line")!, style: .normal, handler: {
(action) in
print(action.title)
})
alertVC.addShareActions(actions: [oneAction, twoAction, threeAction, fourAction, fiveAction, sixAction])
self.present(alertVC, animated: true, completion: nil)
For more usage scenarios, please refer to
HYAlertControllerDemo
for details.
Swift Version
HYAlertController
is developed with Swift 3, so your Swift version must be Swift 3.
Custom
HYAlertController
does not provide customization outside, which is related to the developer's idea. If you want to make some basic changes, download the project source and modify theHY_Constants.swift
file, which contains some basic setting constants, modify it.
After modification, you can integrate into your project using the above manual installation method.
Communicate
- If you need help or you'd like to ask a general question, open an issue;
- If you found a bug, open an issue;
- If you have a feature request, open an issue;
- If you want to contribute, submit a pull request.
MIT License
HYAlertController is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the HYAlertController README section above
are relevant to that project's source code only.