Latest 1.0.0
Homepage https://github.com/akring/TipAlert-SwiftDemo
License MIT
Platforms ios 9.0, requires ARC
Authors

Swift3
[CocoaPods]()
GitHub issues
[Magnum CI]()

TipAlert-SwiftDemo

高仿QQ音乐提示评论Alert的Swift版

效果

效果

安装

手动安装

TipAlert 文件夹拖入项目即可

Cocoapods

pod 'TipAlert'

使用

API部分和系统自带的UIAlertView类似,点击按钮的回调使用了Block的方式实现。

  • 创建Alert并展示:
alert = TipAlert(message: "卖萌求鼓励nXXX新版本用着还喜欢么,给点鼓励好不好呢?", image: UIImage(named: "exampleImage")!, buttonArray: ["反馈问题","鼓励我们"])

        alert.acceptBlock = {

            print("去评价了!")
        }
        alert.denyBlock = {

            print("其实我是拒绝的!")
        }}
  • 需要弹出Alert的时候调用
@IBAction func showAlert(sender: AnyObject) {

        alert.show()
    }

Latest podspec

{
    "name": "TipAlert",
    "version": "1.0.0",
    "summary": "Beautiful alert with picture and button.",
    "description": "TipAlert is a lightweight and pure Swift implemented library for showing alert with picture and button. Always used for uset tips and rateing.",
    "homepage": "https://github.com/akring/TipAlert-SwiftDemo",
    "screenshots": "https://camo.githubusercontent.com/07700e4ab0b2691f658e9e35c6c65059db69fff5/687474703a2f2f3774653773792e636f6d312e7a302e676c622e636c6f7564646e2e636f6d2f546970416c6572742e706e67",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "akring": "[email protected]"
    },
    "social_media_url": "http://twitter.com/ddflj3310",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/akring/TipAlert-SwiftDemo.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "TipAlert/*.swift",
        "TipAlert/TipAlert.h",
        "TipAlert/TipAlert.swift"
    ],
    "public_header_files": [
        "TipAlert/TipAlert.h"
    ],
    "requires_arc": true,
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This