An alternative to using the native UIAlertController, with a thoughtful design and simple implementation.

Overview

Platform: iOS 15.0+ Language: Swift 5 License: MIT

HPAlertController

An alternative to using the native UIAlertController, with a thoughtful design and simple implementation.

example

Requirements

iOS 15.0 and higher

Installation

Swift Package Manager:

dependencies: [
  .package(url: "https://github.com/hugo-pivaral/HPAlertController.git", .exact("1.0.0")),
],

After installing the SPM into your project import HPAlertController with

import HPAlertController

Usage

Using HPAlertController is simple, very much like using UIAlertController. Simply make an instance of HPAlertController with the info you want to be presented, add the actions from which to choose, and present the alert using the present(_:animated:completion:) method.

let alert = HPAlertController(title: "Successful",
                              message: "Your information has been updated on our server.",
                              icon: .success,
                              alertTintColor: .default)
        
let continueAction = HPAlertAction(title: "Continue", style: .default) {
    // do something
}

let cancelAction = HPAlertAction(title: "Cancel", style: .cancel)

alert.addAction(continueAction)
alert.addAction(cancelAction)

present(alert, animated: true)

Author

Hugo Pivaral

License

HPAlertController is under the MIT license. See LICENSE for details.

You might also like...
A property finder application written using React Native

React Native PropertyFinder App This repository accompanies the tutorial I published on Ray Wenderlich's website, which describes the process of build

RegistrationScreen -  Original App Design Project
RegistrationScreen - Original App Design Project

Original App Design Project Spots Table of Contents Overview Product Spec Wireframes Schema Overview Description Have you ever went to a different cit

Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.

Prism is a Design System code generator developed by the team at Gett đźš• . Synchronizing design teams with engineering teams is a huge challenge. As t

A simple To Do application written in React Native

Example To Do List application in react-native Requirements, install as needed: React Native: $ npm i -g react-native-cli watchman: $ brew install wa

Blazing⚡️Fast BTC and ETH Wallet Generator library for React Native, Android and iOS

Blazing ⚡️ Fast BTC and ETH Wallet Generator library for React Native, Android and iOS.

AuroraEditor is a IDE built by the community, for the community, and written in Swift for the best native performance and feel for macOS.
AuroraEditor is a IDE built by the community, for the community, and written in Swift for the best native performance and feel for macOS.

AuroraEditor AuroraEditor is a IDE built by the community, for the community, and written in Swift for the best native performance and feel for macOS.

High-quality source code, easy implementation

High-quality source code, easy implementation

Open-source implementation of Apple's Combine for processing values over time

CombineX 简体中文 Open-source implementation of Apple's Combine for processing values over time. Though CombineX have implemented all the Combine interfac

WobbleView is an implementation of a recently popular wobble effect for any view in your app
WobbleView is an implementation of a recently popular wobble effect for any view in your app

WobbleView is an implementation of a recently popular wobble effect for any view in your app. It can be used to easily add dynamics to user interactions and transitions.

Owner
Hugo Pivaral
iOS & Web developer. Passionate for creating amazing digital products & experiences.
Hugo Pivaral
Compare your implementation and design, see how much they match!

DesignDetective Preview Usage You may trigger anywhere, but I personally prefer using it via Shake Gesture import DesignDetective extension UIWindow

Enes Karaosman 43 Dec 13, 2022
An example implementation of using a native iOS Notification Service Extension (to display images in remote push notification) in Titanium.

Titanium iOS Notification Service Extension An example implementation of using a native iOS Notification Service Extension (to display images in remot

Hans Knöchel 8 Nov 21, 2022
React Native library that implements PayPal Checkout flow using purely native code (swift).

react-native-paypal-swift React Native library that implements PayPal Checkout flow using purely native code (swift). Installation npm install react-n

Tibb 6 Nov 28, 2022
Vahesaroyan-react-native-bubble-select - React native bubble picker

@vahesaroyan/react-native-bubble-select React native bubble picker Installation

Vahe Saroyan 0 Jan 30, 2022
React Native utility library around image and video files for getting metadata like MIME type, timestamp, duration, and dimensions. Works on iOS and Android using Java and Obj-C, instead of Node 🚀.

Qeepsake React Native File Utils Extracts information from image and video files including MIME type, duration (video), dimensions, and timestamp. The

Qeepsake 12 Oct 19, 2022
Kushal Shingote 1 Feb 2, 2022
Yummies is my first attempt at building a native iOS app using Swift and SwiftUI

Yummies is my first attempt at building a native iOS app using Swift and SwiftUI. A recipe browser where you can pin your favorite ones. Powered by Edamam Recipe Search API.

Yavor Radulov 2 Aug 27, 2022
A repository to experiment around the use and generation of tokens for the JLL/T Design System

Basic Style Dictionary This example code is bare-bones to show you what this framework can do. If you have the style-dictionary module installed globa

null 0 Dec 7, 2021
Quizzler - iOS App Design Pattern(MVC) and Code Structuring

Quizzler iOS App Design Pattern(MVC) and Code Structuring What you will learn Ho

null 0 Jan 10, 2022
A react native interface for integrating payments using Braintree

A react native interface for integrating payments using Braintree

eKreative 17 Dec 30, 2022