         var icon: UILabel!
         var UIDisabled = false
         
-        convenience init(text: String, sender: UIViewController, disableUI: Bool) {
-            let width = sender.view.frame.width / CLAWidthDivision
+        convenience init(text: String, disableUI: Bool) {
+            let width = UIScreen.CLAScreenWidth / Settings.CLAWidthDivision
             let height = width / 3
-            self.init(frame: CGRect(x: sender.view.frame.midX - width/2, y: sender.view.frame.midY - height/2, width: width, height: height))
+            self.init(frame: CGRect(x: UIScreen.CLAScreenWidth/2 - width/2, y: UIScreen.CLAScreenHeight/2 - height/2, width: width, height: height))
             backgroundColor = Settings.CLABackgroundColor
             alpha = 1
             layer.cornerRadius = 8

    }
}




            }
        }
    }
        
    private static var instance: LoadingActivity?
    private static var hidingInProgress = false
    
    /// Disable UI stops users touch actions until CozyLoadingActivity is hidden. Return success status
    static func show(text: String, disableUI: Bool) -> Bool {
        guard instance == nil else {
            print("CozyLoadingActivity: You still have an active activity, please stop that before creating a new one")
            return false
        }
        
        instance = LoadingActivity(text: text, disableUI: disableUI)
        return true
    }
    
    static func showWithDelay(text: String, disableUI: Bool, seconds: Double) -> Bool {
        let showValue = show(text, disableUI: disableUI)
        delay(seconds) { () -> () in
            hide(success: true, animated: false)
        }
        return showValue
    }
    
    /// Returns success status
    static func hide(success success: Bool? = nil, animated: Bool = false) -> Bool {
        guard instance != nil else {
