Skip to content

Instantly share code, notes, and snippets.

@khurram18
Last active March 31, 2020 14:51
Show Gist options
  • Save khurram18/ecb543628895373086efad463f7b3f02 to your computer and use it in GitHub Desktop.
Save khurram18/ecb543628895373086efad463f7b3f02 to your computer and use it in GitHub Desktop.
extension ViewController: UITableViewDelegate {
// other implementaion
func scrollViewDidScroll(_ scrollView: UIScrollView) {
updateVisibleLabelPositions()
}
private func updateVisibleLabelPositions() {
guard let cells = tableView.visibleCells as? [TableViewCell] else { return }
for cell in cells {
updateLabelPosition(cell)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment