I try to quickly list all the cells in the collection, but this implementation below gives me a warning.
for cell in self.collectionView?.visibleCells() as [UICollectionViewCell] {
The first line shows the error below:
Postfix operand '?' must be of an optional type; type '(UICollectionView, cellForItemAtIndexPath: NSIndexPath) -> UICollectionViewCell
I tried communicating with options and worked in Xcode 6 Beta 6, but to no avail in "Beta 7"
How can I get rid of this error? / Write a loop that goes through all my CollectionView cells?
source share