Latest 0.0.5
Homepage https://github.com/shien7654321/STAlertController
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

Language
Platform
Version
License

A subclass of UIAlertController that can be presented one by one in a queue

STAlertController is a subclass of UIAlertController that can be presented one by one in a queue. When STAlertController is clicked and disappears, the next STAlertController will be presented.

STAlertControllerPreview01

Requirements

  • iOS 8.0 or later
  • ARC
  • Swift 5.0

Installation

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

pod 'STAlertController'

Usage

Import headers in your source files

In the source files where you need to use the library, import the header file:

import STAlertController

Initialize STAlertController

Use the following function to initialize the STAlertController:

let alertController = STAlertController(title: "Title", message: "Message", preferredStyle: .alert)

Initialize STAlertAction

Use the following function to initialize the STAlertAction:

let alertAction = STAlertAction.createAction(title: "OK", style: .cancel) { action in
    print("Clicked OK")
}

AddAction

Use the following function to add the STAlertAction to the STAlertController:

alertController.addAction(alertAction)

PresentAlertController

At last, use the following function to present the STAlertController on an instance of UIViewcontroller:

presentAlertController(alertController)

DismissAlertController

Of course, the following methods can also be used to dimiss the STAlertController:

dismissAlertController()

Author

Suta, [email protected]

License

MIT license.

Latest podspec

{
    "name": "STAlertController",
    "version": "0.0.5",
    "summary": "A subclass of UIAlertController that can be presented one by one in a queue.",
    "homepage": "https://github.com/shien7654321/STAlertController",
    "authors": {
        "Suta": "[email protected]"
    },
    "source": {
        "git": "https://github.com/shien7654321/STAlertController.git",
        "tag": "0.0.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "source_files": "STAlertController/*.{swift}",
    "compiler_flags": "-fmodules",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "5.0"
    },
    "description": "STAlertController is a subclass of UIAlertController that can be presented one by one in a queue."
}

Pin It on Pinterest

Share This