Why does the last row of my tableview not align to the bottom of the screen
Posted
by Liam
on Stack Overflow
See other posts from Stack Overflow
or by Liam
Published on 2010-04-30T15:42:58Z
Indexed on
2010/04/30
15:47 UTC
Read the original article
Hit count: 211
iphone
|uitableview
I have a view which consists of a tableview and a navigation bar. For my tableview I have implemented a 'Load more' row which will load current + pagesize every time it is clicked
The way the loading works is very simple, every time it is clicked I just request the amount of rows I want to display e.g. 5, 10, 15 and so on. This request populates an array and I call
[self.tableView reloadData]
The issue I am experiencing is that when I go to the tableview the first time, it correctly loads and displays the tableview. However, if I 'Load more' it returns the correct amount and displays the correct number of cells but the last cell will not fit properly at the bottom of the screen, about 1/2 of it (or roughly the size of the navigation bar of the cell) appears below the bottom of the screen.
I thought it was sufficient to just tell the tableview to reload itself. Do I need to use
[self.tableView insertRowsAtIndexPaths ...]
to do this.
© Stack Overflow or respective owner