Latest 1.0.0
Homepage https://github.com/ripplek/KAlertViewController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Swift简单的AlertView

apm

Features

功能浏览

Requirements

  • iOS9.0+
  • Xcode9.0+
  • Swift4.0+

Installation with CocoaPods

通过cocoaPods将KAlertViewController集成到你的项目中,首先要确保你已经安装了cocoaPods,然后执行
$pod init
配置podfile文件

target 'TargetName' do
pod 'KAlertViewController'
end

配置完成后执行
$pod install

usage

        let alertView = KAlertView(title: "KAlertView", message: "Warmly celebrate the completion of KAlertView creation")
        alertView.add(action: KalertAction(title: "取消", style: .cancel, handler: { (action) in
            print(action.title)
        }))

         //MARK: - 注意循环引用
        alertView.add(action: KalertAction(title: "确定", style: .destructive, handler: { [unowned alertView] (action) in
            print(action.title)
            for textField in alertView.textFields {
                print(textField.text ?? "")
            }
        }))
        alertView.addTextField { (textField) in
            textField.placeholder = "请输入账号"
        }
        alertView.addTextField { (textField) in
            textField.placeholder = "请输入密码"
        }
        let alertVC = KAlertController(alertView: alertView, preferredStyle: .alert)
        alertVC.backgoundTapDismissEnable = true
        present(alertVC, animated: true, completion: nil)

Latest podspec

{
    "name": "KAlertViewController",
    "version": "1.0.0",
    "summary": "A alert library for iOS",
    "description": "KAlertViewController is a custom alert view.nIt is applicable to the daily development of common frame requirements.nnInstructions for installationnare in [the README](https://github.com/ripplek/KAlertViewController).",
    "homepage": "https://github.com/ripplek/KAlertViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u5f20u5764": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ripplek/KAlertViewController.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": [
        "KAlertViewController/AlertController/*.swift",
        "KAlertViewController/AlertView/*.swift",
        "KAlertViewController/Animations/*.swift"
    ],
    "frameworks": "UIKit",
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This