Skip to content

Instantly share code, notes, and snippets.

@meyusufdemirci
Last active March 31, 2018 15:53
Show Gist options
  • Save meyusufdemirci/8d654da34a813e16c494fe66f028d1bd to your computer and use it in GitHub Desktop.
Save meyusufdemirci/8d654da34a813e16c494fe66f028d1bd to your computer and use it in GitHub Desktop.
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let offset = scrollView.contentOffset.y
let changeStartOffset: CGFloat = -180
let changeSpeed: CGFloat = 100
navigationView.alpha = min(1.0, (offset - changeStartOffset) / changeSpeed)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment