Skip to content

Instantly share code, notes, and snippets.

@mdflores
Last active January 3, 2019 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdflores/dada83142515cf93960bb7c64b23c9e2 to your computer and use it in GitHub Desktop.
Save mdflores/dada83142515cf93960bb7c64b23c9e2 to your computer and use it in GitHub Desktop.
Safe Scroll To Bottom in TableView using Content Height
extension UITableView {
func scrollToBottom(animated: Bool) {
let scrollPoint = CGPoint(x: 0, y: self.contentSize.height - self.frame.size.height)
self.setContentOffset(scrollPoint, animated: animated)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment