I am wondering how I can make a blur effect when I drag to the top of a UIScrollview like on twitter and in tweetbot. I have been looking around but I did not find it out anywhere. I know I have to use gaussian blur, but I don't know how I am going to implement it. Any code would be greatly appreciated.

Twitter

Tweetbot

有帮助吗?

解决方案

Here is a project like you are looking for.

  1. https://github.com/sibahota059/TwitterProfilePageBlurr
  2. https://github.com/lostincode/kickstarter-pulldown-bouncy

You need to add the blurr effect while Scrolling.

- (void) scrollViewDidScroll:(UIScrollView *)scrollView
{
// Add Blurr effect here.
}

Some similar Controls:

  1. http://rowboatrevolution.com/2012/02/uitableview-parallax-background-a-la-path/
  2. https://github.com/Rheeseyb/RBParallaxTableViewController

其他提示

I took a crack at this myself, using autolayout. The code is on Github and here is a walk through.

tweetbot http://cocoacovers.com/images/1/final.gif

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top