UICollectionView Using Swift

后端 未结 4 2177
生来不讨喜
生来不讨喜 2020-12-18 09:01

In My Project I created Cell in UICollectionViewCell

Its got Error Terminating app due to uncaught exception

The code as follow.

GalleryCell.

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-18 09:42

    the same for header/footer in swift:

        // register header accessory view:
        self.collectionView.registerClass(UICollectionReusableView.self,
            forSupplementaryViewOfKind: UICollectionElementKindSectionHeader,
            withReuseIdentifier: headerReuseIdentifier);
    

提交回复
热议问题