         let scrollView: UIScrollView = pageViewController.viewControllers?.first!.view?.subviews[0] as! UIScrollView
         let imageView:UIImageView = scrollView.subviews[0] as! UIImageView
         
-        mainView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
-        scrollView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
+        mainView.frame = CGRect(x: 0, y: statusBarHeight(), width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height - statusBarHeight())
+        scrollView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height - statusBarHeight())
         scrollView.contentSize = CGSize(width: imageView.frame.size.width, height: imageView.frame.size.height)
         scrollView.center = view.center
-        imageView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
+        imageView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height - statusBarHeight())
         imageView.center = view.center
     }
     

        
    }
    
    func orientationChanged(){
        if(pageViewController != nil){
            let scrollView: UIScrollView = pageViewController.viewControllers?.first!.view?.subviews[0] as! UIScrollView

    
    override func viewWillAppear(_ animated: Bool) {
        gallery.currentViewController = self
        scrollView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height - gallery.statusBarHeight())
        imageView.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height - gallery.statusBarHeight())
        scrollView.contentSize = CGSize(width: imageView.frame.size.width, height: imageView.frame.size.height)
        scrollView.center = view.center
        imageView.center = view.center
        
        print("Internal Scroll: \(scrollView.frame)")
        for subview  in  self.view.subviews {
            subview.backgroundColor = UIColor.clear
            
