Header View Deque Issue and View not set
Collectionview header not showing on iOS 12 ,Please help
Hi! Can you post the code creating the header and maybe the header code itself too?
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
*if* collectionView == *self*.homeCollectionView {
*guard* *let* supplementaryView = collectionView.
dequeueReusableSupplementaryView(
ofKind: HomeViewController.sectionHeaderElementKind,
withReuseIdentifier: HomeHeaderView.cellIdentifier(),
for: indexPath) *as*? HomeHeaderView *else* {
fatalError("Cannot create header view") }
supplementaryView.titleLabel.text = *self*.viewModel.homedata
[indexPath.section].name?.uppercased()
*return* supplementaryView
}
*return* UICollectionReusableView()
}
Please check the above code which sometimes showing header in iOS 12 , some times its doesn't show
On Tue, Jun 23, 2020 at 1:34 PM Joel Ekström [email protected] wrote:
Hi! Can you post the code creating the header and maybe the header code itself too?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joelekstrom/JEKScrollableSectionCollectionViewLayout/issues/20#issuecomment-647980490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWELA6PUHT2UQZKFV5NYP3RYBOYLANCNFSM4OEQQXDA .
--
Thank you for your time and consideration.Sincerely, Kiran Dhokale iOS Developer Mob. 9960811855
And it works fine on iOS13? What do you have in sizeForSupplementaryElementOfKind:? Note that this layout doesn’t support automatic sizing
I am not used automatic sizing of cells , all cells of same size
On Tue, Jun 23, 2020 at 3:47 PM Joel Ekström [email protected] wrote:
And it works fine on iOS13? What do you have in sizeForSupplementaryElementOfKind:? Note that this layout doesn’t support automatic sizing
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joelekstrom/JEKScrollableSectionCollectionViewLayout/issues/20#issuecomment-648048785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWELA36K3UDGHH7VISMEDLRYB6KLANCNFSM4OEQQXDA .
--
Thank you for your time and consideration.Sincerely, Kiran Dhokale iOS Developer Mob. 9960811855