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

     

camerakit-ios

CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service ...

HybridCamera

[video width="192" height="416" mp4="https://swiftgit.com/wp-content/uploads/2024/12/68747470733a2f2f7261776769742e636f6d2f7374796c656b69742f696d672f6d61737465722f7669645f6564697465645f325f326d622e676966.mp4"][/video]

TakeASelfie

An iOS framework that uses the front camera, detects your face and takes a selfie. This api opens the front ...

iOS-Depth-Sampler

Code examples of Depth APIs in iOS