Latest1.3.4
Homepagehttps://github.com/ChaselAn/FancyAlert
LicenseMIT
Platformsios 9.0, requires ARC
Authors
  • A more fancy alert
  • You can use it like UIAlert

Requirements

  • Swift 4.1, iOS 9

Installation

  • With Cocoapods:
pod 'FancyAlert', '~> 1.3.3'
# Then, run the following command:
$ pod install

Example

  • Normal Alert

FancyAlert

  • Alert with TextField

FancyAlert

  • Alert with TextView

FancyAlert

  • Alert with Progress

FancyAlert

  • ActionSheet

FancyAlert

How to use

let firstAction = FancyAlertAction(title: "第一个", style: .normal, handler: {
            print("第一个action")
        })
let alertViewController = FancyAlertViewController(style: .alert, title: "大标题大标题大标题大标题大标题大标题大标题大标题大标题", message: "小标题小标题小标题小标题小标题小标题小标题小标题小标题小标题小标题小标题小标题小标题小标题", actions: [firstAction])
let cancelAction = FancyAlertAction(title: "取消", style: .cancel, handler: {
            print("取消action")
        })
alertViewController.addAction(cancelAction)
alertViewController.editType = .textField // Input box style
alertViewController.textField.maxInputLength = 10 // max input length
alertViewController.hasProgress = true // have progress
alertViewController.progress = 0.5 // progress value
present(alertViewController, animated: true, completion: nil)

Latest podspec

{
    "name": "FancyAlert",
    "version": "1.3.4",
    "summary": "fancy alert",
    "homepage": "https://github.com/ChaselAn/FancyAlert",
    "license": "MIT",
    "authors": {
        "ChaselAn": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/ChaselAn/FancyAlert.git",
        "tag": "1.3.4"
    },
    "source_files": "FancyAlertDemo/FancyAlert/*.swift",
    "requires_arc": true,
    "resources": "FancyAlertDemo/*.xcassets"
}

Pin It on Pinterest

Share This