Loading Screen from any Class in Swift
I am trying to implement a loading screen in swift, that I can reuse from any class in the project (I have a few classes that will handle 'long running' activities) The public function is, from another answer: public class LoadingOverlay{ var overlayView = UIView() var activityIndicator = UIActivityIndicatorView() class var shared: LoadingOverlay { struct Static { static let instance: LoadingOverlay = LoadingOverlay() } return Static.instance } public func showOverlay(view: UIView) { overlayView.frame = CGRectMake(0, 0, 80, 80) overlayView.center = view.center overlayView.backgroundColor =