Skip to content

enix223/EYSnapAlert

Repository files navigation

EYSnapAlert

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.

About

A simple alert box for iOS, with customised showing style.

Resources

License

Stars

Watchers

Forks

Packages

No packages published