Created
November 26, 2016 06:42
-
-
Save SongJiaqiang/800224cb8d6f898f25316bb28bc409eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// show image | |
self.imageView.image = [UIImage imageNamed:@"imagename"]; | |
// create effect | |
UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; | |
// add effect to an effect view | |
UIVisualEffectView *effectView = [[UIVisualEffectView alloc]initWithEffect:blur]; | |
effectView.frame = self.view.frame; | |
// add the effect view to the image view | |
[self.imageView addSubview:effectView]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://pinkstone.co.uk/how-to-apply-blur-effects-to-images-and-views-in-ios-8/