Adding & Removing A View Overlay in Swift
问题 Following from this question: Loading Screen from any Class in Swift Issue : The loading overlay view will display but will not hide when hideOverlayView() is called. Oddly however, the overlay disappears after some time (15 to 30 seconds after it appears) Code : Contained in FirstController.swift public class LoadingOverlay{ var overlayView = UIView() var activityIndicator = UIActivityIndicatorView() class var shared: LoadingOverlay { struct Static { static let instance: LoadingOverlay =