Rishab
Rishab

Reputation: 1957

How to lock table view scrolling while at beginning and at end of a table

When I am at the beginning I don't want the table view to scroll upward anymore.

Similarly when I'm at the end of list I don't want to scroll down anymore.

Although both the times it can be dragged a little and then it comes back to the original position.

self.tableView.alwaysBounceVertical = NO;is only good as long as the list size doesn't surpass the screen size.

Upvotes: 0

Views: 170

Answers (2)

Buntylm
Buntylm

Reputation: 7383

Through the Interface Builder in Storyboard Just uncheck the Bounce Option for UITableView will remove bounce for both direction or if you want for one direction just uncheck one of them.

Just Uncheck the <code>Bounce</code> Option

Upvotes: 1

Arun
Arun

Reputation: 1411

Try giving

self.tableView.bounces = NO;

Upvotes: 4

Related Questions