Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fastred/MotionBlur
MotionBlur allows you to add motion blur effect to iOS animations.
https://github.com/fastred/MotionBlur
Last synced: about 2 months ago
JSON representation
MotionBlur allows you to add motion blur effect to iOS animations.
- Host: GitHub
- URL: https://github.com/fastred/MotionBlur
- Owner: fastred
- License: mit
- Created: 2014-07-21T19:39:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-04T18:14:02.000Z (about 9 years ago)
- Last Synced: 2024-03-28T17:06:53.524Z (3 months ago)
- Language: Objective-C
- Homepage: http://holko.pl/2014/07/21/motion-blur/
- Size: 950 KB
- Stars: 1,502
- Watchers: 45
- Forks: 92
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-mobile-ui - fastred/MotionBlur
- awesome-ios2 - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Other free courses)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Other free courses)
- awesome-ios-star - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Other free courses)
- awesome-xamarin-forms - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (Animation)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Other free courses)
- awesome-iosx - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-iosr - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- learn.awesome-iOS - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI)
- awesome-ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- learn.awesome.ios - MotionBlur - MotionBlur allows you to add motion blur effect to iOS animations. (UI / Animation)
- awesome-stars - fastred/MotionBlur - `★1504` MotionBlur allows you to add motion blur effect to iOS animations. (Objective-C)
README
# MotionBlur
`MotionBlur` allows you to add motion blur effect to your animations (currently only position's change). See the [accompanying blog post](http://holko.pl/2014/07/21/motion-blur/) to learn how it's implemented.
![Demo GIF](https://raw.githubusercontent.com/fastred/MotionBlur/master/demo.gif)
*Note how the text and icons on the menu get blurred when it slides in and out.*
## Usage
First, import it with:
```obj-c
#import "UIView+MotionBlur.h"
```then use it with:
```obj-c
[yourView enableBlurWithAngle:M_PI_2 completion:^{
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.8
initialSpringVelocity:0.3
options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionBeginFromCurrentState
animations:^{CGRect f = yourView.frame;
f.origin = CGPointMake(0, 300);
yourView.frame = f;
} completion:^(BOOL finished) {
[yourView disableBlur];
}];
}];
```Snapshot and blur are computed before the animation, that's why the API is asynchronous. You should also see the example project and read comments in the header file: `Classes/UIView+MotionBlur.h`.
## Demo
To run the example project; clone the repo and open `Example/MotionBlur.xcodeproj`.
## Requirements
* iOS 8 and above
## Installation
MotionBlur is available through CocoaPods. To install it, simply add the following line to your Podfile:pod "MotionBlur"
## Author
Arkadiusz Holko:
* [Blog](http://holko.pl/)
* [@arekholko on Twitter](https://twitter.com/arekholko)