How do I make a UIScrollView scroll to the top?
Answer for Swift 2.0/3.0/4.0 and iOS 7+:
let desiredOffset = CGPoint(x: 0, y: -self.scrollView.contentInset.top) self.scrollView.setContentOffset(desiredOffset, animated: true)