I have a _TableView with items , and I want to set automatic refresh,and I don\'t want it to scroll on refresh , lets say user scrolled 2 pages down , and the refre
_TableView
Use Extension
create UITableViewExtensions.swift and add following:
UITableViewExtensions.swift
extension UITableView { func reloadDataWithoutScroll() { let offset = contentOffset reloadData() layoutIfNeeded() setContentOffset(offset, animated: false) } }