You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, thanks for your code
i attempt to use this method to creat a headerView. my subView has a button for login. when i clicked login button to push to loginViewController and back to root, the bluredImageView is malposition.
and , i find the screenShot method in the code always flicker when it is called, so i instead of method :
-(UIImage *)getImageFromView:(UIView *)orgView{
UIGraphicsBeginImageContext(orgView.bounds.size);
[orgView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
Forgive my rude,may it's my own mistack, thancks a lot.
The text was updated successfully, but these errors were encountered:
Hi Ronda,
Thanks for the feedback, I will look into the malpositioning issue.
I have few thing regarding the glitch, use afterScreenUpdates to NO instead of YES as shown below
[self drawViewHierarchyInRect:kDefaultHeaderFrame afterScreenUpdates:NO]
[view.layer renderInContext:UIGraphicsGetCurrentContext()] is CALayer level rendering the view image.
Apple as introduced drawViewHierarchyInRect: for UIView class from iOS 7 onwards, for view rendering and it tell thats it is much more faster than renderInContext: of Layer class, so the glitch may fix with telling NO to [view drawViewHierarchyInRect:rect afterScreenUpdates:NO] instead of using renderInContext
hi, thanks for your code
i attempt to use this method to creat a headerView. my subView has a button for login. when i clicked login button to push to loginViewController and back to root, the bluredImageView is malposition.
finally,i fix this bug by following code:
{
UIImage *screenShot;
if (self.subView) {
screenShot = [self getImageFromView:self.subView];
}else{
screenShot = [self getImageFromView:self];
}
screenShot = [screenShot applyBlurWithRadius:5 tintColor:[UIColor colorWithWhite:0.6 alpha:0.2] saturationDeltaFactor:1.0 maskImage:nil];
self.bluredImageView.image = screenShot;
self.bluredImageView.alpha = 0.0f;
}
and , i find the screenShot method in the code always flicker when it is called, so i instead of method :
-(UIImage *)getImageFromView:(UIView *)orgView{
UIGraphicsBeginImageContext(orgView.bounds.size);
[orgView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
Forgive my rude,may it's my own mistack, thancks a lot.
The text was updated successfully, but these errors were encountered: