         }
         
         /**
-        Start and stop spinning
-        */
+         Start and stop spinning
+         */
         
         private func start() {
             self.isSpinning? = true

    
    
    /**
    * Loader config
    */
    public struct Config {
        
        /**
        *  Size of loader
        */
        public var size : CGFloat = 120.0
        
        /**
        *  Color of spinner view
        */
        public var spinnerColor = UIColor.blackColor()
        
        /**
         *  Spinner Line Width
         */
        public var spinnerLineWidth :Float = 1.0
        
        /**
        *  Color of title text
        */
        public var titleTextColor = UIColor.blackColor()
        
         /**
         *  Speed of the spinner
         */
        public var speed :Int = 1
        
        /**
        *  Font for title text in loader
        */
        public var titleTextFont : UIFont = UIFont.boldSystemFontOfSize(16.0)
        
        /**
        *  Background color for loader
        */
        public var backgroundColor = UIColor.whiteColor()
        
        /**
        *  Foreground color
        */
        public var foregroundColor = UIColor.clearColor()
        
        /**
        *  Foreground alpha CGFloat, between 0.0 and 1.0
        */
        public var foregroundAlpha:CGFloat = 0.0
        
        /**
        *  Corner radius for loader
        */
        public var cornerRadius : CGFloat = 10.0
        
        public init() {}
        
    }
}

        }
    }
    
    func rotated(notification: NSNotification) {
        
        let loader = SwiftLoader.sharedInstance
        
        let height : CGFloat = UIScreen.mainScreen().bounds.size.height
        let width : CGFloat = UIScreen.mainScreen().bounds.size.width
        let center : CGPoint = CGPoint(x: width / 2.0, y: height / 2.0)
        
        loader.center = center
        loader.coverView?.frame = UIScreen.mainScreen().bounds
    }
    
    override public var frame : CGRect {
        didSet {
            self.update()
        }
    }
    
    class var sharedInstance: SwiftLoader {
        struct Singleton {
            static let instance = SwiftLoader(frame: CGRectMake(0,0,Config().size,Config().size))
