Popularity
2.9
Declining
Activity
0.0
Stable
134
4
15

Programming language: Swift
License: GNU General Public License v3.0 or later
Tags: Networking    
Latest version: v0.2.0

EFInternetIndicator alternatives and similar libraries

Based on the "Networking" category.
Alternatively, view EFInternetIndicator alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of EFInternetIndicator or a related project?

Add another 'Networking' Library

README

EFInternetIndicator

CI Status Version License Platform

Requirements

  • Xcode 8.0+
  • iOS 8.3+

WARNING : It's not work on simulator. #1

Installation

CocoaPods

You can use CocoaPods to install EFInternetIndicator by adding it to your Podfile:

use_frameworks!
pod 'EFInternetIndicator'

Example

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

Usage example

To start monitoring internet status in a single UIViewController you just need add the InternetStatusIndicable protocol and start monitoring with startMonitoringInternet()


import UIKit
import EFInternetIndicator

class ViewController: UIViewController, InternetStatusIndicable {

    var internetConnectionIndicator:InternetViewIndicator?

    override func viewDidLoad() {
        super.viewDidLoad()
        self.startMonitoringInternet()
    }
}

Also, you can customize indicator using custom parameters:

func startMonitoringInternet(backgroundColor:UIColor, style: MessageView.Layout, textColor:UIColor, message:String, remoteHostName: String)

If you want all yours UIViewControllers monitoring internet you can create a abstract class like:


import UIKit
import EFInternetIndicator

class EFViewController: UIViewController, InternetStatusIndicable {

    var internetConnectionIndicator:InternetViewIndicator?

    override func viewDidLoad() {
        super.viewDidLoad()
        self.startMonitoringInternet()
    }
}

class SecondViewController: EFViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }   
}

// Override properties when you want 
class MagicViewController: EFViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
 ย  ย  ย  ย self.startMonitoringInternet(backgroundColor:UIColor.blue, style: .StatusLine, textColor:UIColor.white, message:"No magic on internet here :(", remoteHostName: "magic.com")
    }   
}


Author

ezefranca, [email protected]

Acknowledgments

License

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


*Note that all licence references and agreements mentioned in the EFInternetIndicator README section above are relevant to that project's source code only.