Zurück zum Ranking

pmusolino/PMAlertController

Swift

PMAlertController is a great and customizable alert that can substitute UIAlertController

alertpopupdialogbannermodalswift
Sterne-Wachstum
Sterne
2.5k
Forks
184
Wochenwachstum
Issues
8
1k1.5k2k2.5k
Mai 2016Sept. 2019Feb. 2023Juli 2026
README

Icon

Language GitHub license Pod version Carthage Compatible

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable alert that you can use in your iOS app. Enjoy!

Icon

Features


  • Header View
  • Header Image (Optional)
  • Title
  • Description message
  • Customizations: fonts, colors, dimensions & more
  • 1, 2 buttons (horizontally) or 3+ buttons (vertically)
  • Closure when a button is pressed
  • Text Fields support
  • Similar implementation to UIAlertController
  • Cocoapods
  • Carthage
  • Animation with UIKit Dynamics
  • Objective-C compatibility
  • Swift 4, Swift 4.2 & Swift 5 support
  • Swift Package Manager

Requirements


  • iOS 9.0+
  • Xcode 10+

CocoaPods


CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate PMAlertController into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'PMAlertController'

Then, run the following command:

$ pod install

Carthage


Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate PMAlertController into your Xcode project using Carthage, specify it in your Cartfile:

github "pmusolino/PMAlertController"

Run carthage update to build the framework and drag the built PMAlertController.framework into your Xcode project.

Manually


  1. Download and drop /Library folder in your project.
  2. Congratulations!

Usage


The usage is very similar to UIAlertController. PMAlertController has two styles: Alert & Walkthrough.

Alert Style: with this style, the alert has the width of 270 points, like Apple's UIAlertController.

Walkthrough Style: with walkthrough, the alert has the width of the screen minus 18 points from the left and the right bounds. This mode is intended to be used before authorization requests like the ones for location, push notifications and more.

Show a simple alert with two buttons and one textfield

//This code works with Swift 5

let alertVC = PMAlertController(title: "A Title", description: "My Description", image: UIImage(named: "img.png"), style: .alert)

alertVC.addAction(PMAlertAction(title: "Cancel", style: .cancel, action: { () -> Void in
            print("Capture action Cancel")
        }))

alertVC.addAction(PMAlertAction(title: "OK", style: .default, action: { () in
            print("Capture action OK")
        }))

alertVC.addTextField { (textField) in
            textField?.placeholder = "Location..."
        }

self.present(alertVC, animated: true, completion: nil)

Swift compatibility

Third Party Bindings

React Native

You may now use this library with React Native via the module here

Contributing

  • 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.

Acknowledgements

Made with ❤️ by Paolo Musolino.

Follow me on:

💼 Linkedin

🤖 Twitter

🌇 Instagram

👨🏼‍🎤 Facebook

MIT License


PMAlertController is available under the MIT license. See the LICENSE file for more info.

Ähnliche Repositories
t4t5/sweetalert

A beautiful replacement for JavaScript's "alert"

TypeScriptnpmMIT Licensemodalsweetalert
sweetalert.js.org
22.3k2.8k
afollestad/material-dialogs

😍 A beautiful, fluid, and extensible dialogs API for Kotlin & Android.

KotlinApache License 2.0dialogsandroid
af.codes
19.6k3.1k
sweetalert2/sweetalert2

✨ A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies. 🇺🇦🇪🇺

JavaScriptnpmMIT Licensesweetalertalert
sweetalert2.github.io
18.1k1.6k
openspug/spug

开源运维平台:面向中小型企业设计的轻量级无Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、文件在线上传下载、应用发布部署、在线任务计划、配置中心、监控、报警等一系列功能。

JavaScriptnpmGNU Affero General Public License v3.0opsoperations
ops.spug.cc
11k2.2k
ng-bootstrap/ng-bootstrap

Angular powered Bootstrap

TypeScriptnpmMIT Licenseangularng-bootstrap
ng-bootstrap.github.io
8.2k1.6k
layui/layer

丰富多样的 Web 弹出层组件,可轻松实现 Alert/Confirm/Prompt/ 普通提示/页面区块/iframe/tips等等几乎所有的弹出交互。目前已成为最多人使用的弹层解决方案

JavaScriptnpmMIT Licenselayerdialog
layui.dev/2.7/layer/
8.2k2.7k
samber/awesome-prometheus-alerts

🚨 Collection of Prometheus alerting rules

AstroOtherprometheusalertmanager
samber.github.io/awesome-prometheus-alerts/
8.1k1.2k
huri000/SwiftEntryKit

SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.

SwiftMIT Licensebannerpopup
6.8k622
jaredreich/notie

🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies

JavaScriptnpmMIT Licensejavascriptnotifications
6.3k368
dillidon/alerts-and-pickers

Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...

SwiftMIT Licenseuialertcontrollerpicker
5.8k702
vegasbrianc/prometheus

A docker-compose stack for Prometheus monitoring

MIT Licensedockerprometheus
4.6k1.5k
calimarkus/JDStatusBarNotification

Highly customizable & feature rich notifications. Interactive dismiss. Custom Views. SwiftUI. Tap-to-hold. Progress. Written in Swift, compatible for ObjC!

SwiftMIT Licensebannerios
calimarkus.github.io/JDStatusBarNotification/documentation/jdstatusbarnotification
4.3k564