     
     override func viewDidLayoutSubviews() {
         super.viewWillLayoutSubviews()
-        let size = self.screenSize()
+        let size = self.rootViewControllerSize()
         self.viewWidth = size.width
         self.viewHeight = size.height
         

        self.view.removeFromSuperview()
    }
    
    
    func screenSize() -> CGSize {
        let screenSize = UIScreen.mainScreen().bounds.size
        if (NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) && UIInterfaceOrientationIsLandscape(UIApplication.sharedApplication().statusBarOrientation) {

    }
    
    func show(viewController: UIViewController, title: String, text: String?=nil, buttonText: String?=nil, cancelButtonText: String?=nil, color: UIColor?=nil, iconImage: UIImage?=nil) -> JSSAlertViewResponder {
        self.rootViewController = viewController
        
        if((viewController.navigationController) != nil) {
            self.rootViewController = viewController.navigationController
