0

I have a table view and I am reloading the data in a particular interval. my issue is -- if reloading happens when the table is at top no problem, but if the table is in middle position it automatically scrolling to bottom ,Could you please help me to fix this ? Xcode 9, ios 11

I am using [_myTableView reloadData] for reloading

Faizal Malik
  • 197
  • 3
  • 11
  • 2
    Please show your code for better response. Would be better if you can edit your question & paste your reload code. – Gagan_iOS Oct 04 '17 at 10:14
  • [_dashBoardTableView reloadData]; – Faizal Malik Oct 04 '17 at 10:18
  • No in that question , the want to scroll to bottom , my table is automatically scrolling to bottom i don't want to go to bottom automatically – Faizal Malik Oct 04 '17 at 10:25
  • please show your code for better response..... – Anas Mehar Oct 04 '17 at 10:43
  • 1
    Please edit your question and add your code. So that we can find out why it tableview scrolls to bottom. This is unusual behavior. – zoom8amit Oct 04 '17 at 10:48
  • Possible cause for your problem: if the number of cells are more before the reloadData method, and their number is reduced afterwards. So it might looks like the tableView is scrolling when in fact it does not. – dvp.petrov Oct 04 '17 at 10:52

1 Answers1

0

Oh my God , I finally fixed the issue. i have the table view with different height cells for each section , So when i given the estimated height and also provided the specific height for each cell.

I think the table view is ambiguous about your cell size height , that is why its reloading the cells and scrolling to bottom.

Faizal Malik
  • 197
  • 3
  • 11