fastred/MotionBlur
소개
MotionBlur를 사용하면 iOS 애니메이션에 모션 블러 효과를 추가할 수 있습니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- -2
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalMotionBlur
MotionBlur allows you to add motion blur effect to your animations (currently only position's change). See the accompanying blog post to learn how it's implemented.

Note how the text and icons on the menu get blurred when it slides in and out.
Usage
First, import it with:
#import "UIView+MotionBlur.h"
then use it with:
[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:
관련 프로젝트 살펴보기
불러오는 중…