Latest 0.1.0
Homepage https://github.com/c2mInc/C2Alert
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

About

C2Alert is a simple alert library with good and customizable design.

With Icon

C2AlertC2Alert

No Icon

C2AlertC2Alert

Requirements

Installation

C2Alert is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'C2Alert'

Supported Swift Versions

C2Alert Version Swift Version Min. iOS Version
=> 0.1.0 Swift 3 >= iOS 9.0

Getting started

Create a C2Alert object with suitable initializer, then call the show function

Usage

Basic


let alert = C2Alert(title: "Success", message: "You're doing great!", image: UIImage(named: "success_icon")!)
alert.show()

Available modifiers


let alert = C2Alert(title: "Success", message: "You're doing great!", image: UIImage(named: "success_icon")!)
alert.autoHideAfterSeconds = 5
alert.dialogBackgroundColor = .gray
alert.dialogImageColor = .black
alert.dialogMessageTextColor = .black
alert.dialogTitleTextColor = .black
alert.duration = 0.6 // This is show and hide animate duration
alert.hideOnBackgroundTouch = false // default true
alert.imageSize = CGSize(width: 100, height: 100)
alert.messageFont = UIFont(name: "Avenir-Roman", size: 15)!
alert.titleFont = UIFont(name: "Avenir-Heavy", size: 18)!
alert.overlay = true // default true
alert.overlayColor = .black // default black
alert.overlayOpacity = 0.3 // default 0.6
alert.paddingFromSides = 30 // default 32
alert.seperatorHeight = 8 // Space between title, message and image
alert.paddingTopAndBottom = 22 // default 24
alert.show()

Requirements

  • iOS 9.0+
  • Xcode 8.0+
  • Swift 3.0+

Author

Connected2.me / Berk Kaya

License

C2Alert is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "C2Alert",
    "version": "0.1.0",
    "summary": "C2Alert is a simple alert library with good and customizable design.",
    "description": "C2Alert is a simple alert library with good and customizable design. It has small size but greatly serves on the purpose.",
    "homepage": "https://github.com/c2mInc/C2Alert",
    "screenshots": [
        "https://cdn.pbrd.co/images/H3jkuoO.gif",
        "https://cdn.pbrd.co/images/H3jkk8H.gif",
        "https://cdn.pbrd.co/images/H3jkL7X.gif",
        "https://cdn.pbrd.co/images/H3jjN6h.gif"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Connected2.me": "http://connected2.me"
    },
    "source": {
        "git": "https://github.com/c2mInc/C2Alert.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/connected2me",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "C2Alert/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This