JEKScrollableSectionCollectionViewLayout icon indicating copy to clipboard operation
JEKScrollableSectionCollectionViewLayout copied to clipboard

Header View Deque Issue and View not set

Open KiranDhokale8118 opened this issue 5 years ago • 4 comments

Collectionview header not showing on iOS 12 ,Please help

KiranDhokale8118 avatar Jun 22 '20 12:06 KiranDhokale8118

Hi! Can you post the code creating the header and maybe the header code itself too?

joelekstrom avatar Jun 23 '20 08:06 joelekstrom

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

KiranDhokale8118 avatar Jun 23 '20 09:06 KiranDhokale8118

And it works fine on iOS13? What do you have in sizeForSupplementaryElementOfKind:? Note that this layout doesn’t support automatic sizing

joelekstrom avatar Jun 23 '20 10:06 joelekstrom

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

KiranDhokale8118 avatar Jun 23 '20 12:06 KiranDhokale8118