Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling bounces in uitableview also disables scrolling on iOS 5 but not iOS4

I have an app with a table view in a nav controller; I wanted to disable bouncing so that when my table is in Edit mode, user can scroll down and find rows to delete; otherwise, it would bounce back and not give them the opportunity to press the delete icon next to the row.

So I did this:

self.tableView.bounces=NO;

When I run my app on iOS 4, this works like a charm. User can scroll and the table does not bounce back.

But on iOS 5, the scrolling is also not working at all for the table. No scroll. So to be safe, I did this:

    self.tableView.bounces=NO;
    self.tableView.scrollEnabled=YES;

But this made no difference.

I create my table view and its nav controller programmatically; everything else is working fine with them. Any idea why disabling bounces would also prevent scrolling on iOS 5?

like image 469
johnbakers Avatar asked May 26 '12 04:05

johnbakers


1 Answers

I found the solution here:

UITableView won't scroll after editing view frame and origin

If you manually set the origin of the tableview, on iOS 5 it disables scrolling. on iOS 4 it is not. a shame, really.

like image 98
johnbakers Avatar answered Oct 08 '22 20:10

johnbakers