1

Apple's iPod app and Remote app can see the a blurred version of the wallpaper image, as you can see the image below:

enter image description here enter image description hereenter image description here

I really like this effect, so I tried to set my root view's alpha value, but it did not work.

And I set opaque to NO, but it still didn’t work. It looks just like a black screen:

enter image description here

My question is: Maybe it’s limited for Apple's app use only?

Zev Eisenberg
  • 8,080
  • 5
  • 38
  • 82
slboat
  • 502
  • 6
  • 14
  • 1
    No, you are allowed to use blurs. Check out UIBlur/VisualEffectView http://stackoverflow.com/questions/24067719/how-to-use-uivisualeffectview – MendyK Feb 23 '15 at 00:24
  • So it called Blur effect,thank you! – slboat Feb 23 '15 at 00:28
  • In iOS 13, this is finally possible! See my answer here: https://stackoverflow.com/a/56592568/7840155 – Tzar Jun 14 '19 at 06:34

2 Answers2

1

This used to work, but it was never documented, and apparently has been removed from more recent versions of iOS. You can use UIVisualEffectView to blur things in your own app, but you can’t make your app transparent so that you can see the device wallpaper. If you think Apple should add this feature for developers, you should file a bug.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Zev Eisenberg
  • 8,080
  • 5
  • 38
  • 82
0

When app get background, use the codes below:

UIBlurEffect *blur          = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *effectView  = [[UIVisualEffectView alloc] initWithEffect:blur];
[effectView setFrame:self.view.bounds];
[self.view addSubview:effectView];

ADDED

- (void)applicationWillResignActive:(UIApplication *)application {
    UIBlurEffect *blur          = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
    UIVisualEffectView *effectView  = [[UIVisualEffectView alloc] initWithEffect:blur];
    [effectView setFrame:[[UIScreen mainScreen] bounds]];
    [[[UIApplication sharedApplication] keyWindow] addSubview:effectView];

}

Tested and works.

Don't forget to remove the effectView when app become active.

Ryan
  • 4,799
  • 1
  • 29
  • 56
  • Thank you,I test it,it can got the blue with a image,but it seems not get the desktop,can you make a test for it,I wonder maybe the effectiveview can be the root view,so it will not block by the default view. – slboat Feb 23 '15 at 03:08