How do I make a UIImage fade in and fade out as I scroll?
问题 I have a stretchy header that I made following this tutorial http://blog.matthewcheok.com/design-teardown-stretchy-headers/. Anyway it's working perfectly but I'm having trouble making a UIView on top of it fade out as the view stretched and returning to original alpha as the view is returned to normal. Best I could come up with is this: override func scrollViewDidScroll(scrollView: UIScrollView) { updateHeaderView() var offset = scrollView.contentOffset.y if offset < -170 {