Latest 0.1.1
Homepage https://github.com/ImKcat/CatAlertController
License MIT
Platforms ios 8.0, requires ARC
Authors

Logo

LanguageSupport Platform
License

Carthage compatible
CocoaPods Version

Travis CI Status
Codebeat
Beerpay

Description

The CatAlertController is a high level manager object for UIAlertController.

Requirements

  • Swift 4+
  • iOS 8.0+

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, handler: nil))
                    .addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
                    .flash(from: self, animated: true, delay: 0.3, completion: nil)

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: "Action Sheet Style", 
                    message: "This is CatAlertController", 
                    preferredStyle: UIAlertControllerStyle.actionSheet)
                    .addAction(UIAlertAction(title: "Item 1", style: UIAlertActionStyle.default, handler: nil))
                    .addAction(UIAlertAction(title: "Item 2", style: UIAlertActionStyle.default, handler: nil))
                    .addAction(UIAlertAction(title: "Item 3", style: UIAlertActionStyle.default, handler: nil))
                    .addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil))
                    .flash(from: self, animated: true, delay: 1, completion: nil)

License

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

Latest podspec

{
    "name": "CatAlertController",
    "version": "0.1.1",
    "summary": "Use UIAlertController like the boss.",
    "description": "CatAlertController is a high level manager object for UIAlertController.",
    "homepage": "https://github.com/ImKcat/CatAlertController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kcat": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ImKcat/CatAlertController.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://imkcat.com",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*.{h,c,swift}"
}

Pin It on Pinterest

Share This