       layout.minimumInteritemSpacing = 0
       layout.minimumLineSpacing = 0
       layout.scrollDirection = .horizontal
-      layout.itemSize = view.bounds.size
+      layout.itemSize = view.frame.size
 
       let collectionView = UICollectionView(frame: view.bounds, collectionViewLayout: layout)
       collectionView.autoresizingMask = [.flexibleWidth, .flexibleHeight]


  public typealias DownloadCompletion = (_ image: UIImage?) -> Void

  /// Optional closure to call whenever Agrume is about to dismiss.
  public var willDismiss: (() -> Void)?
  /// Optional closure to call whenever Agrume is dismissed.

    let layout = collectionView.collectionViewLayout as! UICollectionViewFlowLayout
    layout.itemSize = view.bounds.size
    layout.invalidateLayout()
  }
  
  public override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
