Skip to content
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

iOS11 上崩溃 #17

Open
zhong-chen opened this issue Sep 19, 2017 · 6 comments
Open

iOS11 上崩溃 #17

zhong-chen opened this issue Sep 19, 2017 · 6 comments

Comments

@zhong-chen
Copy link

点击按钮 崩溃在 HyPopMenuView.m 的 118 行

报错如下:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<popMenvTopView: 0x7fbaed70ca80; frame = (0 44; 375 92); autoresize = W+H; layer = <CALayer: 0x60400042a400>> has been added as a subview to <UIVisualEffectView: 0x7fbaed404a50; frame = (0 0; 375 667); layer = <CALayer: 0x60000003f9a0>>. Do not add subviews directly to the visual effect view itself, instead add them to the -contentView.'

@zhong-chen
Copy link
Author

解决了:
在 HyPopMenuView.m 里,
要将那个_backgroundview 的类型由 UIView 变成UIVisualEffectView
然后将所有的[_backgroundview addSubView:xx]
变成 [_backgroundview.contentView addSubView:xx]

@luoxiao
Copy link

luoxiao commented Sep 20, 2017

@zhong-chen 我也改了

@puyang0521
Copy link

iOS 11 动画按钮无法弹出了,请问有没有遇到相同问题的朋友

@luoxiao
Copy link

luoxiao commented Sep 21, 2017

@puyang0521
复制楼上的方案;
解决了:
在 HyPopMenuView.m 里,
要将那个_backgroundview 的类型由 UIView 变成UIVisualEffectView
然后将所有的[_backgroundview addSubView:xx]
变成 [_backgroundview.contentView addSubView:xx]

@ZYHB
Copy link

ZYHB commented Oct 27, 2017

@zhong-chen 我也改了

@Easyzhan
Copy link

接楼上
[weakView.backgroundView addSubview:model.customView];
第158行左右,这里要变成
[weakView.backgroundView.contentView addSubview:model.customView];
即可解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants