Why do you need this if-statement?
if collectionView == UI.castCollectionView{
Are you still trying to show UICollectionView inside each UITableViewCell as shown in another thread of yours?
I guess you are not managing such nested structure well.
Please show your latest definition of NumberOfSeasonsCell if you are still using it.
Also all the code related to UI.castCollectionView is needed.
One more, please show all the code of collectionView(_:cellForItemAt:). It is very likely there is something wrong in the hidden parts of your code.
Topic:
Programming Languages
SubTopic:
Swift
Tags: