Im trying to make a generated array of (6) numbers display per cell, of a collection view with reusable cells.
The array is being generated with this:
let original = [1, 2, 3, 4, 5, 6]
var currentArray = original
print("currentArray =", currentArray)
var stop = false
repeat {
currentArray = currentArray.map() { ($0 + 2) % 25 + 1}
print("currentArray =", currentArray)
stop = currentArray[0] == 25
} while !stop
my Collection View is being setup here...
<ViewController.swift>
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell=collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as! discoCueCell
cell.backgroundColor=UIColor.clear
Any ideas???