Errors in prepare() function tutorial Custom UICollectionViewLayout Tutorial With Parallax

Hi guys,

I think I have been encountering a bug in the collectionview tutorial below

I am running swift 10.1 and when I get to Step 2: Implementing the CollectionViewLayout Core Process,

following the instructions of pasting the text into ViewControllerLayout.swift, I get an error where prepareCache is not recognised. See the screenshot below.


This is the full set of warnings that pop up in the warnings side-bar


I have tried re-starting the tutorial, and pasting within various levels of the curly braces of the above prepare function, but to no avail. Is there something obvious that I am doing wrong? I would really like to get on top of the parallax effect, but this bug has been puzzling me for several evenings.

There was a tutorial topic with some messages moderated by @shogunkaramazov, however, the tutorial thread has been closed for some time now

@prdbrg Can you please help with this when you get a chance? Thank you - much appreciated! :]

This topic was automatically closed after 166 days. New replies are no longer allowed.