I'm using FXBlurView for my background blurs on my UIViews. I'm using the default settings, which means that it updates every frame. However, for some reason, the background seems to lag a bit. Here is a GIF of the issue I'm having:
BlurGIF http://www.interdazzle.com/misc/forums/BlurGIF.gif
If anyone could help, that would be wonderful.
Thanks in advance!
Edit: I changed my code a bit to match what Nick suggested, and came up with this: When it is initialized:
self.sidebar.blurRadius = 30;
self.sidebar.dynamic = NO;
self.sidebar.contentMode = UIViewContentModeLeft;
[self.sidebar updateAsynchronously:YES completion:^{
self.sidebar.frame = CGRectMake(0, 0, 250, [[UIScreen mainScreen] bounds].size.height);
}];
When I animate it:
[UIView animateWithDuration:0.5 animations:^{
BOOL open = self.sidebar.frame.size.width >= 250;
self.sidebar.frame = CGRectMake(open? -250: 0, self.sidebar.frame.origin.y, open? 0: 250, self.sidebar.frame.size.height);
}];
However, it doesn't seem to update/position correctly. Thank you in advance!
Expanding on @NickLockwood's question:
When the FXBlurView is initiated, I run this code:
self.sidebar.blurRadius = 30;
self.sidebar.dynamic = NO;
self.sidebar.contentMode = UIViewContentModeRight;
self.sidebar.layer.contentsGravity = kCAGravityBottomLeft;
[self.sidebar setClipsToBounds:YES];
[self.sidebar updateAsynchronously:YES completion:^{
// Whatever you want
}];
Then I simply animate the object like this:
[UIView animateWithDuration:0.5 animations:^{
BOOL open = self.sidebar.frame.size.width > 125; // Over half way done
self.sidebar.frame = CGRectMake(0,0, open? 0 : 250, [[UIScreen mainScreen] bounds].size.height);
}];
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With