JLAlertView
  • September 14, 2023

An UIAlertView replacement written in Swift with a modern chainable API and highly customizable UI, inspired by SIAlertView and SweetAlert-iOS.

Screenshot


screenshot

Requirements


  • iOS 9.0 and higher
  • Xcode 7.3(Swift 2.2)

Installation


CocoaPods(Recommended)

pod ‘JLAlertView’

use_frameworks!

Carthage

JLAlertView is compatible with Carthage. Add this to you Cartfile:

github “skyline75489/JLAlertView”

Manually

Add JLAlertView.swift in your project.

Usage


JLAlertView(title: “Default Style”, message: “Standard Alert”)
.addTextFieldWithConfigurationHandler({ (textField) in
textField.placeholder = “Username”
})
.addTextFieldWithConfigurationHandler({ (textField) in
textField.placeholder = “Password”
})
.addButttonWithTitle(“Cancel”, style: .Cancel, action: nil)
.addButttonWithTitle(“OK”, action:{(title, alert) in
let username = alert.textFields[0].text
let password = alert.textFields[1].text
print(username)
print(password)
})
.show()

GitHub


View Github

YOU MIGHT ALSO LIKE...
PermissionsSwiftUI: A SwiftUI package to handle permissions

PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. ...

Pager tab strip view

Introduction PagerTabStripView is the first pager view built in pure SwiftUI. It provides a component to create interactive pager views ...

PageView

SwiftUI view enabling page-based navigation, imitating the behaviour of UIPageViewController in iOS.

Pages

    

How to take action when a property changes

1. Taking Action When a Property Changes: Property Observers Swift lets you observe and respond to changes in a property’s ...