Taking first plunge with collection views and am running into this error:
Terminating app due to uncaught exception \'NSInternalInconsistencyException
If you create it by code, you must create a custom UICollectionViewCell
, Then, init a UICollectionView
,and use loadView
to set the view is the UICollectionView
that you create. If you create in viewDidload()
, it does not work. In addition, you can also drag a UICollectionViewController
, it saves a lot of time.