Latest 0.1.0
Homepage https://github.com/SachK13/SKToast
License MIT
Platforms ios 9.0
Frameworks UIKit, Foundation
Authors

Version
License
Platform

SKToast

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Features

  • [x] ToastView Customization
  • [x] Easy & Quick Integration

Requirements

  • iOS 9.0+
  • Xcode 9.1+
  • Swift 4.0+

Installation

CocoaPods

To integrate SKToast into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'SKToast', '~> 0.1.0'
end

Then, run the following command:

$ pod install

Manual

You can directly add the SKToastView.swift source files into your Xcode project.

Include SKToastView wherever you need it with import SKToast.

Usage

(see sample Xcode project in /Example)
To run the example project, clone the repo, and run pod install from the Example directory first.

Import the module.

import SKToast

Now, you can show ToastView with status message:

SKToast.show(withMessage: "Please check your intenet connection.")

Display ToastView with status message and completionHandler:

SKToast.show(withMessage: "Your internet connection appears to be offline, please check your internet connection") {
         print("Perform any task after toast disappearance.")
}

Customization

// default is dark
SKToast.backgroundStyle(.light)

// default is white
SKToast.messageTextColor(UIColor.black)

// default is System Font
let myFont = UIFont(name: "AvenirNext-DemiBold", size: 16)
SKToast.messageFont(myFont!)

// ToastView background styles
SKToast.backgroundStyle(.light)
SKToast.backgroundStyle(.extraLight)
SKToast.backgroundStyle(.dark)

License

SKToast is available under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "SKToast",
    "version": "0.1.0",
    "summary": "SKToast is a simple and light weight Android like toast view for your iOS app written in swift.",
    "description": "SKToast is a simple Android like toast view really easy to integrate and easy to use with other customization options.",
    "homepage": "https://github.com/SachK13/SKToast",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "SachK13": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SachK13/SKToast.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SKToast/Classes/**/*",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This