     
     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)
-        imageView.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 - 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
             

        
        pageViewController = UIPageViewController(transitionStyle: UIPageViewControllerTransitionStyle.scroll, navigationOrientation: UIPageViewControllerNavigationOrientation.horizontal, options: nil)
        pageViewController.dataSource = self
        pageViewController.view.frame  = mainView.frame
        pageViewController.view.layer.borderWidth = 0
        pageViewController.view.layer.borderColor = UIColor.green.cgColor
        pageViewController.setViewControllers(temp, direction: UIPageViewControllerNavigationDirection.forward, animated: true, completion:nil)

            break;
        case UIGestureRecognizerState.ended:
            let scrollCenterY = self.scrollView.center.y
            if(scrollCenterY <= (UIScreen.main.bounds.height / 2 - 25) && self.gallery.dismissWhenSlidesUp){
                if(self.gallery.onMovedToTop != nil){
                    self.gallery.onMovedToTop!()
                    
