Skip to content

Instantly share code, notes, and snippets.

@blacklee
Last active December 30, 2015 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blacklee/7781853 to your computer and use it in GitHub Desktop.
Save blacklee/7781853 to your computer and use it in GitHub Desktop.
UITableViewCell displays incorrectly before reusing.
UITableViewCell reuse problem.
appearance:
dynamic height cell, with dynamic UILabel...
the cell's height is calculated correctly, but the label shows wrong.
cell display incorrect before reuse, after reused, everything displays well.
in CostomCell's layoutSubviews method, each subview's frame is right if you print them.
reason:
App's using xib to draw custom UITableViewCell.
uncheck the [Use Autolayout] in [Option+Command+1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment