【发布时间】:2016-06-21 11:53:00
【问题描述】:
当按下按钮时,我试图按下UICollectionViewController。我正在使用它来推送它:
RewardsCollectionViewController* rvc = [[RewardsCollectionViewController alloc] init];
[self.navigationController pushViewController:rvc animated:YES];
但是当我点击按钮时,应用程序崩溃并给我以下消息:
UICollectionView must be initialized with a non-nil layout parameter
在我的RewardsCollectionViewController 课堂上我什么都没做,我只是将numberOfItemsInSection 更改为1。
我可能有一个可能的解决方案here,但我没有在该页面上找到我的答案。因为它在某种程度上与UICollectionViewFlowLayout 有关,我不知道那是什么。
【问题讨论】:
-
你用谷歌搜索了错误吗?
标签: ios objective-c uicollectionview