2

With iOS 8 SDK it's really easy to add a blur effect on a view.
On a UITableView I've a UIVisualEffectView with UIBlurEffect on every cells. When I scroll cells there is a little "lag" on the views. I think it's because UIBlurEffect is rendering in real-time.

Is it possible to unable this real-time rendering ? I would render the view just one time and after use it like a normal view. Because the image behind the UIVisualEffectView never change.

Before iOS 8 I used FXBlurView and it has this option. (github project)

Jonathan
  • 606
  • 5
  • 19
  • What is the content that you are blurring? Is it something behind the tableview? If so, could you not make the cells transparent and place the UIVisualEffectView behind the table so that it never scrolls. – Fogmeister Dec 23 '14 at 13:32
  • No. On every `UITableViewCell` I've an image. And over the image I've a `UIVisualEffectView` with the blur effect. The image never change in the life of the cell so I don't need the real time rendering. – Jonathan Dec 23 '14 at 13:34
  • Hmm... that shouldn't render at all. The scrolling of the tableview has nothing to do with the rendering of the image in the cell. As far as the cell is concerned nothing has changed. Are you sure it is that that is causing the issue? Have you had a look at instruments to find the bottleneck? – Fogmeister Dec 23 '14 at 13:39
  • Also, UIVisualEffect should be fast enough to do that anyway. So I don't think it is the cause of this problem. – Fogmeister Dec 23 '14 at 13:39
  • Hmm. I also think it's strange but It's really difficult to explain the "lag". It's only on the blured view, there is a little "black flash". – Jonathan Dec 23 '14 at 13:42

1 Answers1

0

You can create a static blur using the category UIImage+ImageEffects.m and the methods therein. It should be faster than using UIBlurEffect on older devices.

See this post for more: https://stackoverflow.com/a/17138341/2670912

Community
  • 1
  • 1
  • Yeah. But I wanted to use the Apple way. And my problem is not an older devices, it's also on an iPhone 6. – Jonathan Jan 12 '15 at 12:37