Recently in the collation of the navigation bar gradually fade effect, finishing process by chance to learn the picture of the effect of the glass, very simple, not much to say, first look at the effect of comparison,
This is the original,
This is added after the effect, the creation of the image of the code is not up, below to see the code to add effects:
Frosted glass
/*
The system comes with three different styles
uiblureffectstyleextralight,//extra brightness, (highlight style) uiblureffectstylelight,//light style uiblureffectstyledark//dark style
*/
Uiblureffect *effect = [Uiblureffect effectwithstyle:uiblureffectstyledark];//Create the desired type of frosted glass effect
Uivisualeffectview *effectview = [[Uivisualeffectview alloc] initwitheffect:effect]; Create a frosted glass view
Effectview.frame = CGRectMake (0, 0, MSW, 260);
Effectview.alpha = 0.75;
[Self.scaleimageview addsubview:effectview];//added to a view that needs to achieve a frosted glass effect
You can set alpha for Effectview, and the effect:
can also be partially implemented frosted glass, only need to modify the Effectview frame can:
The simple frosted glass effect was realized. If you have enough, please give us a lot of advice
IOS for simple frosted glass effect