Ok... Heres the view controller code, and below it the layout code (poached from StackOverflow if I remember right):import UIKitclass testVCViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ImagesCVLayoutDelegate { @IBOutlet weak var cv: UICollectionView! @IBOutlet weak var btn: UIButton! @IBAction func btn(_ sender: UIButton) { items.remove(at: 0) cv.deleteItems(at: [IndexPath(row: 0, section: 0)]) // THIS IS WHERE THE WARNINGS AND ERROR OCCUR. cv.reloadData() } var items = [1,2,3,4,5,6,7,8,9] // Data source. func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return items.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cell, for: indexPath) as! zCollectionViewCell cell.lbl.text = (items[indexPath.row]) return cell } func numberOfSections