         }
     }
     
+    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()
         }
     }
     
-    override public func layoutSubviews() {
-        
-        super.layoutSubviews()
-        
-        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
-    }
-
     class var sharedInstance: SwiftLoader {
         struct Singleton {
             static let instance = SwiftLoader(frame: CGRectMake(0,0,Config().size,Config().size))

    private var animated : Bool = true
    private var canUpdated = false
    private var title: String?
    private var speed = 1
    
    private var config : Config = Config() {
        didSet {

    }
    
    public class func hide() {
        
        let loader = SwiftLoader.sharedInstance
        NSNotificationCenter.defaultCenter().removeObserver(loader)
        
        loader.stop()
    }
    
    public class func setConfig(config : Config) {
        let loader = SwiftLoader.sharedInstance
        loader.config = config
        loader.frame = CGRectMake(0,0,loader.config.size,loader.config.size)
    }
    
    /**
     Private methods
     */
    
    private func setup() {
        self.alpha = 0
