Latest 1.2.1
Homepage https://github.com/luckytianyiyan/TYBlurImage
License MIT
Platforms ios 7.0
Frameworks Accelerate
Authors

Build Status
Pod Version
Pod Platform
Pod License

An easy way to set up blur effect and play the animation.

Example

Simple
Simple Example
UIImageView Play Blur Aniamtion UIImage Blur Effects
Play Aniamtion Example Effect Example

Installation

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the Get Started section for more details.

Podfile

Add the following to your Podfile.

pod 'TYBlurImage'

Usage

API documentation is available at CocoaDocs – TYBlurImage

Blur Effects

Just #import the UIImage+BlurEffects header.

Use default effects

call the following method is rapid to blur.

  • ty_imageByApplyingLightEffectToImage:
  • ty_imageByApplyingExtraLightEffectToImage:
  • ty_imageByApplyingDarkEffectToImage:
  • ty_imageByApplyingTintEffectWithColor: toImage:
#import <UIImage+BlurEffects.h>

...

UIImage *sourceImage = [UIImage imageNamed:@"testImage.png"];
// Light Effect
UIImage *image = [UIImage ty_imageByApplyingLightEffectToImage:sourceImage];

Use base method

  • ty_imageByApplyingBlurToImage: withRadius: tintColor: saturationDeltaFactor: maskImage:
CGFloat blurRadius = 20.f;
CGFloat saturationDeltaFactor = 1.2f;
UIColor *tintColor = [UIColor colorWithWhite:0.4f alpha:0.3f];
UIImage *image = [UIImage ty_imageByApplyingBlurToImage:sourceImage withRadius:blurRadius tintColor:tintColor saturationDeltaFactor:saturationDeltaFactor maskImage:nil];

UIImageView Animation

Just #import the UIImageView+BlurAnimation header.

Quick to use

UIImage *sourceImage = [UIImage imageNamed:@"testImage.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:sourceImage];
imageView.blurTintColor = [UIColor colorWithWhite:0.4f alpha:0.3f];
imageView.blurRadius = 20;
[imageView ty_blurInAnimationWithDuration:3.0f];

Using blocks

With blocks, you can be notified about whenever the image animation has completed.

[imageView ty_blurInAnimationWithDuration:3.0f completion:^{
    NSLog(@"complete");
}];

License

TYBlurImage is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TYBlurImage",
    "version": "1.2.1",
    "summary": "An easy way to set up blur effect and play the animation.",
    "homepage": "https://github.com/luckytianyiyan/TYBlurImage",
    "screenshots": "https://raw.githubusercontent.com/luckytianyiyan/TYBlurImage/master/gifs/Simple.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "luckytianyiyan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/luckytianyiyan/TYBlurImage.git",
        "tag": "1.2.1"
    },
    "social_media_url": "https://twitter.com/luckytianyiyan",
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "TYBlurImage/Classes/**/*",
    "frameworks": "Accelerate"
}

Pin It on Pinterest

Share This