         var volumeWindow = UIWindow(frame: CGRectMake(0.0, -20.0, screen.width, 20.0))
         volumeWindow.backgroundColor = self.backgroundColor
         volumeWindow.windowLevel = UIWindowLevelStatusBar + 1
+        volumeWindow.rootViewController = UXMVolumeOverlayController()
         return volumeWindow
     }()
     

        volumeWindow.addSubview(volumeProgress)

        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(UXMVolumeOverlay.volumeChanged(_:)), name: "AVSystemController_SystemVolumeDidChangeNotification", object: nil)
    }
    
    deinit {

                                                                   userInfo: nil,
                                                                   repeats: false)
    }
    
    func rotated() {
        let screen = UIScreen.mainScreen().bounds
        self.volumeWindow.frame = CGRectMake(0.0, -20.0, screen.width, 20.0)
    }
}

class UXMVolumeOverlayController:UIViewController {
    
    override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
        return .All
    }
    
    override func shouldAutorotate() -> Bool {
        return true
    }
}