Open jackpaster opened 6 years ago
This is how I did this and I think its also mentioned in documentation.
Create a BaseViewController and inherit it from "InternetStatusIndicable" then create an instance var internetConnectionIndicator: InternetViewIndicator?
Then in viewDidLoad write this function self.startMonitoringInternet(message: SHOW_INTERNET_ISSUE)
Finally subclass every view controller with your BaseViewController.
This way you can avoid the hassle
@jackpaster You can do like the @MuhammadNayabButt said, by inheritance or using protocol oriented approach. It's depends of your project and opinion. But to use in all view controllers, it's depends them follow the protocol or inherite from other object.
@ezefranca Is there anyway to check internet from app delegate instead of going into each view controller and writing these lines of code.