I am trying to push a UICollectionViewController
when a button is pressed. I'm using this to push it:
RewardsCollectionViewController* rvc = [[RewardsCollectionViewController alloc] init];
[self.navigationController pushViewController:rvc animated:YES];
But when I tap on the button the app crashes and gives me this message:
UICollectionView must be initialized with a non-nil layout parameter
In my RewardsCollectionViewController
class I haven't done anything I just changed numberOfItemsInSection
to 1
.
There might me a possible solution here but I didn't find my answer on that page. As it is somehow related to UICollectionViewFlowLayout
and I have no idea what that is.