All Projects → jjessel → JHTAlertController

jjessel / JHTAlertController

Licence: MIT license
A custom iOS alert that replaces the stock UIAlertController. Easily style the alert to match your app. Written in Swift for iOS.

Programming Languages

swift
15916 projects
shell
77523 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to JHTAlertController

Sclalertview
Beautiful animated Alert View. Written in Objective-C
Stars: ✭ 3,426 (+5806.9%)
Mutual labels:  alert, carthage, uialertcontroller
LBXAlertAction
UIAlertView、UIActionSheet、UIAlertController封装,根据不同iOS版本选择对应的方法
Stars: ✭ 57 (-1.72%)
Mutual labels:  uialertview, uialertcontroller, alertcontroller
Jspanel4
A JavaScript library to create highly configurable floating panels, modals, tooltips, hints/notifiers/alerts or contextmenus for use in backend solutions and other web applications.
Stars: ✭ 217 (+274.14%)
Mutual labels:  alert, modal
Alertift
Swifty, modern UIAlertController wrapper.
Stars: ✭ 242 (+317.24%)
Mutual labels:  alert, carthage
Nativepopup
Clone of Apple iOS App's feedback popup, and easily customizable.
Stars: ✭ 247 (+325.86%)
Mutual labels:  alert, modal
React Popup
React popup component
Stars: ✭ 198 (+241.38%)
Mutual labels:  alert, modal
Pmalertcontroller
PMAlertController is a great and customizable alert that can substitute UIAlertController
Stars: ✭ 2,397 (+4032.76%)
Mutual labels:  alert, modal
Presentr
iOS let's you modally present any view controller, but if you want the presented view controller to not cover the whole screen or modify anything about its presentation or transition you have to use the Custom View Controller Presentation API's.
Stars: ✭ 2,816 (+4755.17%)
Mutual labels:  alert, modal
Jbox
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Stars: ✭ 1,251 (+2056.9%)
Mutual labels:  alert, modal
SPLarkController
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 967 (+1567.24%)
Mutual labels:  custom, modal
MultiModal
Use multiple .sheet, .alert, etc. modifiers in the same SwiftUI View
Stars: ✭ 49 (-15.52%)
Mutual labels:  alert, modal
TrendingCustomAlert
You can use a ready-made custom alert controller.
Stars: ✭ 25 (-56.9%)
Mutual labels:  alert, custom
Bdialog
Extend the Bootstrap Modal features, making dialog more functions and easier to use, dialog type including modal, alert, mask and toast types
Stars: ✭ 174 (+200%)
Mutual labels:  alert, modal
Alertifyjs
A javascript framework for developing pretty browser dialogs and notifications.
Stars: ✭ 1,922 (+3213.79%)
Mutual labels:  alert, modal
Wc Messagebox
基于 Vue 2.0 开发的 Alert, Toast, Confirm 插件, UI仿照 iOS 原生
Stars: ✭ 203 (+250%)
Mutual labels:  alert, modal
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (+72.41%)
Mutual labels:  alert, modal
Harpy
Harpy checks a user's currently installed version of your iOS app against the version that is currently available in the App Store. If a new version is available, an alert can be presented to the user informing them of the newer version, and giving them the option to update the application.
Stars: ✭ 2,619 (+4415.52%)
Mutual labels:  alert, carthage
ImageActionSheet
iOS Native style action sheet like in Whatsapp with the option of showing icons. It is a complete implementation and does not use any private api of UIKit.
Stars: ✭ 20 (-65.52%)
Mutual labels:  alert, alertcontroller
Smalltalk
Promise-based Alert, Confirm and Prompt replacement
Stars: ✭ 76 (+31.03%)
Mutual labels:  alert, modal
Ng Popups
🎉 Alert, confirm and prompt dialogs for Angular. Simple as that.
Stars: ✭ 80 (+37.93%)
Mutual labels:  alert, modal

JHTAlertController

Version License Platform Carthage compatible

alt tag alt tag alt tag

Easy to use

JHTAlertController is an easy to use replacement for UIAlertController. You can customize the appearance of your alert to match the theme of your app.

// Setting up an alert with a title and message
let alertController = JHTAlertController(title: "Turtle", message: "In this alert we use a String for the title instead of an image.", preferredStyle: .alert)

// Create the action.
let cancelAction = JHTAlertAction(title: "Cancel", style: .cancel,  handler: nil)

// Create an action with a completionl handler.
let okAction = JHTAlertAction(title: "Ok", style: .default) { _ in
   print("Do something here!")
}

// Add the actions to the alert.
alertController.addAction(cancelAction)
alertController.addAction(okAction)

// Show the action
present(alertController, animated: true, completion: nil)

Customize the Appearance

  • Change Fonts
  • Change Colors
  • Add Icons

Alert

// Change the background color
alertController.alertBackgroundColor = .black

// Round the corners
alertController.hasRoundedCorners = true

Title Block

// Use an image instead of text
alertController.titleImage = UIImage(named: "Turtle")
// If you add an image to the title block, you may need to set restrictTitleViewHeight to true, depending on the image size

// Change the color of the text
alertController.titleTextColor = .black

// Change the font
alertController.titleFont = .systemFont(ofSize: 18)

// Change the title block color
alertController.titleViewBackgroundColor = .black

// Add an icon image to the title block
let alertController = JHTAlertController(title: "Wow!", message: "You can even set an icon for the alert.", preferredStyle: .alert, iconImage: UIImage(named: "TurtleDark"))

Message

// Change the font
alertController.messageFont = .systemFont(ofSize: 18)

/ Change thte text color
alertController.messageTextColor = .black

Button

// Change the color of the divider
alertController.dividerColor = .black

// Change the color of the button during the creation of the action
let blueAction = JHTAlertAction(title: "Blue", style: .default, bgColor: .blue, handler: nil)

// Change the color for all buttons of a specific action
alertController.setButtonBackgroundColorFor(.default, to: .blue)

// Change the text color for a specific action
alertController.setButtonTextColorFor(.default, to: .white)

// Change the font for a specific action
alertController.setButtonFontFor(.default, to: .systemFont(ofSize: 18))

// Change all action types to a specific color
alertController.setAllButtonBackgroundColors(to: .blue)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 9.0 and higher

Installation

CocoaPods

JHTAlertController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JHTAlertController"

Carthage

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

You can install Carthage using Homebrew:

$ brew update
$ brew install carthage

To add JHTAlertController to your Xcode project using Carthage, update your Cartfile:

github "jjessel/JHTAlertController" ~> 0.2.4

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

Author

Jeremiah Jessel @ Jacuzzi Hot Tubs, LLC

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].