Tj3n
Tj3n

Reputation: 9923

iOS UITableViewCell overlapping

I'm having weird overlapping when i try to reloadData of the tableView, causing the cell's height to change (using UITableViewAutomaticDimension), then the content get overlapped with the cell above it, cant figure out how to do it :/

Before: enter image description here enter image description here

After reload the view from under cell jump to above: enter image description here

They are basically the same cell but the top one have that View height = 0 and have no data, And it only happen if the bottom cell is fullscreen (top cell is invisible), if the Revenue per hour cell is visible then this bugs wont appear

Upvotes: 1

Views: 2311

Answers (1)

HSG
HSG

Reputation: 1224

This is probably due to set the same cell identifier, do you refresh cells before reusing them?

    - (void)prepareForReuse {    }

Implement this method on your table view cell classes. Hope this would be helpful to you.

Upvotes: 1

Related Questions