Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Sections? #1

Open
VeeruPV opened this issue Jul 4, 2012 · 1 comment
Open

Support for Sections? #1

VeeruPV opened this issue Jul 4, 2012 · 1 comment

Comments

@VeeruPV
Copy link

VeeruPV commented Jul 4, 2012

Hi there, Looks very nice - Tried it out and liked it. But was wondering if StreamView supports sections like UITableView?

Thanks

@Xenofex
Copy link
Contributor

Xenofex commented Jul 4, 2012

Hi, @VeeruPV

There's no such plan at the moment to support it. I might do this after work but not sure. When i wrote this i got no such requirement. Basically the code is not written to support this right now. I did think of sections, but decided to not to support it then. Since the columns are of different heights, sections seems not to be so natural.

For sections support, there would be much work to do: section headers, footers, new delegate methods, deprecating existed delegate methods and find some way to be compatible with the existing code.

As aways you can help yourself. All the magic lies in the reloadData method, in which I calculate the frames of all cells, store them in a proper format. Then in the UIScrollView's delegate, I check if the new cells are coming in and the existing are going out, and create/removeFromSuperview/reuse to pretended to be a continuously rendered view. All you need is to add something in the reloadData method, to give every cell a proper position based on its index path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants