When i load data from database and call first time tableView.reloadData()
and tableHeightConstraint.constant = tableView.contentSize.height
it works perfect. But when i add new cell and do it again, it doesn't works. without tableHeightConstraint.constant = tableView.contentSize.height
works but then i can't change height of tableView
. it is important to change tableView
height.
Asked
Active
Viewed 91 times
0

MRustamzade
- 1,425
- 14
- 27
1 Answers
0
UITableView is not a simple UIScrollView, its ContentSize from cells in the current view screen, not all cells.
If you add a cell out the current view bounds, it will not change the ContentSize.

Daniel Wang
- 49
- 5
-
http://stackoverflow.com/questions/9958328/when-does-a-uitableviews-contentsize-get-set – MRustamzade Sep 29 '16 at 02:30