Ios Mao glass special effects, ios Mao glass Special Effects
Last night, I had a sudden whim. I studied the glass effect of ios 8 and thought it was pretty nice. The code is implemented as a result. --- Sorry, you cannot download the resource beauty Review of the bird chart. But the truth is the same. There are images everywhere. Master the knowledge points. Haha, so let's learn about the effect of today's glass.
# Import "ViewController. h"
@ Interface ViewController ()
{
UIImageView * _ imageView;
}
@ End
@ Implementation ViewController
-(Void) viewDidLoad {
[SuperviewDidLoad];
[SelfcreateView];
[SelfcreatevisualEfView];
}
-(Void) createView
{
UIImageView * imageView = [[UIImageViewalloc] initWithFrame: CGRectMake (300,400, 50,)];
[ImageView setImage: [UIImageimageNamed: @ "webwxgetmsgimg.jpg"];
[Self. viewaddSubview: imageView];
_ ImageView = imageView;
}
// Create a visual view
-(Void) createvisualEfView
{
Uivisualizer tview * vis = [[uivisualizer tviewalloc] initWithEffect: [UIBlurEffecteffectWithStyle: UIBlurEffectStyleExtraLight]; // There are three methods to call
Vis. frame = CGRectMake (0, 0, 300,400 );
Vis. alpha = 1.0;
[_ ImageViewaddSubview: vis];
}
There are a total of three effects. You can see in the method that we want to have the spirit of exploration and adventure, isn't it.