Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tableview scrolling bounces back and hides the bottom cells

I have a view that is shown under a navigation controller. The view contains one subview at the top portion and a table view at the bottom. The table might have rows that extend beyond the visible height based on data. When I have rows that are below the last visible row, if I scroll the view up, it bounces back, it does not stay there. Is there a way to make it stay? I tried making the parent view a scroll view and that did not help. My view is from a XIB.

like image 778
Umark Avatar asked Oct 02 '09 05:10

Umark


1 Answers

Sounds like the size of your UITableView is slightly larger than the area available on the iPhone screen. This might be because the view didn't take into account the size of hte navigation bar. As a test, go into Interface Builder and make the UITableView much smaller, say half the size, so you can clearly see the top and bottom. See if you still have the same bouncing.

If the sizes are correct, UITableView does not need a UIScrollView to function as expected. In fact, there would be few reasons, that I can think of right now (other than horizontal scroll ones), that you'd want a UITableView inside a UIScrollView.

like image 180
mahboudz Avatar answered Oct 20 '22 05:10

mahboudz