Skip to content

estimatedRowHeight = UITableViewAutomaticDimension not enough for iOS8/9 #27

@fmaylinch

Description

@fmaylinch

With the iOS7+ version of this piece of code running in iOS8/9, I get lots of layout conflicts and calls to heightForRowAtIndexPath for every row, so I merged both versions:

    if #available(iOS 8.0, *) {
        rowHeight = UITableViewAutomaticDimension
        estimatedRowHeight = 400
    } else {
        estimatedRowHeight = UITableViewAutomaticDimension
    }

I don't think this is related, but I also had to use this solution to avoid layout conflicts. I think it's necessary when the default height of 44 is not enough to fit your views initially (for example if you are add a constraint like "V:|-[v(100)]-|").

With both changes, I get it working without layout conflicts. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions