     let width = CGRectGetWidth(view.frame)
     let height = CGRectGetHeight(view.frame)
 
-    collectionSize = CGSize(
-      width: width < height ? width : height,
-      height: height > width ? height : width)
-
+    collectionSize = view.bounds.size
     view.addSubview(collectionView)
     view.addSubview(pageLabel)
     view.addSubview(closeButton)

      if page == images.count - 1 {
        seen = true
      }
      pageDelegate?.lightboxControllerDidMoveToPage(self, page: page)
    }
  }

      var offset = collectionView.contentOffset

      offset.x = CGFloat(page) * collectionSize.width

      collectionView.setContentOffset(offset, animated: animated)
    }
