運動模糊效果的iOS動畫:MotionBlur

jopen 10年前發布 | 32K 次閱讀 iOS開發 移動開發 MotionBlur

MotionBlur能夠讓你添加運動模糊效果的iOS動畫(目前只有位置的變化)。

用法

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];
    }];
}];

運動模糊效果的iOS動畫:MotionBlur

項目主頁:http://www.baiduhome.net/lib/view/home/1406600114624

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!