         loader.title = title
         loader.update()
         
+        NSNotificationCenter.defaultCenter().addObserver(loader, selector: #selector(loader.rotated(_:)),
+                                                         name: UIDeviceOrientationDidChangeNotification,
+                                                         object: nil)
+        
         let height : CGFloat = UIScreen.mainScreen().bounds.size.height
         let width : CGFloat = UIScreen.mainScreen().bounds.size.width
-        let center : CGPoint = CGPointMake(width / 2.0, height / 2.0 - CGFloat(topMargin))
+        let center : CGPoint = CGPointMake(width / 2.0, height / 2.0)
+        
         loader.center = center
         
         if (loader.superview == nil) {

            
            let rotationAnimation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
            rotationAnimation.toValue = NSNumber(double: M_PI * 2.0)
            rotationAnimation.duration = CFTimeInterval(speed!);
            rotationAnimation.cumulative = true;
            rotationAnimation.repeatCount = HUGE;
            self.backgroundLayer?.addAnimation(rotationAnimation, forKey: "rotationAnimation")

    }
    
    /**
     *  Loader View
     */
    class SwiftLoadingView : UIView {
        
        private var lineWidth : Float?
        private var lineTintColor : UIColor?
        private var backgroundLayer : CAShapeLayer?
