CatAlertController
  • November 3, 2023

Description


CatAlertController is a high level manager object that with chaining style for UIAlertController.

Requirements


  • Swift 4+
  • iOS 8.0+

Installation


CatAlertController is available through CocoaPods and Carthage.

CocoaPods

Add the following line to your Podfile:

use_frameworks!

pod ‘CatAlertController’

Carthage

Add the following line to your Cartfile:

github “ImKcat/CatAlertController”

Usage


Here is the alert style sample code in iPhone:

CatAlertController(title: “CatAlertController”,
message: “This is CatAlertController”,
preferredStyle: UIAlertControllerStyle.alert)
.addAction(UIAlertAction(title: “Cancel”, style: UIAlertActionStyle.cancel))
.addAction(UIAlertAction(title: “OK”, style: UIAlertActionStyle.default))
.flash(from: self, delay: 0.3)

Here is the action sheet style sample code in iPad:

// Don’t worry the action sheet style present in iPad, it won’t be crash, take it easy 🙂
CatAlertController(title: “CatAlertController”,
message: “This is CatAlertController”,
preferredStyle: UIAlertControllerStyle.actionSheet)
.addAction(UIAlertAction(title: “Item 1”))
.addAction(UIAlertAction(title: “Item 2”))
.addAction(UIAlertAction(title: “Item 3”))
.addAction(UIAlertAction(title: “Cancel”, style: UIAlertActionStyle.cancel))
.flash(from: self, delay: 1)

GitHub


View Github

#ios #popup #swift #uialertcontroller
YOU MIGHT ALSO LIKE...
CameraBackground

Features Both front and back camera supported. Flash modes: auto, on, off. Countdown timer. Tap to focus. Pinch to zoom. Usage  

DKCamera

Description A light weight & simple & easy camera for iOS by Swift. It uses CoreMotion framework to detect device orientation, so ...

HorizonSDK-iOS

Horizon SDK is a state of the art real-time video recording / photo shooting iOS library. Some of the features ...

LLSimpleCamera

LLSimpleCamera: A simple customizable camera - video recorder control LLSimpleCamera is a library for creating a customized camera - video ...

RSBarcodes_Swift

RSBarcodes allows you to read 1D and 2D barcodes using the metadata scanning capabilities introduced with iOS 7 and generate ...