nicklockwood / FXBlurView

[DEPRECATED]
Other
4.94k stars 713 forks source link

UIView animations #13

Open ArturGasparyan opened 10 years ago

ArturGasparyan commented 10 years ago

bildschirmfoto 2013-09-28 um 13 38 43 Hey!

Is it somehow possible to use FXBlurView with animations? I mean in your examples the user can drag the background and it updates dynamically. Now I have a simple blurView and a UILabel underneath it. I animate so it runs behind the blurView from one side to the other and back.

It seems to update only twice. When it's moving out of the blurView the blurView is empty. When the UILabel moves back in (behind) the blurView the blurView updates once to a static state where the text is blurred - the finish state. It seems as if it is generally doing what it should but only updating at the beginning and the end of the animation. Can it update during the animation too?

nicklockwood commented 10 years ago

Ah, yeah I know why that's happening. I think a fix may be possible. I'll see what I can do.

ArturGasparyan commented 10 years ago

Awesome!

nicklockwood commented 10 years ago

Unfortunately the fix I had it mind doesn't seem to work. All I can suggest is that you animate the text position using an NSTimer or CADisplayLink instead of Core Animation.

MobileVet commented 10 years ago

Ran into this when trying to move an entire FXBlurView over top of a background (a drawer slide out). Would definitely be nice if FXBlurView supported being pushed around using [UIView animateWith...] blocks.

nicklockwood commented 10 years ago

I don't see any easy way to do this with good performance. You do a trick by generating the blurView for the whole superview area and then shifting it around inside a container when you animate (as in the modal example) but I don't see a good way to generalise this technique.