Latest 0.3.0
Homepage https://github.com/enix223/EYSnapAlert
License MIT
Platforms ios 8.0
Authors

A simple alert box designed for iOS, with simple API.

Pod Version
License

screenshot


Requirement

Library is developed and tested with XCode 8+ and Swift 3.0

Installation

Pod

pod 'EYSnapAlert'

Manually

Drag ‘EYSnapAlert.swift’ to your project

Usage

Show an alert with default values

Show a alert with a single line

// Show alert with default settings
EYSnapAlert.show(message: "世界,你好")

Show an alert with user specific parameters

// Show alert with fully customized setttings
EYSnapAlert.show(message: String(format: "你好,世界, [Style: %@]", cell.textLabel!.text!),
                 backgroundColor: UIColor.black,
                 textSize: 12,
                 textColor: UIColor.white,
                 duration: 3,
                 animationTime: 0.2,
                 cornerRadius: 5,
                 style: .popUp,
                    onTap: { (alert) in
                    alert.hide()
                    print("Alert is tap...")
                 },
                 onDimissed: {() in
                    print("Alert was dismissed")
                 })

For more detail, please refer to the Example project.

Latest podspec

{
    "name": "EYSnapAlert",
    "version": "0.3.0",
    "summary": "A simple alert box for iOS, with customized style.",
    "description": "EYSnapAlert is a simple alert box for iOS, written with Swift, with simple API, customized styles.",
    "homepage": "https://github.com/enix223/EYSnapAlert",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "enix223": "[email protected]"
    },
    "source": {
        "git": "https://github.com/enix223/EYSnapAlert.git",
        "tag": "0.3.0"
    },
    "social_media_url": "https://twitter.com/enixyu",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "EYSnapAlert/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This