mhunturk
mhunturk

Reputation: 296

Disabling Auto Scroll UITableView

I want to disable autoscroll to top. I tried both

    tableview.scrollsToTop=NO;
    [tableview setScrollsToTop:NO];

but that doesn't work.

Thanks

Upvotes: 0

Views: 2680

Answers (1)

Abhay Singh
Abhay Singh

Reputation: 586

The automatic scrolling code resides in tableViewController, so auto-scrolling can't be disabled. Instead of subclassing from UITableViewController you can subclass from UIViewController and use a tableView inside it.

If you are willing to use UITableViewController itself, you can override viewWillAppear and don't call [super viewWillAppear].

Upvotes: 5

Related Questions