self.tableView.reloadSections(indexSet, with: .none)
Because i had images of different sizes my
tableview could not adjust the height calculation while reloading the table. So i have tried to pre calculate the previous height and adjust it to the new one. While implementing the thing it came to my mind that i can update the table from my cell and calling
layoutIfNeededwould do the trick. So eventually it worked.