Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pocketkk/909abd3ae4ba4b5f8352 to your computer and use it in GitHub Desktop.
Save pocketkk/909abd3ae4ba4b5f8352 to your computer and use it in GitHub Desktop.
Swift - Move UIScrollView to Position
func buttonTapped(sender: UIButton!) {
let scroll : UIScrollView? = findScroller(self.view)
let scrollPoint = CGPointMake(0.0, 0.0)
println("Button Tapped")
if scroll {
scroll!.setContentOffset(scrollPoint, animated: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment