LBBlurredImage-master
LBBlurredImage是一个继承自UIImageView轻而易举使图像模糊的项目你将仅仅用一行代码来创建一个神奇的模糊效果Copy file This code must be used with deploy target 6 0+ and under ARC If your code doesn"t use ARC you can mark this source with the compiler flag fobjc arc Just grab the two file named UIImageView+LBBlurredImage {h m} and UIImage+ImageEffects {h m} in the Additions group into your project and link with Accelerate framework #import "UIImageView+LBBlurredImage h" where you need it CocoaPods You can use CocoaPods to manage your dependencies and install LBBlurredImage Follow the instructions on the CocoaPods site to install the gem and add pod "LBBlurredImage" to your Podfile Use [self imageView setImageToBlur:[UIImage imageNamed:@"example"] blurRadius:kLBBlurredImageDefaultBlurRadius completionBlock:^ { NSLog @"The blurred image has been set" ; }]; The generation of the blurred image is made on a background thread for this reason a completion block is provided The completionBlock is dispatched on the main thread when the image has been generated and set to the UIImageView The code is provided with an example project if you want to see the class in actions ">LBBlurredImage是一个继承自UIImageView轻而易举使图像模糊的项目你将仅仅用一行代码来创建一个神奇的模糊效果Copy file This code must be used with deploy target 6 0+ and under ARC If your code doesn"t use ARC you can mark this source with the compile [更多]
LBBlurredImage-master.zip
预估大小:23个文件
LBBlurredImage-master
文件夹
LBBlurredImage.xcodeproj
文件夹
project.pbxproj
16KB
LBBlurredImage.podspec
774B
LICENSE
1KB
Resources
文件夹
SimulatorScreenshot.png
105KB
LBBlurredImage
文件夹
UIImageView+LBBlurredImage.m
2KB
main.m
342B
1.14MB
文件大小:
评论区