Skip to content

estimatedRowHeight = UITableViewAutomaticDimension not enough for iOS8/9 #27

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!

Activity

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

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