JagCesar / iOS-blur

Blur a UIView
Do What The F*ck You Want To Public License
2.07k stars 211 forks source link

Broken in iOS 7.0.3? #22

Closed cwagdev closed 10 years ago

cwagdev commented 10 years ago

I was using this with no issues but just updated my device to 7.0.3 and find that the effect is completely broken. Anyone else experiencing this?

JagCesar commented 10 years ago

I'll take a look at it right away.

Sent from my iPhone

On 23 okt 2013, at 09:17, Chris Wagner notifications@github.com wrote:

I was using this with no issues but just updated my device to 7.0.3 and find that the effect is completely broken. Anyone else experiencing this?

— Reply to this email directly or view it on GitHub.

JagCesar commented 10 years ago

Works fine here. What device are u running on?

cwagdev commented 10 years ago

Wow, thanks for the fast response, iPhone 5. I will double check my implementation.

AndrewSosna commented 10 years ago

I can confirm. iPhone 5, iOS 7.0.3, effect is broken

westerlund commented 10 years ago

To all of you, it is not broken, but Apple has lowered the translucent effect on the UIToolBar quite much, and since this method uses the layer of UIToolBar, it's translucentness is lowered as well. If you only use the AMBlurView as it is, you should be fine, but if you add a layer behind it to punch the colours, you are out of luck.

cwagdev commented 10 years ago

@simonwesterlund thanks for the clarification, I still need to look into my implementation. I was using either a background layer or a background color to make it dark gray with the blur effect, but now it is completely black.

runmad commented 10 years ago

Yeah, Apple changed the transparency and blur effect greatly in 7.0.3. Also, setting any colours will just make the colours behind it grey-scale. Is it possible to achieve the Notification Center effect somehow? With live-blurring. Colours are saturated in the Notication and Control Centers.

westerlund commented 10 years ago

it is possible, but apple did not just steal the UIToolBar layer. it's opengl, and I think I'll try to copy that effect some day just for fun. all the available versions are not using opengl but rather GPUImage (correct me if i'm wrong) and it's way less efficient. a fun hack day project :)

On 24 okt 2013, at 22:15, Rune Madsen notifications@github.com wrote:

Yeah, Apple changed the transparency and blur effect greatly in 7.0.3. Also, setting any colours will just make the colours behind it grey-scale. Is it possible to achieve the Notification Center effect somehow? With live-blurring. Colours are saturated in the Notication and Control Centers.

— Reply to this email directly or view it on GitHub.

runmad commented 10 years ago

Yeah, I am using GPUImage to achieve the affect for a static view, and it's actually about 5 times faster on a 5S for me than using the UIImage+Effects class Apple has provided.

GPUImage has been updated to include an iOS 7 blur and the example project shows a neat usage with a live camera view being blurred with very little distinguishable lag (again on 5S).

cwagdev commented 10 years ago

Ok I finally had a chance to look at my implementation and was for the most part able to restore the effect by reducing the opacity/alpha of the blurTintColor property. Before I had it set to black with an alpha of 1.0, now I get about the same affect as previously with black at 0.7. The blur doesn't seem as strong as before, but that seems to be the case for UIToolBar in general.

runmad commented 10 years ago

Yeah, the issue still remains with the colours of the background as it makes everything grey-scale.

One can hope that Apple at some points makes some sort of subclass available to us (or perhaps a property on UIView or it's background) that allows us to get this effect exactly as it appears in the OS.

JagCesar commented 10 years ago

I think we've established that it still works, closing this issue :)

ghvillasboas commented 10 years ago

Since UIToolbar live blur layer "steal" technique is broken for a lot a people (including me), I found this fantastic article that gives a great overview on how to archive the same algorithm Apple users on iOS 7 UI components for doing live blur.

If anyone is thinking on replicating this feature, could be very helpful.

http://sunsetlakesoftware.com/2013/10/21/optimizing-gaussian-blurs-mobile-gpu

Best.