I have a table view controller which doesn't let me manually scroll to the last row. It automatically scrolls slightly up so I could never select the last 2-3 rows. Anyone experienced this problem? Should I set a minimum height for the table view to solve this? If so how?
+2
A:
Are you able to scroll using touches to the last row? It may be a contentSize issue.
Ben Gottlieb
2010-04-19 17:58:26
no i am unable to scroll using touches. how do i set contentSize?
Dave
2010-04-19 18:12:49
i set a minimum height for the table view content size to 600. No change in the behavior.
Dave
2010-04-19 19:10:45
if you're not manually setting contentSize, don't start now. Have you verified that the table's frame is correct, and what you expect? ie, if it's extending either offscreen or below another view, you'll get the behavior you describe above.
Ben Gottlieb
2010-04-20 13:36:44
+2
A:
The first answer in the following post helped me fix this issue -
The initial CGSize for the UiTableView was set at a higher value (beyond the view bounds) and that was the issue. I upvoted that answer. Thanks.
Dave
2010-04-19 20:39:15
+2
A:
Likely your tableView frame is too big and extends off the screen. This will prevent the bottom cells from being able to scroll up to the screen because they've reached the bottom of the tableView.
You will have to determine the visible area on your screen. But the code should look something like this:
self.tableView.frame = CGRectMake(0.0, 0.0, 320, 324);
Here's the meanings of the CGRectMake values: (X, Y, Width, Height)
Jonah
2010-04-19 21:26:43