-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FXBlurView has a serious Bug, subview.hidden became false. #126
Comments
If you want to Demo, ask me. |
I think the problem is that FXBlurView hides subviews automatically when snapshotting, then re-shows them. I guess it should kee track of which ones were already hidden. |
Thank you for your kind reply. I hope you can make it better soon. |
I have same problem. I agree that this is a serious bug. |
@nicklockwood I found this bug.
This line should check if the layer is already hidden:
change to this will resolve problem:
|
Can I create a PR for this? |
@HoneyLuka sounds a good approach, they use all layers with bounds even the hidden layers in order to render the view. After rendering, they restore the superview unhiding all layers. (even your hidden layers). |
FXBlurView has a serious Bug.
When I set subview hidden:
view.subviews[1].hidden = true;
And add FXBlurView:
[view addSubview:[[FXBlurView alloc] initWithFrame:view.bounds];
The subview.hidden will become false.
Example:
I'm using MJRefresh:
https://github.com/CoderMJLee/MJRefresh
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshHeader:)];
header.lastUpdatedTimeLabel.hidden = true;
self.tableView.mj_header = header;
Now, all is all right! But when I add it:
FXBlurView *blurView = [[FXBlurView] alloc] initWithFrame:self.view.bounds];
[self.view addSubview:blurView];
And The I remove it.
[blurView removeFromSuperView];
self.tableView.mj_header.lastUpdatedTimeLabel.hidden was became false.
I find the was unusual when
for (CALayer *layer in superlayer.sublayers) { layer.hidden = false; }
There!
Please forgive me for being impolite, My English is not very good.
The text was updated successfully, but these errors were encountered: