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

Dynamic cell height based on configured item #61

Open
Wisors opened this issue Mar 24, 2017 · 3 comments
Open

Dynamic cell height based on configured item #61

Wisors opened this issue Mar 24, 2017 · 3 comments

Comments

@Wisors
Copy link
Contributor

Wisors commented Mar 24, 2017

Issue: some cell might have different static heights for each state of item. As a result now, I have to create a two copies of cell with different heights, because cell class only has ability to return it height from the static variable. I know I can use AutoLayout, but it actually much slower and I need to improve performance here.
I propose to deprecate this static variables:

    static var defaultHeight: CGFloat? { get }
    static var estimatedHeight: CGFloat? { get }

And replace it with instance functions:

    func estimatedHeight(with _: T) -> CGFloat?
    func heigth(with _: T) -> CGFloat?

With this approach it is still possible to return static value, but in the same time much more flexible for user.

@sashkyn
Copy link

sashkyn commented Mar 5, 2018

+1

@Banck
Copy link

Banck commented Jun 29, 2018

@maxsokolov Hey! Is it possible to add this feature?
Thanks!

@maxsokolov
Copy link
Owner

Hey @Banck
I don't have plan for this in the near future.

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

No branches or pull requests

4 participants