1

I am using autoLayout for my tableViewCell in StoryBoard, because I want to have variable height for rows based on the text.

Now in the viewDidLoad

I am using these lines of code

self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 310;

Now if i scroll tableView and then i reload it. It causes the tableView to set it offset (not sure why). Please see the image below (the white area above image) after reloading table view.

enter image description here

Hemang
  • 26,840
  • 19
  • 119
  • 186

1 Answers1

-1

Add this code in your viewDidLoad

self.automaticallyAdjustsScrollViewInsets = false;
Siju
  • 510
  • 3
  • 10