Latest 0.4.9
Homepage https://github.com/SilverPlate-Framework/silverplate-ios
License BSD
Platforms ios 8.0, requires ARC
Dependencies ReachabilitySwift
Authors ,

SilverPlate Framework Build Status


Description

SilverPlate is a Swift3 framework which elegantly brings some of the most important system events to you.

Easy to use, you do not need protocols/delegates nor to implement a gazillion methods into your neat classes as the SilverPlate public API relies on simple closures.


Implementation

  • In a ViewController or any other class, to respond to reachability status change:
import UIKit
import SilverPlate

class ViewController: UIViewController {
    @IBOutlet weak var netStatusLabel: UILabel!

    override func viewDidLoad() {
        super.viewDidLoad()
        SilverPlate.shared.onInternetStatusChanged = { (status) in
            self.netStatusLabel.text = "Connectivity status: (status)"

            switch status {
            case SilverPlate.Network.wifi:
                // Do some heavy download
                break
            case SilverPlate.Network.cellular:
                // Now easy with the data load
                break
            case SilverPlate.Network.none:
                // Don't try to fetch anything from the web
                break
            }
        }
    }
}

Latest podspec

{
    "name": "SilverPlate",
    "version": "0.4.9",
    "summary": "Just another framework serving everything you need on a silver plate",
    "homepage": "https://github.com/SilverPlate-Framework/silverplate-ios",
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    },
    "authors": {
        "Jean-Christophe Melikian": "[email protected]",
        "Antoine Pelletier": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SilverPlate-Framework/silverplate-ios.git",
        "tag": "v0.4.9"
    },
    "source_files": [
        "SilverPlate/*.{swift,h}",
        "SilverPlate/Managers/*.{swift,h}"
    ],
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "dependencies": {
        "ReachabilitySwift": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This