Вопрос

Is it possible to create a UICollectionView with 2 different sets of headers? For example, I want there to be one header that scrolls with the table and then stops at the top of the table, that floats normally like a tableView's section header. But then I also want "sub" headers, that scroll with the table and then stop at the bottom of the outer header, and switch to the next one and so forth. There will be many "sub" headers, but only one header. I tried to do this with a tableView, but it got very messy and was wondering if there was a cleaner way to create this using a UICollectionView. Any tips?

Thanks,

Это было полезно?

Решение

Yes, it's possible. I'd recommend starting with this.

You'll want to modify layoutAttributesForElementsInRect: to check the section number and return different behavior depending on whether or not section == 0.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top