I am trying to reload my Tableview with new datasource every second, but there is a slight flickering in the reloading which is clearly visible to the User.
My requirement for refreshing the datasource every second is because I get the new servertime from the API after every second.
I have used the following different methods to reload my 3 sections of my tableView, but now seems to give a without flicker experience.
Method 1
UIView.performWithoutAnimation {
UIView.setAnimationsEnabled(false)
weakSelf.tradeTableView.reloadSections([0,1,2], with: .none)
}
Method 2
UIView.setAnimationsEnabled(false)
weakSelf.tradeTableView.beginUpdates()
weakSelf.tradeTableView.reloadSections([0,1,2], with: .none)
weakSelf.tradeTableView.endUpdates()
UIView.setAnimationsEnabled(true)
Both methods are giving a flicker experience.